You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Michael Glavassevich <mr...@ca.ibm.com> on 2005/09/07 06:39:30 UTC

Re: LSSerializer and empty elements?

Andy Kriger <an...@gmail.com> wrote on 08/30/2005 10:18:09 AM:

> Does LSSerializer have a way to control whether empty elements are
> written as <element/> or <element></element>?  We have an application
> that requires empty elements to be written in the first manner (even
> though they're both equivalent, it makes a difference to a non-XML
> saavy 3rd-party application we use).
> 
> Is there a way within the w3c API to accomplish this?
> Is there a way specific to Xerces?
> Can it be done with XSL?

There's a canonical-form parameter [1] but I suspect it doesn't do want 
you want and Xerces doesn't support setting it to true, so the answer to 
the first two questions is no and no and I suspect there's no standard 
method for specifying this format with XSLT. That said, I believe Xerces' 
serializer will write empty elements as an empty tag.

> Thx for any info you can provide
> -a
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
> 

[1] 
http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#parameter-canonical-form

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org