Leading Spaces for NMTOKENs Do Not Produce an Error in oXyge
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 4
- Joined: Wed Dec 22, 2004 6:53 pm
Leading Spaces for NMTOKENs Do Not Produce an Error in oXyge
I was validating a file that had a leading space in an attribute value that was typed as "NMTOKEN". The NMTOKENs are not to contain any spaces, yet oXygen does not report an error if it contains either a leading or trailing space. Even the pop-up documentation for it says "they can not contain spaces".
How do I get oXygen to validate this correctly? Or is this a bug? I'm using oXygen v11.2.
Here's a screen shot:

Any help is most appreciated!
How do I get oXygen to validate this correctly? Or is this a bug? I'm using oXygen v11.2.
Here's a screen shot:

Any help is most appreciated!
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Leading Spaces for NMTOKENs Do Not Produce an Error in oXyge
Hello,
The whitespace facet for NMTOKEN is collapse and thus the leading and trailing spaces are removed before validation:
http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace
Best Regards,
George
The whitespace facet for NMTOKEN is collapse and thus the leading and trailing spaces are removed before validation:
http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace
Best Regards,
George
George Cristian Bina
-
- Posts: 4
- Joined: Wed Dec 22, 2004 6:53 pm
Re: Leading Spaces for NMTOKENs Do Not Produce an Error in oXyge
But... whitespace in the middle of text produces an error; it doesn't appear to be "collapsed" before validation, so why wouldn't the parser then produce a validation error when the space is either the first or last character of the attribute value as well?
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Leading Spaces for NMTOKENs Do Not Produce an Error in oXyge
Check the definition for collapse:
collapse
After the processing implied by replace, contiguous sequences of #x20's are collapsed to a single #x20, and leading and trailing #x20's are removed.
That means the whitespace at the beginning and at the end is removed while for the one in the middle remains a single space character for each continuous block of whitespace.
Best Regards,
George
collapse
After the processing implied by replace, contiguous sequences of #x20's are collapsed to a single #x20, and leading and trailing #x20's are removed.
That means the whitespace at the beginning and at the end is removed while for the one in the middle remains a single space character for each continuous block of whitespace.
Best Regards,
George
George Cristian Bina
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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