XInclude and Fragement Identifiers

Questions about XML that are not covered by the other forums should go here.
mphare
Posts: 71
Joined: Fri Apr 30, 2004 8:00 pm
Location: Texas

XInclude and Fragement Identifiers

Post 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.
--------------------------

- mike

GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: XInclude and Fragement Identifiers

Post 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
Post Reply