RE: [xsl] attribute of a single-tag node

Subject: RE: [xsl] attribute of a single-tag node
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 17 Nov 2006 09:24:38 -0000
> I already had the output set to html. But I'm actually not 
> creating an img-element, but a graph-element. This is a tag 
> we created for our own purposes. It has no closing tag, and 
> if it is added, the parser  
> doesn't handle it that gracefully. Apparently the closing tag for   
> <graph> is automatically added in the output-file even when I 
> don't put it in the xsl-file. Is there some way I can prevent 
> this? Or should I ask them to change the parser?

It would be the serializer that needs to change, not the parser.

The HTML output method will use self-closing tags for elements that are
defined in the HTML specification to have an empty content model. The
serializer doesn't know anything about your private extensions to HTML, so
it uses the XML conventions for these. You will have to check with the
product vendor whether they allow the serializer to be customized, or you
will have to write your own serializer.

Why are you doing this? If you want a markup language that allows user
extensions, there's a rather good one called XML.

Michael Kay
http://www.saxonica.com/

Current Thread