FWDED
I wanted to post a question to the XSL List @ mulberrytech, but it actually
never got there. Don't know the reason, though.
May I ask you to post the attached message to the list on behalf of me, as
you obviously can send messages?
Or maybe you just know the answer, anyway? :D
Thank you very much!
Best regards,
johann richard
----- Original Message -----
From: "Johann Richard" <Johann(_dot_)richard(_at_)dspfactory(_dot_)ch>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Wednesday, December 18, 2002 3:31 PM
Subject: XPath question:"Filter" a nodeset
Hi all,
I did some research but am still having a problem w/ an XPath expression
that I want to use in an XInclude #xpointer() statement.
Say, I have the following XML file test.xml:
<a>
<ai/>
<s class="s">
<s>
<p>
</s>
</s>
<s class="i"/>
<s>
<s class="s"/>
<s class="i">
<p/>
</s>
</s>
</a>
Now, if I do a unity-transform on the following XML w/ an XInclude capable
processor:
<b>
<xi:include
href="test.xml#xpointer(/descendant-or-self::s[(_at_)class='s' or
not(ancestor-or-self::*/@class='i')])"/>
</b>
I would expect my XInclude processor to build a fragment (node set) that
looks like the following, i.e. my intial XML w/ the "class='i'" and their
children get stripped off:
<b>
<s class="s">
<s>
<p>
</s>
</s>
<s>
<s class="s"/>
</s>
</b>
(I would call this a "filtered" XInclude'd fragment ... :)
I tried the XPath expression w/ the XPath Explorer and seemed to get right
nodes selected, however, if I process this in an XINclude with xsltproc
(--xinclude), I don't get what I expected, i.e. xsltproc complained that it
could not build the URI. I start asking myself if that what I am trying to
accomplish is not possible ...
Any help on this would be greatly appreciated.
Best regards,
johann
********************************************
Johann Richard
IC & DSP Design Engineer
Dspfactory SA
Champs-Montants 12a
2074 Marin-Epagnier
Switzerland
http://www.dspfactory.com
********************************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list