Document Won't Validate
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 5
- Joined: Wed Nov 28, 2007 7:45 pm
- Location: Omaha, Nebraska
Document Won't Validate
Oxygen says this document is invalid:
The error message is:
I checked the schema & the schema it extends, & both use elementFormDefault="unqualified". The constraint I face is the corporate framework I use requires that my documents have a default namespace, so I can't use prefixes. I can get the document to validate if I use prefixes, but can't find a way to validate it with a default namespace.
I'd include the schemas, but they're long & I don't see a way to attach a file to a forum topic. Would be happy to e-mail them, though.
Code: Select all
<get-request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://services.www.up.com/track/physical/get/1.0 get-track.xsd"
xmlns="http://services.www.up.com/track/physical/get/1.0">
<validate />
<system-number>1</system-number>
</get-request>
Code: Select all
SystemID: C:\Documents and Settings\ctxd222\workspace\TNS Services\config\schemas\get-track\1.0\Untitled2.xml
Engine name: Xerces
Severity: error
Description: cvc-complex-type.2.4.a: Invalid content was found starting with element 'validate'. One of '{validate, system-number}' is expected.
Start location: 4:6
End location: 4:14
URL: http://www.w3.org/TR/xmlschema-1/#cvc-complex-type
I'd include the schemas, but they're long & I don't see a way to attach a file to a forum topic. Would be happy to e-mail them, though.
-
- Posts: 5
- Joined: Wed Nov 28, 2007 7:45 pm
- Location: Omaha, Nebraska
Re: Document Won't Validate
I did more fiddling, and found this form of the document will validate:
But surely the caller shouldn't be forced to put xmls="" on every element? Is there a compact way to declare that every element is in no namespace?
Code: Select all
<get-request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://services.www.up.com/track/physical/get/1.0 get-track.xsd"
xmlns="http://services.www.up.com/track/physical/get/1.0">
<validate xmlns="" />
<system-number xmlns="" >1</system-number>
</get-request>
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Document Won't Validate
You can reset the default namespace only on an ancestor element. In your case that is the root element and you mentioned that you want to specify that with no prefix so it is not possible to have the default namespace for root and also the xmlns="" for the children.
Best Regards,
George
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