Subject: RE: [xsl] Special characters and Transformation From: Florent Georges <darkman_spam@xxxxxxxx> Date: Fri, 5 May 2006 12:32:48 +0200 (CEST) |
"Khorasani, Houman" wrote: > 2) For some reason I can't even reproduce the problem. > I only get a root with namespace and all elements are > empty underneath. > I tried this: > <?xml version="1.0" encoding="us-ascii"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:output method="xml" version="1.0" encoding="us-ascii" > indent="yes"/> > <xsl:template match="/"> > <xsl:element name="root" namespace="http://www.fo.com"> > <xsl:for-each select="Text"> > <xsl:element name="Text"> > <xsl:element name="tag"> > <xsl:value-of select="tag"/> > </xsl:element> > </xsl:element> > </xsl:for-each> > </xsl:element> > </xsl:template> > </xsl:stylesheet> You don't have any 'Text' children of your root node (in the sample you provided). Use instead: <xsl:for-each select="root/Text"> BTW, I suggest you to take a look at "Literal Result Elements", "Template Rules", and maybe the "Modified Identity Tranformation Pattern". Regards, --drkm ___________________________________________________________________________ Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement vos services prifiris : virifiez vos nouveaux mails, lancez vos recherches et suivez l'actualiti en temps riel. Rendez-vous sur http://fr.yahoo.com/set
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Special characters and Tr, Khorasani, Houman | Thread | RE: [xsl] Special characters and Tr, Florent Georges |
RE: [xsl] Special characters and Tr, Khorasani, Houman | Date | RE: [xsl] Special characters and Tr, Khorasani, Houman |
Month |