OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-tc message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-tc] testing xinclude in assembly


Well, the assembly schema says resources elements should appear before any structure elements. The XInclude is pulling in a resources element, so this example would place it after structure, which is not valid.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
On 2/11/2019 2:39 PM, Scott Hudson wrote:

I think the include is in the wrong location? Shouldnât it be more like this:

Â

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<assembly xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
Â
<resources>
 Â
<resource xml:id="local-file" fileref="some/path/file.xml"/>
 Â
<resource><xi:include href="stock-blocks.xml" xpointer="standard.disclaimers" parse="xml">
  Â
<xi:fallback>
   Â
<para><emphasis role="strong">Boilerplate got lost!</emphasis></para>
  Â
</xi:fallback>
 Â
</xi:include></resource>
Â
</resources>
Â
<structure>
 Â
<info>
  Â
<title>My Test Assembly</title>
  Â
<author>
   Â
<personname>Some Poor Volunteer</personname>
   Â
<affiliation><orgname>DocBook TC</orgname></affiliation>
  Â
</author>
 Â
</info>
 Â
<module resourceref="standard.disclaimers"/>
Â
</structure>
Â
<xi:include href="./resource-block.xml"/>
</assembly>

Â

?

Â

Thanks,

Â

--Scott

Â

From: <docbook-tc@lists.oasis-open.org> on behalf of Bob Stayton <bobs@sagehill.net>
Date: Monday, February 11, 2019 at 12:24 PM
To: DocBook Technical Committee <docbook-tc@lists.oasis-open.org>, "Rowland, Larry" <larry.rowland@hpe.com>
Subject: [docbook-tc] testing xinclude in assembly

Â

Hi Larry,

I loaded the assemblyxi.rng into Oxygen XML for testing. I opened your test file that you included in the zip file "assembly-with-xinclude.xml" and I see that it XIncludes a file containing a <resources> element. But when I try to add a structure element after the <xi:include> element, it won't let me. I think a common scenario would be to XInclude a common resources file and then create a structure using those resources.ÂÂ

I am able to add a structure element after the literal resources element in the test file and before the xi:include, but not after the xi:include. I don't see what in the schema prevents that.

-- 
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]