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

RE: Namespaces.

Subject: RE: Namespaces.
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 31 Mar 2006 09:33:01 +0100
RE:  Namespaces.
I just noticed that you had

<xsl:apply-templates name="child::*"/> 

which is incorrect XSLT syntax: it should be "select=". If your XSLT
processor didn't flag this as an error, send the vendors a bug report.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Michael Kay [mailto:mike@xxxxxxxxxxxx] 
> Sent: 31 March 2006 09:31
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: RE:  Namespaces.
> 
> Just replace 
> 
> >     <xsl:if test="count(*) = 0">
> >       <xsl:value-of select="."/>
> >     </xsl:if>
> >     <xsl:apply-templates name="child::*"/>
> 
> by
> 
> <xsl:apply-templates/>
> 
> Michael Kay
> http://www.saxonica.com/
>  
> 
> > -----Original Message-----
> > From: Kamal Bhatt [mailto:kbhatt@xxxxxxxxx] 
> > Sent: 31 March 2006 01:57
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: Re:  Namespaces.
> > 
> > 
> > Apologies, this message took a long time to get to the server, so I 
> > already found a solution:
> > 
> > <xsl:template match="node()">
> >   <xsl:element name="local-name()">
> >     <xsl:apply-templates select="@*"/>
> >     <xsl:if test="count(*) = 0">
> >       <xsl:value-of select="."/>
> >     </xsl:if>
> >     <xsl:apply-templates name="child::*"/>
> >    </xsl:element>
> > </xsl:template>
> > 
> > <xsl:template match="@*">
> >   <xsl:attribute name="{name()}">
> >     <xsl:value-of select="."/>
> >   </xsl:attribute>
> > </xsl:template>
> > 
> > One thing I don't like about this is it assumes that you 
> > won't have stuff like this:
> > 
> > <kamal>this is a <bold>message</bold></kamal>
> > 
> > In this case, it is not necessary, but I would like to know 
> > if there is anyway of avoiding this?
> > 
> > Cheers.
> > 
> > Kamal.
> > 
> > 
> > 
> > --
> > Disclaimer: This email is confidential and may contain 
> > privileged information for the sole use of the person or 
> > business to which it is addressed. If you are not the 
> > intended recipient, please notify the sender by return e-mail 
> > or phone as you must not view, disseminate, distribute or 
> > copy this email without our consent. We do not accept any 
> > liability in connection with any computer virus, data 
> > corruption, incompleteness, or unauthorised amendment of this 
> > email. It is the sole responsibility of the receiver to scan 
> > for viruses before opening.

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-2013 All Rights Reserved.