This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: mystery #3: rendering embedded HTML
- From: "Oleg Tkachenko" <olegt at multiconn dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Sat, 13 Apr 2002 20:07:20 +0200
- Subject: RE: [xsl] mystery #3: rendering embedded HTML
- Reply-to: xsl-list at lists dot mulberrytech dot com
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Gary
> Lawrence Murphy
> Valid HTML is not necessarily valid XML. For example: <p> and <br>
> and as regular use of Tidy shows, the fixups are not always automatic;
> valid and displayable HTML can contain severe ambiguities.
You can try to resolve those ambiguities at input step, I know that means additional task for user, but that's worthwhile one anyway imho. Alternatively you can use d-o-e as people pointed out, just make sure it works in your environment, because it's optional feature.
> What's more, if DTD validation of the envelope were required (and it
> is for data integrity across the transport and because xsl document()
> validation in xalan cannot be turned off) would I not need all
> possible XHMTL DTDs in the XML envelope DTD to accommodate all
> possible variations of that one text block?
I'm sure validation can be turned off, but anyway, both DTD and XML Schema have facilities for extending content model. In DTD you can declare <!ELEMENT data ANY> and in schema you have even more precise control by <xs:any> instruction:
<element name="htmlExample">
<complexType>
<sequence>
<any namespace="http://www.w3.org/1999/xhtml"
minOccurs="1" maxOccurs="unbounded"
processContents="skip"/>
</sequence>
</complexType>
</element>
---
Oleg Tkachenko,
Multiconn International, Israel
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list