| 
 
Subject: [xsl] matching node(s) between start/end processing instruction tags From: "Nagai, Paul" <pnagai@xxxxxxxxxxx> Date: Mon, 24 Feb 2003 11:49:33 -0800  | 
Howdy,
I want to change spaces between nolinebreak start and end processing
instructions. My xml looks like this:
	<?Pub _nolinebreak?>word1 word2<?Pub /_nolinebreak?>
I want my output to be:
	word1 word2
My template (which handles the unpaired _newline pi just dandy) looks like
this:
=======
<xsl:template match="processing-instruction('Pub')">
  <xsl:variable name="mypi">
    <xsl:value-of select="."/>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="$mypi='_newline '">
      <br/>	
    </xsl:when>
    <xsl:when test="$mypi='_nolinebreak '">
        what goes here?
    </xsl:when>
    <xsl:otherwise></xsl:otherwise>
  </xsl:choose>
</xsl:template>
=======
Don't ask why the test requires a space at the end of the PI. I don't know.
I don't like it much either!
I expected to be able to match the start/end components of the PIs and a
node. Instead, I'm matching either the start (_nolinebreak) or the end
(/_nolinebreak) PI tag. Best would be a way to match them as a node. Ok,
would be to see some code that handles the xpath manipulation required to
select the nodes between them (I could have a mix, I guess).
I'm using Epic/Xalan.
Thanks.
------
Paul Nagai
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
  | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] Discussion group., Mike Brown | Thread | [xsl] Re: matching node(s) between , Dimitre Novatchev | 
| Re: [xsl] OMR Mark for folding mach, J.Pietschmann | Date | [xsl] Re: Re: Can one _generate_ na, Dimitre Novatchev | 
| Month |