XML Doc Validation Errors
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 99
- Joined: Thu Oct 23, 2008 6:29 am
XML Doc Validation Errors
I have an XML document that I edit in Oxygen used by ant. This is a valid XML document, but oXygen shows the following error in the editor and to the right in red for the following attribute:
<javac memoryInitialSize="256M" />
E [Xerces] Attribute "memoryInitialSize" must be declared for element type "javac".
I can avoid seeing this error by turning off the option Editor, Document Checking, Validate as you type. I would rather not turn this off though. Is there a way I can add this attribute to oXygen so that it is not flagged as an error?
Thanks.
<javac memoryInitialSize="256M" />
E [Xerces] Attribute "memoryInitialSize" must be declared for element type "javac".
I can avoid seeing this error by turning off the option Editor, Document Checking, Validate as you type. I would rather not turn this off though. Is there a way I can add this attribute to oXygen so that it is not flagged as an error?
Thanks.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: XML Doc Validation Errors
Dear Jamil,
To validate ANT project files Oxygen uses a DTD grammar created by the ANT process. The DTD is located in OXYGEN_INSTALL_DIR\frameworks\ant\ant.dtd.
In that grammar the attribute is defined as memoryinitialsize (notice the all-lowercase). As XML is case sensitive that is why the validation complains.
From what it seems ANT itself does not care if the attribute is specified with lower-upper casing or lower casing.
So you have two options:
1) Modify the attribute name to memoryinitialsize in the project XML file.
2) Open the ant.dtd file from the path specified above, search for all memoryinitialsize occurrences and replace with memoryInitialSize
My recommendation is option number 1.
Regards,
Radu
To validate ANT project files Oxygen uses a DTD grammar created by the ANT process. The DTD is located in OXYGEN_INSTALL_DIR\frameworks\ant\ant.dtd.
In that grammar the attribute is defined as memoryinitialsize (notice the all-lowercase). As XML is case sensitive that is why the validation complains.
From what it seems ANT itself does not care if the attribute is specified with lower-upper casing or lower casing.
So you have two options:
1) Modify the attribute name to memoryinitialsize in the project XML file.
2) Open the ant.dtd file from the path specified above, search for all memoryinitialsize occurrences and replace with memoryInitialSize
My recommendation is option number 1.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
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