Subject: [xsl] Fw: XPath question:"Filter" a nodeset From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx> Date: Fri, 20 Dec 2002 18:38:01 -0000 |
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.richard@xxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> 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[@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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] namespace-alias isn't cha, Michael Kay | Thread | [xsl] Sorting and grouping, Marshal Linfoot |
RE: [xsl] XSL Message, Chuck White | Date | RE: [xsl] XSL Message, Greg Faron |
Month |