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


I hate to admit this, but it appears I combined an early proposal of the assembly schema (that still allowed  fileref attributes instead of using href and other things that were not implemented) with parts of the 5.1 and 5.2 versions of the DocBook schema.  Itâs not really worth trying to get thigns working based on the schema I sent.  Donât know how that happened, but as I was trying to work through things, it became obvious that things were just wrong.  I am pulling down a clean copy of the V5.2b05 release of the schema and will redo things to get a clean schema based on the current working schema.  My working model is going to be:

 

1.      Add the modifications for xi:include to assembly.rng to create a new assemblyxi.rng.

2.      Modify the old assembly-sample-6.xml (renaming it) to make it validate against the existing assembly schema.

3.      Break it up into chunks in other files and reference them using the xi:include to create a new version of the file with includes at various levels to reflect the discussion at https://github.com/docbook/docbook/issues/54.

 

I apologize for the confusion.  I worked on this part of last night and parts of today trying to understand what was happening and why it was so confusing and it took most of that to figure out what was going on.  I also realized I made a mistake in the assembly extension when I copied how include was implemented in other areas of DocBook and will fix that problem.  Iâll get this to the team as soon as possible.

 

Regards,

Larry Rowland

From: docbook-tc@lists.oasis-open.org [mailto:docbook-tc@lists.oasis-open.org] On Behalf Of Rowland, Larry
Sent: Tuesday, February 12, 2019 7:38 AM
To: Bob Stayton <bobs@sagehill.net>; docbook-tc@lists.oasis-open.org
Subject: RE: [docbook-tc] testing xinclude in assembly

 

I think I have found the issue and will have a fix in place as soon as possible.  Iâm somewhat concerned that the schema has an ordered sequence of valid elements and Iâm going to end up with xi:include elements being valid anywhere in the sequence.  I think that means anything can be pulled in anywhere.  Maybe I donât understand enough about xi:include to be doing this change.  Iâm way behind on things for tomorrowâs meeting.

 

Regards,

Larry Rowland

 

From: docbook-tc@lists.oasis-open.org [mailto:docbook-tc@lists.oasis-open.org] On Behalf Of Bob Stayton
Sent: Monday, February 11, 2019 5:32 PM
To: docbook-tc@lists.oasis-open.org
Subject: Re: [docbook-tc] testing xinclude in assembly

 

Yes, that one validated for me as well.  But when you resolve the XInclude, the resulting file is not valid because a resources element appears after the structure element.

This file does not validate, even though the result after XInclude resolution is valid:

 <assembly>
  <xi:include href="./resource-block.xml"/>
  <structure>...</structure>
</assembly>

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

On 2/11/2019 3:50 PM, Scott Hudson wrote:

Hm. This example validated against that schemaâ

 

--Scott

 

From: <docbook-tc@lists.oasis-open.org> on behalf of Bob Stayton <bobs@sagehill.net>
Date: Monday, February 11, 2019 at 4:49 PM
To: "docbook-tc@lists.oasis-open.org" <docbook-tc@lists.oasis-open.org>
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]