• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XSLT with name space

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to create a xml line:
<originalLocale xml:lang="EN"/>
from
<develLc>EN</develLc>,
so I wrote the xslt as:
<xsl:element name="originalLocale">
<xsl:attribute name="xml:lang" namespace="http://www.w3.org/XML/1998/namespace">
<xsl:value-of select="locale/develLc"/>
</xsl:attribute>
<xsl:element>
But the result is always like:
<originalLocale xmlns:xml="http://www.w3.org/XML/1998/namespsace" xml:lang="EN"/> which not supported by the xml IE browser
How can I remove the xmlns attribute?
Thanks in advance,
Roy
[ June 08, 2003: Message edited by: Roy Huang ]
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instead of using <xsl:element> and <xsl:attribute>, you can write
<originalLocale xml:lang="{locale/develLc}"/>
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take this out of your XSLT
namespace="http://www.w3.org/XML/1998/namespace"
then your problem is also solved.
 
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic