Re: Annoying problem: embedded HTML in body of documentation tag

  • To: THREDDS discussions <thredds@xxxxxxxxxxxxxxxx>
  • Subject: Re: Annoying problem: embedded HTML in body of documentation tag
  • From: Roland Schweitzer <rhs@xxxxxxxxxxxx>
  • Date: Mon, 18 Nov 2002 14:55:51 -0600

Boy, this solves a bunch of problems for me, both with THREDDS catalogs and XML FGDC files.


If found this succinct explanation of the CDATA marker at:
How to Handle CDATA Sections in XML Files
Using the Java[tm] Platform APIs for XML Parsing (JAXP)

by Michelle Cope
(April 2002)

We want to hear from you! Please send us your FEEDBACK.

The following article may contain actual software programs in source code form. This source code is made available for developers to use as needed, pursuant to the terms and conditions of this license.

XML files often contain character data that an enclosing application requires to extract as presented - for example, input data for a subroutine or XML markup to be displayed in a browser. Any parser parsing the XML file should not interpret this character data and present it to the application unchanged. Any character data marked as a CDATA section in an XML file will not be interpreted by the parser. An example of a CDATA section is as follows:

<![CDATA[Hello this is the content of a CDATA section]]>

All CDATA sections have three components: a CDATA start marker, ' <![CDATA', a character content body. For example, "Hello this is the content of a CDATA section", and a CDATA end marker, ']]>'. A CDATA section is often used for character data that includes special XML characters, such as '&' and '<' that need to be preserved for the calling application.

Joe Wielgosz wrote:

Hi Benno,
1) you can always use it. it is part of the basic XML syntax definition.
2) mail client behavior - i am constantly hitting reply thinking the
reply will go to the mailing list, but it goes to the sender instead..

- Joe
On Mon, 2002-11-18 at 11:02, Benno Blumenthal wrote:

Joe Wielgosz wrote:


Have you considered using the CDATA marker?

- Joe

Until you mentioned it, I had never heard of it.

1) can I always use it, or does it have to be declared in the DTD?
2) why didn't you post the suggestion to THREDDS -- I suspect I am not the
only one unaware.


On Fri, 2002-11-15 at 12:53, Martin Benno Blumenthal wrote:

I mention this only because it is an issue that should be addressed:
personally it seems more of a pain than anything else.

Text that I use to construct the contents of the documentation tag

This is the text I mean

occasionally has embedded html in it, mostly the <b></b> and <i></i>
needed to do paper references.   These tags are technically illegal in
our xml document,    so I am supposed to change the < and > to an entity
and then it will parse.  That, however, changes the meaning of the
string, i.e. HTML no longer thinks they are tags, either.   I could take
the tags out, but then I lose meaning, albeit not a lot.

So could we allow some formatting in the documentation?   Alternatively,
can we allow meaningless tags as far as XML is concerned?


Joe Wielgosz / joew@xxxxxxxxxxxxx
Center for Ocean-Land-Atmosphere Studies (COLA)
Institute for Global Environment and Society (IGES)

Dr. M. Benno Blumenthal          benno@xxxxxxxxxxxxxxxx
International Research Institute for climate prediction
The Earth Institute at Columbia University
Lamont Campus, Palisades NY 10964-8000   (845) 680-4450

  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: