[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] xincluding every child nodes of an element in docbook5
Hi Robert,Have you considered making validation a two-step process: run xsltproc to resolve all XIncludes, and validate the result with Jing?
Regarding the issue of including the content but not the root node, that's one of the reasons why DocBook Assembly was developed. The attributes "contentonly", "omittitle", and "renderas" give you more flexibility in assembling content than XIncludes with xpointer(). The resource addressing scheme in assembly currently supports fragment identifiers in URLs, so you can select a descendent element in a file by xml:id, and when combined with @contentonly you can meet your requirement. However, for validation you would still need to assemble the content before validating, because parsers don't directly support DocBook Assembly (yet).
Bob Stayton Sagehill Enterprises email@example.com----- Original Message ----- From: "Robert Fekete" <firstname.lastname@example.org>
To: "DocBook Apps" <email@example.com> Sent: Tuesday, August 28, 2012 2:05 AM Subject: [docbook-apps] xincluding every child nodes of an element in docbook5
Hi DocBook Gurus,We are in the middle of upgrading to Docbook 5.1b7, and have run into the following issue.We validate our Docbook 5 docs with Jing (and have patched the underlying Xerces to handle xml:ids in xincludes), and build the output with xsltproc. (For docbook 4 we used xmllint+xsltproc, but AFAIK xmllint does not properly handle the schematron rules of docbook 5.)My problem is, that our documents heavily use xincludes using the xpointer scheme, but this is not supported in Xerces, therefore I cannot validate it. For example: <xi:include href="reference_common.xml" xpointer="xpointer(//simplesect[@id = 'destination_commonoption_flags']/node() )" xmlns:xi="http://www.w3.org/2001/XInclude"/>I would like to rework these xincludes so that: - they are valid - they build- I need to be able to include every child of a node, but without the original parent node, based on the ID of the parent- the element to be included is typically not the root node of the file - I need to use the ID as a reference in the xincludeFor example, I have a file that contains a bunch of simplesects that have multiple child nodes:<simplesect id="id1"> <title></title> <para></para> <para></para> </simplesect> <simplesect id="id2"> <title></title> <para></para> <itemizedlist></itemizedlist> </simplesect> What is the proper way to xinclude the contents of <simplesect id="id2">? Any help is greatly appreciated. Kind Regards, Robert Fekete --------------------------------------------------------------------- To unsubscribe, e-mail: firstname.lastname@example.org For additional commands, e-mail: email@example.com