Re: [xsl] use two consecutive transformation in XSL

Subject: Re: [xsl] use two consecutive transformation in XSL
From: drkm <darkman_spam@xxxxxxxx>
Date: Tue, 6 Dec 2005 12:19:40 +0100 (CET)
"mus47@xxxxxxxx" wrote:

> > I guess the "<>xsl:copy>" is a typo in your email.
> > What are exactly the symptoms? Can you post a
> > minimal stylesheet / input document that
> > reproduce de problem?

>  <?xml version="1.0" encoding="utf-8"?>
> <?xml-stylesheet type="text/css" href="mystyle.xsl"?>
> <html  xmlns="";;>
> <body>
> <strong>
> abcd
> </strong>
> <i>
> abcd
> </i>
> <body>
> </html>

> <?xml version="1.0" encoding="utf-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="";;>
> <xsl:template match="strong">
> <strong>
> <font color="red">
> <xsl:apply-templates/>
> </font>
> </strong>
> </xsl:template>
> </xsl:template>
> <xsl:template match="*">
> <xsl:copy><xsl:apply-templates/> </xsl:copy>
> </xsl:template>
> </xsl:stylesheet>

  Is this exactly what you give to your XSLT processor?  What's the
error message?  BTW, this not copy the attributes.  And finaly you try
to match 'strong' in no namespace, and your have in your source a
'strong' in the XHTML namespace; is it really what you want?

    ~/drafts/fctx> cat mus47.xml
    <?xml version="1.0" encoding="utf-8"?>
    <html xmlns="";>

    ~/drafts/fctx> cat mus47.xsl
    <?xml version="1.0"?>
      <xsl:template match="h:strong">
          <h:font color="red">
      <xsl:template match="@*|node()">
          <xsl:apply-templates select="@*|node()"/>

    ~/drafts/fctx> saxon mus47.xml mus47.xsl 
    Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
    <?xml version="1.0" encoding="UTF-8"?><html
        <h:strong xmlns:h="";><h:font



Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Tilichargez cette version sur

Current Thread