On 11 Oct 2000 00:42:25 PDT David Hedbor <[EMAIL PROTECTED]> wrote:
> Hey.
>
> I'm having a problem outputting non-html tags (ie non-container not
> defined in HTML). When I do <foo/> in the output when generating HTML
> I get <foo></foo>, since <foo> isn't a tag defined in
> XML. <xsl:text><foo/><xsl:text> gives the same result. If I do
> <![CDATA[<foo>]]> I get <foo> - that has to be a bug, yes?
>
> Anyway, how to I output HTML-lookalike tags in the output of type
> HTML? They are to be parsed in a server side, non-XML compliant
> language so <foo></foo> doesn't work (but <foo /> would work since
> the / would be ignored).
You can get pretty close to having XML and HTML compliance in one document,
but its not always possible. Moreover, as you are finding, the interpretation
of the document as XML or HTML comes with different assumptions about what can
be done to the document without changing its semantics.
My feeling is that its best to have a filtering stage which converts HTML-like
XML to HTML. You can nearly get away without it, but in the end, the problems
you have to sort out are more trouble than the filter.
* Character representation.
* empty tags
* value-less attributes
Andrew
--
--
Andrew McNaughton
[EMAIL PROTECTED]
Cellphone: +64 21 323 3076
[EMAIL PROTECTED]
http://www.scoop.co.nz/
[EMAIL PROTECTED]
http://www.tki.org.nz/