xsl-list
[Top] [All Lists]

RE: Saxon 6.5.3: apply-templates="processing-instruction()"

2005-04-27 11:51:26
I thought I could just do the following:

<xsl:apply-templates select="processing-instruction()" />

But if I do that, the other template never gets applied. 

But that's not what your stylesheet does, it does:

<xsl:apply-templates select="processing-instruction" />

(which selects elements called "processing-instruction")

It would also be useful to show us the source document so we can check if
your match pattern actually matches.

Michael Kay
http://www.saxonica.com/




 If I change
the line to 

<xsl:apply-templates select="node()" />

I get the output that I want, but a lot of other output as well.

I have tried 

<xsl:apply-templates
select="processing-instruction('FM')[substring-before(substrin
g-after(.,
'MARKER ['), ']')='Filename']" />

But that doesn't work, either.

Here's the entire stylesheet, just in case it helps.
-----

<?xml version='1.0' ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  <xsl:output method="text"/>

  <xsl:template match="dita">
    <xsl:variable name="crossRefId" select="@Id"/>
    <xsl:value-of select="$crossRefId"/>
    <xsl:apply-templates select="processing-instruction" />
  </xsl:template>

<xsl:template
match="processing-instruction('FM')[substring-before(substring
-after(.,'
MARKER ['), ']')='Filename']">
    <xsl:variable name="filename" select="substring-after(.,
                                        '[Filename] ')" />
    <xsl:value-of select="$filename"/>
  </xsl:template>

</xsl:stylesheet>

-----
The $crossRefId variable is set and output, but $filename 
isn't output.

Any ideas?

     Steve
      


--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>