[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] short and long empty xml elements


Subject: Re: [xsl] short and long empty xml elements
From: Stephan Kahnt <stephan.kahnt@xxxxxxxxxx>
Date: Fri, 13 Oct 2006 14:10:53 +0200

Am Freitag, 13. Oktober 2006 12:54 schrieb Michael Kay:
> > a need to create a xml document that does not contain short
> > empty elements like <a/> but instead like this <a></a>. I
> > know this is the same, but the parser of the target system
> > does not recognize the first version.
>
> Bite the bullet. XML is a good thing because it's interoperable. If you
> have a parser that isn't a conformant XML parser, throw it out and get a
> new one, don't try to change the rest of the system to accommodate its
> weaknesses.

I do completely aggree. The point is that the target system is not in our
responsability but is used by a customer. I already tried to convince the
customer to replace the system: no way. So we can try to find a nasty
solution or we risk to loose the customer. We voted for the first way.

>
>
> I use xalan or saxon.
>
> > Is there a way to control the kind of output in XSLT ?
>
> No, but at the Java level there are facilities in Saxon to customize the
> serializer by subclassing the various components; you can register a
> SerializerFactory that causes your own custom components to be used in
> place of the standard ones.

If the other proposal of using XHTML-output does not work, we will think a
about this solution.

Tanks a lot.

--
Mit freundlichen Gr|_en / Best regards

Stephan Kahnt
inubit AG


Current Thread
Keywords