473,385 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XSLT: Output of character references

Hi,

I have an xml like this simplified sample:

<root>
<a u=0105/>
</root>

I want to transform this xml to html and want to put out the glyph of
unicode character 0105(hex).

I tried this:

<xsl:template match="a">
<xsl:text>&#x</xsl:text>
<xsl:value-of select="@u"/>
<xsl:text>;</xsl:text>
</xsl:template>

This occurs an error! Is it possible to do this?
Has someone an idea?

Thanks for your help
Bye
Markus

Jul 20 '05 #1
2 1307
Markus Wiedenmaier wrote:
I want to transform this xml to html and want to put out the glyph of
unicode character 0105(hex).

I tried this:

<xsl:template match="a">
<xsl:text>&#x</xsl:text>
<xsl:value-of select="@u"/>
<xsl:text>;</xsl:text>
</xsl:template>

This occurs an error! Is it possible to do this?
Has someone an idea?


Try this:

<xsl:template match="a">
<xsl:text disable-output-escaping="yes">&amp;#x</xsl:text>
<xsl:value-of select="@u"/>
<xsl:text>;</xsl:text>
</xsl:template>
JW

Jul 20 '05 #2
Great!Thanks for your fast help.
Bye
Markus
"Janwillem Borleffs" <jw@jwscripts.com> schrieb im Newsbeitrag
news:40***********************@news.wanadoo.nl...
Markus Wiedenmaier wrote:
I want to transform this xml to html and want to put out the glyph of
unicode character 0105(hex).

I tried this:

<xsl:template match="a">
<xsl:text>&#x</xsl:text>
<xsl:value-of select="@u"/>
<xsl:text>;</xsl:text>
</xsl:template>

This occurs an error! Is it possible to do this?
Has someone an idea?


Try this:

<xsl:template match="a">
<xsl:text disable-output-escaping="yes">&amp;#x</xsl:text>
<xsl:value-of select="@u"/>
<xsl:text>;</xsl:text>
</xsl:template>
JW

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Christian Roth | last post by:
Hello, when using this "identity" processing sheet: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="iso-8859-1" /> ...
2
by: Andy Dingley | last post by:
I have some (somewhat ragged) HTML, and I wish to pre-process it with XSLT before putting it back onto the server. Throughout this HTML are many character entity references, such as "&ecaute;". ...
13
by: Tjerk Wolterink | last post by:
Hello i've an xsl stylesheet that must support xhtml entities, my solution: ---- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE xsl:stylesheet > <xsl:stylesheet version="1.0"...
3
by: danmc91 | last post by:
Hi, I'm just getting going with xml and xslt. I'm trying to write what are essentially man pages and I need 3 output formats. 1) nroff -man format for real man pages 2) html for an online...
2
by: Lionel Fourquaux | last post by:
In .Net 1.1, System.Xml.Xsl.XslTransform cannot output directly a document in an encoding that cannot represent all the characters used (e.g. write in us-ascii for compatibility, and convert all...
7
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID...
3
by: Bloody Viking | last post by:
Namaste, Y'all! I've got a problem I'm hoping one of you can solve. My stylesheet has the following bit of code: <xsl:template match="web|WEB"> <xsl:variable name="url"> <xsl:value-of...
5
by: Newbie | last post by:
The answer to this is probably obvious, but I'm somewhat new to XSLT and can't find it. I need to sort a set of nodes within a document, e.g. <A> <B/> <C> <D>3</D> <D>2</D>
11
by: cmay | last post by:
I am having this problem... Lets say that your source XML is formatted like this: <somenode> Here is some text Here is some more text </somenode> When to a <xsl:value-of select="somenode" /I...
1
by: qbp90x5lb | last post by:
I'm using an XSLT transform to output the element value contents from a simple XML file into a new .TXT file. Everything works fine except for certain XML files, when calling msxsl with the .xslt, I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.