XML inside HTML question

Andrew McNaughton andrew at squiz.co.nz
Fri Mar 19 01:23:08 GMT 1999


rudman at idetix.com said:
> Challenge: 
> 
> I have a tag-based scripting language to be used with web pages (HTML).  I
> want this scripting language to be XML-based, despite the fact that the XML
> tags will exist within the confines of the non-well-formed HTML.
> 
> Is there a way to write a DTD that covers all of that in a way that lets me
> use an XML parser to get my stuff out and treat all the other stuff that's
> not mine (HTML, text, other people's XML tags, etc.) as CDATA, or something
> similar?
> 
> This would be great... then I could assume XML to deal with my own scripting
> language but I examine everything else in the context of simple CDATA rather
> than trying to parse it out as a full-blown tag tree.

I'm doing this using CDATA as an interim step in development (the system is 
live).  I'm looking at moving to having some tags which my XML app is 
interested in exposed, and the rest character-entity-encoded.  To recover my 
original HTML I'd need to do a single round of entity decoding on all entities 
outside of tags.  I'm a bit concerned though that this strategy will not be 
well supported by stylesheet languages.  Perhaps I need to use lots of small 
CDATA sections.  I'm still investigating

Andrew McNaughton





-- 
-----------
Andrew McNaughton
andrew at squiz.co.nz
http://www.newsroom.co.nz/



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list