Loading ...
Sorry, an error occurred while loading the content.

Re: [svg-developers] Question for Paul Prescod? (quasi nested CDATA)

Expand Messages
  • AndrewWatt2001@aol.com
    In a message dated 01/11/2002 01:29:32 GMT Standard Time, ... Wesley, Yep. Don t do it. :) As far as I am aware the most realistic solution is simply to avoid
    Message 1 of 4 , Oct 31, 2002
    • 0 Attachment
      In a message dated 01/11/2002 01:29:32 GMT Standard Time,
      wesley@... writes:


      > Does anyone have a favorite idiom to deal with this sort of thing?

      Wesley,

      Yep. Don't do it. :)

      As far as I am aware the most realistic solution is simply to avoid using
      CDATA sections in the SVG/XML document that you plan to treat in the way you
      suggest.

      Andrew Watt


      [Non-text portions of this message have been removed]
    • Max Dunn
      ... Yep, and back up and describe the situation that you think demands such a solution in the first place. Max
      Message 2 of 4 , Nov 1, 2002
      • 0 Attachment
        > As far as I am aware the most realistic solution is simply
        > to avoid using CDATA sections in the SVG/XML document that
        > you plan to treat in the way you suggest.

        Yep, and back up and describe the situation that you think demands such
        a solution in the first place.

        Max
      • Paul Prescod
        ... Believe it or not, I missed this whole thread. Sorry! ... You can replace ]] with something like ]] ]] . Ugly? You betcha! Paul Prescod
        Message 3 of 4 , Nov 8, 2002
        • 0 Attachment
          wesleytperkins wrote:
          > This is a question I posted earlier which did not receive any
          > satisfactory answer. Given the accumulation of XML talent in this
          > newsgroup I am trying again:

          Believe it or not, I missed this whole thread. Sorry!

          > ...
          > I would like to include the entire text of one SVG file as unparsed
          > content in in another SVG file -- possibly as the text content of a
          > <desc> element or a custom element. An obvious way to do this is to
          > use a CDATA section to mark the included text as unparsed content.
          > However this will not work if the included text also contains CDATA
          > sections, since these can not be nested:
          >
          > http://www.w3.org/TR/2000/REC-xml-20001006#sec-cdata-sect
          >
          > This must be a common XML problem and I'm curious if there is some
          > recommended solution. One non-general solution would be to replace
          > internal CDEnd tokens ']]>' by an unusual combination of characters.
          > A more general solution would be to encode the entire contents.
          >
          > Does anyone have a favorite idiom to deal with this sort of thing?

          You can replace "]]>" with something like "]]>]]<![CDATA[>". Ugly? You
          betcha!

          Paul Prescod
        Your message has been successfully submitted and would be delivered to recipients shortly.