[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xsl-list
Subject:    Re: [xsl] [XSLT 1.0] A template that matches on any PI except  xml-stylesheet?
From:       Michael Kay <mike () saxonica ! com>
Date:       2011-03-30 18:55:40
Message-ID: 4D937CAC.5020000 () saxonica ! com
[Download RAW message or body]

On 30/03/2011 19:24, G. Ken Holman wrote:
> At 2011-03-30 11:40 -0400, Costello, Roger L. wrote:
>>    Is there a way, in XSLT 1.0, to create
>>    a template that matches on any processing
>>    instruction except the xml-stylesheet PI?
>
> <xsl:template 
> match="processing-instruction()[name(.)!='xml-stylesheet']">
>

Alternatively:

<xsl:template match="processing-instruction()">
   process this one
</xsl:template>

<xsl:template match="processing-instruction(xml-stylesheet)">
   ignore this one
</xsl:template>

Michael Kay
Saxonica

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@lists.mulberrytech.com>
--~--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic