Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Empty element match

From: David Carlisle <davidc@---.--.-->
To: NULL
Date: 7/1/2005 11:50:00 AM

> I'm sending it as html now, with output method set to html,
> but then my document is not valid anymore,

XSLT does not ensure its output is valid, it is the responsibility of
the stylesheet author to do that. If the stylesheet generates an
element foobar then xslt will happily write <foobar>..</foobar>
and the resulting html will not validate.

If you were writing valid xhtml and you change the method to html and
change the doctype to specify an html dtd then it is very unlikely that
the result is invalid html. What validation error do you get?



> elements like <meta and <br> are not closed now,
> does html transitional force you to close them??

They are declared EMPTY in the HTML DTD so they are never opened and
don't need (and can't be) closed. HTML is not an XML language and doesn't
use XML syntax.  <br> is the correct syntax for the element (or <BR> as
html is not case sensitive) <br></br> is a syntax error, <br/> is
legal syntax but equivalent to <br>&gt; and should (on a conformant system)
typeset a > after the newline. (Most browsers though don't do this, but
then they don't use conformant html parsers, they use purpose built
parsers aimed to do "something sensible" even in the face of incorrect
markup)

> But the processor at the hostingprovider does not understand it.
> It makes me crazy

The XSLt spec specifies that <xsl:output method="html" must be
understood (that is, not generate an xslt error) but  any xslt system may
always ignore the xsl:output instruction and use its own system
specific methods to output the file. (For example in cocoon the output
from xslt is always piped to another trandformation process or
serialiser and so not serialised under the control of the stylesheet and
xsl:output is ignored.

> I thought xsl was a standard, but each processor handles that standard 
> differently

At places where the standard explictly authorises this difference.

David



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent