Circumventing entity conversion. Can Xalan help?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jazzdman@comcast.net

    Circumventing entity conversion. Can Xalan help?

    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

    #2
    Re: Circumventing entity conversion. Can Xalan help?

    OK, I found the answer :



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

    Cool.

    Comment

    • David Carlisle

      #3
      Re: Circumventing entity conversion. Can Xalan help?


      disable-output-escaping="yes"

      David

      Comment

      • Peter Flynn

        #4
        Re: Circumventing entity conversion. Can Xalan help?

        jazzdman@comcas t.net wrote:
        [color=blue]
        > 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.[/color]

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

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

        Comment

        Working...