Re: [xsl] XPath about pi and comment

Subject: Re: [xsl] XPath about pi and comment
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 10 Jan 2001 23:35:45 -0800 (PST)
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.





Dimitre Novatchev.
P.S. You can play with these and any other XPath expressions using the
XPath Visualiser (
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
by XSLT? I tryed it with node-test function, processing-instruction()
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"?>
 <?pi pivalue?>
 <!-- comment -->

Shinichiro Hamada

Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!

 XSL-List info and archive:

Current Thread