XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
siva ramanSubject: entity conversion
Author: siva raman
Date: 21 Mar 2005 01:59 AM
Hello All,

pls help me in entity conversion in xml to xml mapping.
I need the same entity name (e.g. –) should come in output xml file.
Now I am using a entity file (with unicode values) with my xslt and get symbols instead of entities.


thanks
Siva

Postnext
Ivan PedruzziSubject: entity conversion
Author: Ivan Pedruzzi
Date: 21 Mar 2005 04:36 PM

Could you post the XSLT + XML you are using?

Postnext
siva ramanSubject: entity conversion
Author: siva raman
Date: 22 Mar 2005 09:41 AM
Hai Ivan,

thanks for your reply.

Pls find the files, by which i am transforming xml to xml.



thanks
Siva


Unknowncheck.ent
entity

Unknownconvert.xsl
xsl

Unknowninput(2).xml
input

Postnext
Ivan PedruzziSubject: entity conversion
Author: Ivan Pedruzzi
Date: 22 Mar 2005 10:14 AM
Siva

to output a dtd declaration you have to use

<xsl:output method="xml" encoding="UTF-8" doctype-system="http://public.metapress.com/dtd/TAFXML/TFJA.dtd" indent="yes"/>


Postnext
siva ramanSubject: entity conversion
Author: siva raman
Date: 22 Mar 2005 10:27 AM
Ivan

thanks for ur reply,

can u pls send reply for regarding the entity conversion.
My requirement is entity name should be same as in input xml.


thanks
Siva

Posttop
Tony LavinioSubject: entity conversion
Author: Tony Lavinio
Date: 22 Mar 2005 11:56 AM
In any XSLT engine, you cannot see the original entities.
The XML parser converts them into Unicode code-points, so XSLT only
sees them that way.

If you want to emit them again as entities, you must do the work
yourself.

XSLT 2.0 has a mechanism for handling that; you can build character-maps
(see http://www.w3.org/TR/xslt20/#character-maps for details). But there
is no way in XSLT itself to say "I saw a &tm; come in, and I want to
write it out as a &tm;" because that's the job of the serializer, which
comes AFTER the XSLT is done with the transform.

If you know the specific code-points, you can manually replace them,
but again that's harder in XSLT 1.0 since there is no search-and-replace
function like there is in 2.0, but one can be simulated. For help on
that, I would probably recommend the XSLT Cookbook by Sal Mangano.

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.