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

RE: Differing behavior of Xalan and Saxon with namespa

Subject: RE: Differing behavior of Xalan and Saxon with namespaces. Who's right?
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 14 Mar 2003 09:44:50 -0000
christine stamatis
The output you are expecting is the correct output, and is the output
that I get from all the versions of Saxon that I have tried it on.

Please add to your stylesheet the line:

<xsl:value-of select="system-property('xsl:vendor')"/>

which will confirm which XSLT processor you are using when you get the
incorrect behavior. I don't believe that it is any recent release of
Saxon.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


> 
> Sorry for being vague Tom.  Here's the input:
> 
> <?xml version="1.0"?>
> <FitnessCenter>
>         <Member level="platinum">
>                 <Name>Jeff</Name>
>                 <Phone type="home">555-1234</Phone>
>                 <Phone type="work">555-4321</Phone>
>                 <FavoriteColor>lightgrey</FavoriteColor>
>         </Member>
>         ...
> </FitnessCenter>
> 
> Here's the stylesheet:
> 
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                 xmlns:fit="http://www.keeping-fit.org"
>                 version="1.0">
>  
>     <xsl:output method="xml"/>
> 
>     <xsl:template match="FitnessCenter">
>         <FitnessCenter>
>             <xsl:apply-templates/>
>         </FitnessCenter>
>     </xsl:template>
> 
>     <xsl:template match="*">
>         <xsl:element name="{name(.)}">
>             <xsl:for-each select="@*">
>                 <xsl:attribute name="{name(.)}">
>                     <xsl:value-of select="."/>
>                 </xsl:attribute>
>             </xsl:for-each>
>             <xsl:apply-templates/>
>         </xsl:element>
>     </xsl:template>
> 
> </xsl:stylesheet>
> 
> Note the namespace declaration at the top of the stylesheet:
> 
>     xmlns:fit="http://www.keeping-fit.org"
> 
> Here's what I want the output to look like (and this is what 
> Xalan gives, but not Saxon):
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <FitnessCenter xmlns:fit="http://www.keeping-fit.org">
>         <Member level="platinum">
>                 <Name>Jeff</Name>
>                 <Phone type="home">555-1234</Phone>
>                 <Phone type="work">555-4321</Phone>
>                 <FavoriteColor>lightgrey</FavoriteColor>
>         </Member>
>         ...
> </FitnessCenter>
> 
> Notice how the namespace declaration from the stylesheet has 
> been "carried over" to the result document (again, only with 
> Xalan, but not Saxon).  How do I get Saxon to "carry over" 
> the namespace declaration to the result file?  /Roger
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


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