This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: creating xml:lang attribute
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] creating xml:lang attribute
- From: "Chris Bayes" <Chris at Bayes dot co dot uk>
- Date: Fri, 30 Mar 2001 11:36:25 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
Nick,
I don't have any problems.
<?xml version="1.0" encoding="UTF-8"?>
<root xml:lang="en_gb">
<GROUP_NAME>aName</GROUP_NAME>
</root>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="Lang" select="/root/@xml:lang" />
<xsl:template match="root">
<NAME>
<xsl:attribute name="xml:lang"><xsl:value-of
select="$Lang"/></xsl:attribute>
<xsl:value-of select="GROUP_NAME"/>
</NAME>
</xsl:template>
</xsl:stylesheet>
Produces
<?xml version="1.0" encoding="utf-8"?><NAME xml:lang="en_gb">aName</NAME>
In Xalan Saxon Msxml Sablotron and Unicorn
Oracle produces
<?xml version = '1.0' encoding = 'UTF-8'?>
<NAME xmlns:xml="http://www.w3/org/XML/1998/namespace"
xml:lang="en_gb">aName</NAME>
Which is an error
Ciao Chris
XML/XSL Portal
http://www.bayes.co.uk/xml
>-----Original Message-----
>From: owner-xsl-list@lists.mulberrytech.com
>[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Nick Laqua
>Sent: 30 March 2001 10:51
>To: XSL-List@lists.mulberrytech.com
>Subject: [xsl] creating xml:lang attribute
>
>
>> Hi guys,
>>
>> I have a problem creating an xml:lang attribute in my output xml file:
>>
>> from xsl file:
>> ...
>> <NAME>
>> <xsl:attribute name="lang"><xsl:value-of
>> select="$Lang"/></xsl:attribute>
>> <xsl:value-of select="GROUP_NAME"/>
>> </NAME>
>> ...
>>
>> during processing, an error is thrown "Could not resolve namespace
>> prefix xml: ...". This doesn't work with Xalan, but with Saxon.
>>
>> any ideas ??
>>
>> Nick
>>
>> Nick Laqua
>> Manager Software Development
>>
>> newtron AG
>> Frankfurt - Dresden - Singapore - New Delhi
>>
>> Freiberger Straße 39 (im World Trade Center)
>> D 01067 Dresden
>>
>> phone: +49 (0) 351 4 39 58-130
>> fax: +49(0) 351 4 39 58-177
>> mobile: + 49(0) 171 87 81 303
>>
>> the global b2b portal:
>> http://www.newtron.net
>>
>>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list