xsl-list
[Top] [All Lists]

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

2006-11-17 00:41:21

On 16 Nov 2006, at 16:21, Michael Kay wrote:

sorry for my probably incorrect terminology, but when I say
single- tag nodes I mean a node like <img src="..."> in HTML.

As far as the result tree is concerned, you just want an empty element - an
element with no children.

But you seem more concerned with serialization. Just specify <xsl:output
method="xml"/> or <xsl:output method="html"/> and you will get a
serialization that works. It might not be exactly how you wanted it, but it
will be equivalent.

Hi,

thanks, the suggestion about setting the attribute works.

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?

thanks, Nico

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--