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

RE: new user xslt

Subject: RE: new user xslt
From: CHAOUI Hassan <HCHAOUI@xxxxxxxxx>
Date: Fri, 26 Apr 2002 11:54:04 +0200
chaoui
Hi,
When apply the normalize-space, it give this message error:
xsl:element must have a valur for name attribute

-----Message d'origine-----
De: Jeni Tennison [mailto:jeni@xxxxxxxxxxxxxxxx]
Date: vendredi 26 avril 2002 11:43
À: CHAOUI Hassan
Cc: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Objet: Re:  new user xslt


Hi,

> When I apply the template, I have tags with white space, and the xml
> parser refuse that.

The XSLT processor should give you an error when you try to create
them.

> How can I do to have proprely xml tags :
>
> <xsl:template match="row">
>   <xsl:element name="{cell[1]}">
>     <xsl:value-of select="cell[2]"/>
>   </xsl:element>
> </xsl:template>

You need to use the normalize-space() function to strip the
whitespace:

  <xsl:element name="{normalize-space(cell[1])}">
    <xsl:value-of select="normalize-space(cell[2])" />
  </xsl:element>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



+----------------------------------------------------------------+
| Ce courrier ainsi que les fichiers joints sont confidentiels.  |
| Si vous avez recu ce courrier par erreur, veuillez en informer |
| l'administrateur du systeme : exp-iris@xxxxxxxxx               |
|                          ---------                             |
| Ce message confirme que le courrier a passe le controle        |
| antivirus du relais de messagerie Internet avec succes.        |
+----------------------------------------------------------------+


+----------------------------------------------------------------+
| Ce courrier ainsi que les fichiers joints sont confidentiels.  |
| Si vous avez recu ce courrier par erreur, veuillez en informer |
| l'administrateur du systeme : exp-iris@xxxxxxxxx               |
|                          ---------                             |
| Ce message confirme que le courrier a passe le controle        |
| antivirus du relais de messagerie Internet avec succes.        |
+----------------------------------------------------------------+


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.