Default schema not validating in eclipse
Having trouble installing Oxygen? Got a bug to report? Post it all here.
Default schema not validating in eclipse
Post by gavinm »
Eclipse 3.0 M3 Mac OS X oxygen 2.0.4
I select a default schema for code insight (my.dtd) and the validation fails.
If I declare
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="my.dtd"
as attributes of the root element then validation works.

I select a default schema for code insight (my.dtd) and the validation fails.
If I declare
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="my.dtd"
as attributes of the root element then validation works.

-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
The default schema for code insight is used for driving the code completion in cases when a schema or a dtd is not specified in a document.
To have a document validated against a schema or a DTD you should specify that schema or DTD in the document. A DTD can be specified using a DOCTYPE declaration, a W3C XML Schema can be specified using xsi:schemaLocation or xsi:noNamespaceSchemaLocation attributes where xsi is mapped to the http://www.w3.org/2001/XMLSchema-instance namespace. In the Relax NG case there is no specified way to make an association of a document with a Relax NG schema therefore you can either specify it on the validate with Relax NG action dialog or use the oxygen processing instruction.
See below same sample documents.
DTD specification:
XML Schema specification:
Relax NG schema specification:
Best Regards,
George
The default schema for code insight is used for driving the code completion in cases when a schema or a dtd is not specified in a document.
To have a document validated against a schema or a DTD you should specify that schema or DTD in the document. A DTD can be specified using a DOCTYPE declaration, a W3C XML Schema can be specified using xsi:schemaLocation or xsi:noNamespaceSchemaLocation attributes where xsi is mapped to the http://www.w3.org/2001/XMLSchema-instance namespace. In the Relax NG case there is no specified way to make an association of a document with a Relax NG schema therefore you can either specify it on the validate with Relax NG action dialog or use the oxygen processing instruction.
See below same sample documents.
DTD specification:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE personnel SYSTEM "personal.dtd">
<personnel>
</personnel>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation='personal.xsd'>
</personnel>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="test/rng/test1.rng" type="xml"?>
<foo>
</foo>
George
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