Page 1 of 1

XInclude and Fragement Identifiers

Posted: Wed Apr 23, 2008 6:49 pm
by mphare
Hi,

I've been handed a bunch of XML files (a few 100) and they all use XInclude with the href using Fragment Identifiers (href="http://www/TL1/SomeFile.xml#SomeTag)

Is there no way to get Fragment Id support in Oxygen? (I'm currently using v.8.2, but I've put in for an uprade to v.9, so I'll have that before too long)

My other option will be to get out the Awk/Sed tools and try to change all the files, but I'd rather not.

Re: XInclude and Fragement Identifiers

Posted: Thu Apr 24, 2008 12:53 pm
by sorin_ristache
Hello,

The default validator does not support including a fragment based on the id attribute. You have to use the LIBXML validator by selecting LIBXML in the combo box displayed on the External Validation toolbar. If SomeTag is the id of an element of SomeFile.xml you can include the element with:

Code: Select all

<xi:include href="http://www/TL1/SomeFile.xml" xpointer="xpointer(id('SomeTag'))" xmlns:xi="http://www.w3.org/2001/XInclude"/>
If you need that in an XSLT transformation you have to select the Xsltproc processor in the Transformer combo box of the dialog for editing a transformation scenario.

Regards,
Sorin