473,382 Members | 1,386 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,382 software developers and data experts.

Generating entities from XSLT

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;".

After the XSLT process, I _must_ preserve these character entity
references, i.e. I can't let them turn into "é".
Is there any way to do this ? Every combination of processor, XSLT
coding and sundry DTD and schema reference juggling causes the
processor to spit out "é" rather than "&ecaute;". I know this is
valid in context, but when I put it back into the rest of my system it
won't be.

So far the only reliable way I've found to reliably produce an entity
reference is like this:
<xsl:text disable-output-escaping="yes" >&amp;eacute;</xsl:text>

Obviously this is inflexible, and as <xsl:text> doesn't let me have
any child elements I can't do this dynamically, even by hairy
string-mangling.
Thanks for any assistance.
Jul 20 '05 #1
2 1433
Andy Dingley wrote:
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;".

After the XSLT process, I _must_ preserve these character entity
references, i.e. I can't let them turn into "é".
Is there any way to do this ?


encoding="us-ascii"?

xpost and f'up2 comp.text.xml
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2
Johannes Koch <ko**@w3development.de> wrote in message news:<2i************@uni-berlin.de>...
encoding="us-ascii"?


Sadly no (with the XSLT processors I've tested so far, anyway) - that
generates an entity, but it's a numeric entity rather than a character
reference. As the output from this goes back to manual editors, I'd
really like to preserve them in the "more readable" form.
Jul 20 '05 #3

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

Similar topics

1
by: Romeo Disca | last post by:
Hello, i just want to make an identity transformation of an xhml document and i don't want entities to be resolved. &nbsp; should result in &nbsp; and not ' '. Is there any chance to...
2
by: Iain | last post by:
Hey folks, I've got a problem with an XML to HTML transformation that is now bugging the heck out of me. Basically, all of the entities used in my transformation style sheet are being rendered...
3
by: Tjerk Wolterink | last post by:
Hello, i've a xsl document that should also allow xhtml entities like &nbsp; The top of the document looks like this; <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE xsl:stylesheet >
11
by: Tjerk Wolterink | last post by:
I've a problem in an xsl transformation. My xml input: --- input.xml --- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE xc:content > <xc:xcontent...
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;". ...
1
by: cawoodm | last post by:
I need an identity XSLT that does not change the incoming XML document. The trick is that I need the entities to be preserved. My current transform converts   to the copyright symbol in the output...
5
by: shauldar | last post by:
Is there a way (tool, hack...) to create an XSL:FO from an XSLT + XML files? My motivation is that we want to use a tool to design reports, and from that "design" generate both HTML (via XSLT)...
0
by: Dan | last post by:
I have built an XSLT extension C# class where a function receives as input a text and transforms some of its charcodes into entities, e.g. A with acute accent becomes &Aacute; and so forth. The...
1
by: Andy Fish | last post by:
Hi, In my aspx web application, I am generating a list of items in a menu down the left-hand side. Different items in the list may have different controls in, and this is data-driven at runtime....
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.