Subject: RE: [xsl] Variance between XSLT engines when outputting HTML with a namespace From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Thu, 6 Sep 2001 12:22:07 +0100 |
I will defend the Saxon interpretation. But unfortunately it's another case of a common stylistic fault in the XSLT spec: one statement (the first paragraph quoted) is intended to take precedence over another statement (the second one quoted) but it doesn't say so unambiguously. Mike Kay > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of > Jarno.Elovirta@xxxxxxxxx > Sent: 06 September 2001 05:15 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Variance between XSLT engines when outputting > HTML with a > namespace > > > Hip hei! > > Say we have > > <?xml version="1.0" encoding="ISO-8859-1"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns="http://www.w3.org/TR/REC-html40"> > > <xsl:output method="html" > indent="yes" > encoding="ISO-8859-1" /> > > <xsl:template match="/"> > <html> > <head> > <title/> > </head> > <body> > <p> > <br/> > </p> > </body> > </html> > </xsl:template> > > </xsl:stylesheet> > > The "HTML 4.01 namespace" shouldn't be there as there are no > namespaces in > SGML, but J. Clark used it in "Namespaces in XML" [1] and > I've seen people > use it. Anyhow, the XSLT 1.0/1.1 says > > "The html output method should not output an element > differently from the > xml output method unless the expanded-name of the element has a null > namespace URI; an element whose expanded-name has a non-null > namespace URI > should be output as XML. If the expanded-name of the element > has a null > namespace URI, but the local part of the expanded-name is not > recognized as > the name of an HTML element, the element should output in the > same way as a > non-empty, inline element such as span. > > The html output method should not output an end-tag for empty > elements. For > HTML 4.0, the empty elements are area, base, basefont, br, > col, frame, hr, > img, input, isindex, link, meta and param. For example, an > element written > as <br/> or <br></br> in the stylesheet should be output as <br>." [2] > > Here's what the XSLT processors on my computer did: > > output NS omit end-tag > jd.xslt 1.1 no yes > XT 19991105 yes yes > Xalan-J 2.2.D10 yes no > MSXML 3 yes no > SAXON 6.4.3 yes yes > Oracle-J 9.0.2.0.0A Beta yes yes > > If I've interpreted the spec correctly, Xalan and MSXML are > right. Right? > > Jarno > > [1] http://www.w3.org/TR/REC-xml-names/ > [2] http://www.w3.org/TR/xslt#section-HTML-Output-Method > > -- > A Tank. Dead butch but a bugger to park. > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Variance between XSLT engines, Jarno . Elovirta | Thread | [xsl] referring to previous element, Senthilkumar Arunach |
Re: [xsl] How to match a cdata sect, Trevor Nash | Date | RE: [xsl] referring to previous ele, Michael Kay |
Month |