|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: use two consecutive transformation in XSL
"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="http://www.w3.org/1999/xhtml";> ^^^ > <body> > <strong> > abcd > </strong> > <i> > abcd > </i> > <body> ^^^ > </html> > <?xml version="1.0" encoding="utf-8"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";> ^^^ > <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="http://www.w3.org/1999/xhtml"> <body> <strong>abcd</strong> <i>abcd</i> </body> </html> ~/drafts/fctx> cat mus47.xsl <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:h="http://www.w3.org/1999/xhtml"> <xsl:template match="h:strong"> <h:strong> <h:font color="red"> <xsl:apply-templates/> </h:font> </h:strong> </xsl:template> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> ~/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 xmlns="http://www.w3.org/1999/xhtml"> <body> <h:strong xmlns:h="http://www.w3.org/1999/xhtml"><h:font color="red">abcd</h:font></h:strong> <i>abcd</i> </body> </html> --drkm ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Tilichargez cette version sur http://fr.messenger.yahoo.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







