[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Special characters and Transformation

Subject: RE: Special characters and Transformation
From: "Khorasani, Houman" <Houman.Khorasani@xxxxxxxxxxxx>
Date: Fri, 5 May 2006 11:47:40 +0100
RE:  Special characters and Transformation
Sorry, the sample I am using is more complicated than the one I have shown
here.  I made a mistake.  In real the root has children.

My problem here is the for-each statement

<xsl:for-each select="root/TEXT">

Because root has a namespace:

<root xmlns="http://www.foo.com">

So I have to make my for-each element to understand that the "root" with the
following namespace has a "TEXT" tag.  But I don't know yet how...

Thanks for the references, I will have a look and hopefully find something.
That should be straight forward...

Thanks
Houman


-----Original Message-----
From: Florent Georges [mailto:darkman_spam@xxxxxxxx]
Sent: 05 May 2006 11:33
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Special characters and Transformation

"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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.