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

Re: XPath about pi and comment

Subject: Re: XPath about pi and comment
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 10 Jan 2001 23:35:45 -0800 (PST)
xpath pi
Hi Shinichiro,
> <xsl:value-of select="*[processing-instruction()]"/>
> <xsl:value-of select="*[comment()]"/>

In case you want to retrieve all processing instructions and comments
the above will not work -- what you've specified is actually all
elements children of the current node that have at least one
processing-instruction child or, respectively, that have at least one
comment child.

Use:

//processing-instruction()

and

//comment()

Dimitre Novatchev.
P.S. You can play with these and any other XPath expressions using the
XPath Visualiser (http://www.vbxml.com/xpathvisualizer)
The most recent version is 1.3 -- recent new features include providing
the ability for the user to dynamically define xsl:variable s and
xsl:key s and to use them in XPath expressions.

Shinichiro HAMADA wrote:
Hello, all.

In the following source, Is there any way to get "pivalue" and
"comment"
by XSLT? I tryed it with node-test function, processing-instruction()
and
comment() like this;

<xsl:value-of select="*[processing-instruction()]"/>
<xsl:value-of select="*[comment()]"/>

But it didn't work well. Please give me any comments. Thank you.

-- source --
<?xml version="1.0"?>
<doc>
 <?pi pivalue?>
 <!-- comment -->
 <el>text</el>
</doc>

--
Shinichiro Hamada



__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.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.