473,505 Members | 14,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Identity Transform with preservation of entities

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
document.
----------------------
TEST.XML
<?xml version="1.0" encoding="windows-1252"?>
<component>
<content>
<small>© Copyright</small>
</content>
</component>
----------------------

----------------------
TEST.XSL
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="xml" encoding="windows-1252"/>
<xsl:template match="/component">
<xsl:copy-of select="content/*"/>
</xsl:template>
</xsl:stylesheet>
----------------------

MSXSL TEST.XML TEST.XSL > OP.XML

----------------------
OP.XML
<?xml version="1.0" encoding="windows-1252"?>
<small>© Copyright</small>
----------------------

Desired output:
<?xml version="1.0" encoding="windows-1252"?>
<small>  Copyright</small>

Oct 4 '05 #1
1 1151
In article <11**********************@g49g2000cwa.googlegroups .com>,
<ca*****@gmail.com> wrote:
I need an identity XSLT that does not change the incoming XML document.
The trick is that I need the entities to be preserved.
Why? they are equivalent as XML documents.
My current
transform converts   to the copyright symbol in the output
document.


That's not technically an entity, it's a character reference.

There's no way to make XSLT not expand character and entity references
when it reads the file. However, if you specify an output encoding of
"ascii", then it will have to output references for all the characters
above 127.

-- Richard
Oct 4 '05 #2

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

Similar topics

112
10218
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please,...
2
1956
by: Daniel Walzenbach | last post by:
Hi I need to know how to transform a XML file by using a XSLT file. Consider the following XML file <?xml version="1.0" encoding="UTF-8" standalone="yes"?><LogFile><Dog TimeStamp="16.02.2004...
1
1374
by: Candle | last post by:
I am having a problem with writing an XSL Transform. Please help. Note: I know this a long post but I wanted to provide as must detail as possible. Any help would be appreciated. (Just started...
1
1511
by: Candle | last post by:
I am having a problem with writing an XSL Transform. Please help. Note: I know this a long post but I wanted to provide as must detail as possible. Any help would be appreciated. (Just started...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7018
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4699
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.