AuthorDocumentFragment.isEmpty()
Oxygen general issues.
-
- Posts: 2
- Joined: Fri Feb 26, 2010 1:42 am
AuthorDocumentFragment.isEmpty()
Post by cleciovarjao »
Hi,
Is "isEmpty()" method supposed to tell if the element content is empty?
for instance, would <p type="abc"/> return true? as now (11.2) I'm getting false. Is it because of the attributes?
I'm not sure but I believe it was returning true on previous versions.
Thanks
Is "isEmpty()" method supposed to tell if the element content is empty?
for instance, would <p type="abc"/> return true? as now (11.2) I'm getting false. Is it because of the attributes?
I'm not sure but I believe it was returning true on previous versions.
Thanks
Re: AuthorDocumentFragment.isEmpty()
Hi Clecio,
The isEmpty implementation returns true if nothing is contained in the fragment (no text, no nodes). It has always worked this way.
If you want to check that an empty element is inside, you can look at the getContentNodes() for example, check that it contains a single node and at the getLength() to see that it is 2-corresponding to the two content markers added by the single node.
Regards,
Radu
The isEmpty implementation returns true if nothing is contained in the fragment (no text, no nodes). It has always worked this way.
If you want to check that an empty element is inside, you can look at the getContentNodes() for example, check that it contains a single node and at the getLength() to see that it is 2-corresponding to the two content markers added by the single node.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service