[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Fw: XPath question:"Filter" a nodeset

Subject: Fw: XPath question:"Filter" a nodeset
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Fri, 20 Dec 2002 18:38:01 -0000
xpath and filter
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.