You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Han Ming Ong <ha...@mac.com> on 2004/03/31 07:05:00 UTC
Which feature flag in DOMWriter controls outputting as or
Hi all,
Sorry that I couldn't remember the W3C name for this feature.
Essentially, if element foo has an empty content model, I would like
DOMWriter to output <foo> instead of <foo></foo>. I know that they are
equivalent but I prefer the former syntax...
I don't think any of these flags change that behavior
// Introduced in DOM Level 3
// DOMWriter feature
static const XMLCh fgDOMWRTCanonicalForm[];
static const XMLCh fgDOMWRTDiscardDefaultContent[];
static const XMLCh fgDOMWRTEntities[];
static const XMLCh fgDOMWRTFormatPrettyPrint[];
static const XMLCh fgDOMWRTNormalizeCharacters[];
static const XMLCh fgDOMWRTSplitCdataSections[];
static const XMLCh fgDOMWRTValidation[];
static const XMLCh fgDOMWRTWhitespaceInElementContent[];
static const XMLCh fgDOMWRTBOM[];
static const XMLCh fgDOMXMLDeclaration[];
Any idea please?
Thanks, Han Ming
Re: Which feature flag in DOMWriter controls outputting as or
Posted by Han Ming Ong <ha...@mac.com>.
Alberto,
Xerces-2.5
Thanks for checking. Maybe the element has a Text children that is a
zero-length string because it is still showing <foo></foo>. I'll play
around.
Cheers.
On Mar 31, 2004, at 4:13 AM, Alberto Massari wrote:
> Hi Han Ming,
> by looking at the current sources for DOMWriterImpl, it already writes
> <foo/> if the element has no children. What version of Xerces are you
> using?
>
> Alberto
>
> At 21.05 30/03/2004 -0800, Han Ming Ong wrote:
>> Hi all,
>>
>> Sorry that I couldn't remember the W3C name for this feature.
>> Essentially, if element foo has an empty content model, I would like
>> DOMWriter to output <foo> instead of <foo></foo>. I know that they
>> are equivalent but I prefer the former syntax...
>>
>> I don't think any of these flags change that behavior
>>
>> // Introduced in DOM Level 3
>> // DOMWriter feature
>> static const XMLCh fgDOMWRTCanonicalForm[];
>> static const XMLCh fgDOMWRTDiscardDefaultContent[];
>> static const XMLCh fgDOMWRTEntities[];
>> static const XMLCh fgDOMWRTFormatPrettyPrint[];
>> static const XMLCh fgDOMWRTNormalizeCharacters[];
>> static const XMLCh fgDOMWRTSplitCdataSections[];
>> static const XMLCh fgDOMWRTValidation[];
>> static const XMLCh fgDOMWRTWhitespaceInElementContent[];
>> static const XMLCh fgDOMWRTBOM[];
>> static const XMLCh fgDOMXMLDeclaration[];
>>
>> Any idea please?
>>
>> Thanks, Han Ming
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Which feature flag in DOMWriter controls outputting as
or
Posted by Alberto Massari <al...@progress.com>.
Hi Han Ming,
by looking at the current sources for DOMWriterImpl, it already writes
<foo/> if the element has no children. What version of Xerces are you using?
Alberto
At 21.05 30/03/2004 -0800, Han Ming Ong wrote:
>Hi all,
>
> Sorry that I couldn't remember the W3C name for this feature.
> Essentially, if element foo has an empty content model, I would like
> DOMWriter to output <foo> instead of <foo></foo>. I know that they are
> equivalent but I prefer the former syntax...
>
> I don't think any of these flags change that behavior
>
> // Introduced in DOM Level 3
> // DOMWriter feature
> static const XMLCh fgDOMWRTCanonicalForm[];
> static const XMLCh fgDOMWRTDiscardDefaultContent[];
> static const XMLCh fgDOMWRTEntities[];
> static const XMLCh fgDOMWRTFormatPrettyPrint[];
> static const XMLCh fgDOMWRTNormalizeCharacters[];
> static const XMLCh fgDOMWRTSplitCdataSections[];
> static const XMLCh fgDOMWRTValidation[];
> static const XMLCh fgDOMWRTWhitespaceInElementContent[];
> static const XMLCh fgDOMWRTBOM[];
> static const XMLCh fgDOMXMLDeclaration[];
>
>Any idea please?
>
>Thanks, Han Ming
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org