Validating Autodesk Volview
Having trouble installing Oxygen? Got a bug to report? Post it all here.
Validating Autodesk Volview
Post by Guest »
When trying to validate a document created in Autodesk's VoloView, I get the following message:
E cvc-elt.1: Cannot find the declaration of element 'RedlineXML'. andrew_test.xml file:/home/andrew/sample_data/andrew_test.xml 2:1
These are the first two lines of the xml file. Can anyone point me in the right direction of of what is going on? Also would this be the reason why an XPath query for /* returns /RedlineXML[1], whilst a query for /RedlineXML[1] returns no results?
Many thanks,
A
<?xml version="1.0" encoding="UTF-8"?>
<RedlineXML xmlns="urn:autodesk_com:dsd:RedlineXML_v_002.xdr" xmlns:redline="urn:autodesk_com:dsd:RedlineXML_v_002.xdr" xmlns:VoloView="urn:autodesk_com:dsd:VoloView_v_001.xdr" xmlns:acdb="urn:autodesk_com:dsd:RMLFilterAcDb_v_001.xdr">
E cvc-elt.1: Cannot find the declaration of element 'RedlineXML'. andrew_test.xml file:/home/andrew/sample_data/andrew_test.xml 2:1
These are the first two lines of the xml file. Can anyone point me in the right direction of of what is going on? Also would this be the reason why an XPath query for /* returns /RedlineXML[1], whilst a query for /RedlineXML[1] returns no results?
Many thanks,
A
<?xml version="1.0" encoding="UTF-8"?>
<RedlineXML xmlns="urn:autodesk_com:dsd:RedlineXML_v_002.xdr" xmlns:redline="urn:autodesk_com:dsd:RedlineXML_v_002.xdr" xmlns:VoloView="urn:autodesk_com:dsd:VoloView_v_001.xdr" xmlns:acdb="urn:autodesk_com:dsd:RMLFilterAcDb_v_001.xdr">
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
In order to validate an XML document with an XML Schema you need to associate that schema with the document. This is done using the schemaLocation attribute from the http://www.w3.org/2001/XMLSchema-instance namespace. Something like below:
Also note that XDR schemas are deprecated. XDR was a Microsoft schema language but was dropped in favor of W3C XML Schema. Oxygen does not support XDR.
Regarding the XPath issue. This is a FAQ. XPath does not know default namespaces, so when you have:
/RedlineXML[1]
that means RedlineXML from no namespace. Your document contains a RedlineXML element but it is from the urn:autodesk_com:dsd:RedlineXML_v_002.xdr namespace so the XPath expression does not match it.
You need a prefix to access any node that belongs to a namespace. Oxygen will map the default namespace to the first unused prefix from {default, default1, default2, ...} so if you try
/default:RedlineXML[1]
it should work.
Best Regards,
George
In order to validate an XML document with an XML Schema you need to associate that schema with the document. This is done using the schemaLocation attribute from the http://www.w3.org/2001/XMLSchema-instance namespace. Something like below:
Code: Select all
<ipo:purchaseOrder orderDate="1999-12-01" xmlns:ipo="http://www.example.com/IPO"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.com/IPO ipo.xsd">
</ipo:purchaseOrder>
Regarding the XPath issue. This is a FAQ. XPath does not know default namespaces, so when you have:
/RedlineXML[1]
that means RedlineXML from no namespace. Your document contains a RedlineXML element but it is from the urn:autodesk_com:dsd:RedlineXML_v_002.xdr namespace so the XPath expression does not match it.
You need a prefix to access any node that belongs to a namespace. Oxygen will map the default namespace to the first unused prefix from {default, default1, default2, ...} so if you try
/default:RedlineXML[1]
it should work.
Best Regards,
George
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Andrew,
Please make sure you have oXygen 5 as this feature was added recently. Also you should have a default namespace in your document, for instance if the document is:
<RedlineXML xmlns="urn:autodesk_com:dsd:RedlineXML_v_002.xdr" xmlns:redline="urn:autodesk_com:dsd:RedlineXML_v_002.xdr" xmlns:VoloView="urn:autodesk_com:dsd:VoloView_v_001.xdr" xmlns:acdb="urn:autodesk_com:dsd:RMLFilterAcDb_v_001.xdr"/>
Then /default:RedlineXML[1] will give 1 result.
Best Regards,
George
Please make sure you have oXygen 5 as this feature was added recently. Also you should have a default namespace in your document, for instance if the document is:
<RedlineXML xmlns="urn:autodesk_com:dsd:RedlineXML_v_002.xdr" xmlns:redline="urn:autodesk_com:dsd:RedlineXML_v_002.xdr" xmlns:VoloView="urn:autodesk_com:dsd:VoloView_v_001.xdr" xmlns:acdb="urn:autodesk_com:dsd:RMLFilterAcDb_v_001.xdr"/>
Then /default:RedlineXML[1] will give 1 result.
Best Regards,
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