xsl-list
[Top] [All Lists]

RE: [xsl] Special character as element name

2007-01-25 01:35:16
<Body>
  <xsl:element name="{//Query/QueryHead/@URI}"/>        
</Body>

-----Original Message-----
From: San [mailto:san_sar(_at_)yahoo(_dot_)com]
Sent: Thursday, January 25, 2007 10:20 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Special character as element name

Dear all,

Many thanks for answering my questions the other day.
Now I encounter some problem, I search for the answer
but haven't got the right one.(using version 1.0 and
xalan)

Also This is my xml input file

<Query ID="2" >
  <QueryHead URI="#x">
  </QueryHead>
</Query>

I would like to have the output (getting the
attributes value) as the element name

<Body ID="2" >
  <#x/>
</Body>

I am trying using this xslt file (below), which ok if
the attributes value not special character (X without
#)but not #x

<Body>
  <xsl:element name="{//Query/@URI}"/>
</Body>

I tried several possibility, first I used the unicode
for replacing this # with hexadecimal. stil not work,
then I change the encoding type in the xslt file

<?xml version="1.0" encoding="iso-8859-1"?>

<xsl:output method="xml" indent="yes"
encoding="ISO-8859-1"/>

Stil doesn't give me result.
I really stuck with this :(

thanks a lot for your help
san





________________________________________________________________________
__
__________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>