Validation error when including file
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 45
- Joined: Mon Aug 24, 2009 11:42 pm
Validation error when including file
I am attempting to include an external (local) XML file in my main document, but this is causing a rather perplexing validation error:
My include directive looks like this:
The file I am attempting to include is essentially this:
The error indicates the <classDecl> is not legal at this point, in the file, but if I paste the entire <classDecl> element from the include file directly in the main document at the location where the <xinclude> directive is, the file validates just fine.
This makes absolutely no sense. Can someone kindly point out where I am in error?
Many thanks in advance.
Code: Select all
System ID: C:\Users\scott\Documents\project\include\include-taxonomies.xml
Main validation file: C:\Users\scott\Documents\project\inscriptions\rib01322.xml
Schema: C:\Program Files\Oxygen XML Editor 14\frameworks\tei\xml\tei\custom\schema\relaxng\tei_all.rng
Engine name: Jing
Severity: error
Description: element "classDecl" not allowed here; expected element "ab", "appInfo", "charDecl", "classDecl", "editorialDecl", "fsdDecl", "geoDecl", "listPrefixDef", "metDecl", "p", "projectDesc", "refsDecl", "samplingDecl", "schemaSpec", "styleDefDecl", "tagsDecl" or "variantEncoding"
Start location: 3:2
End location: 3:11
Code: Select all
<xi:include href="../include/include-taxonomies.xml"/>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<classDecl>
<taxonomy xml:id="RIB-genre">
<category xml:id="slab">
<catDesc>Slab</catDesc>
</category>
...
</taxonomy>
</classDecl>
This makes absolutely no sense. Can someone kindly point out where I am in error?
Many thanks in advance.
-
- Posts: 407
- Joined: Mon Dec 05, 2011 6:08 pm
Re: Validation error when including file
Hello,
In order to reproduce this issue on our side, could you please specify the context where you are using the xi:include element?
If possible, could you please send us a sample file of the TEI document? You can send it to our support email address: support AT oxygenxml DOT com
Regards,
Ionela
In order to reproduce this issue on our side, could you please specify the context where you are using the xi:include element?
If possible, could you please send us a sample file of the TEI document? You can send it to our support email address: support AT oxygenxml DOT com
Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Validation error when including file
Hi,
Thank you for the sample file.
The problem is that the included file does not have the root element in the required namespace.
The Jing validator mentions only the local name in the error, but it omits the difference in namespace.
It seems xml:lang is also required, so the included file has to be modified like this:
Regards,
Adrian
Thank you for the sample file.
The problem is that the included file does not have the root element in the required namespace.
The Jing validator mentions only the local name in the error, but it omits the difference in namespace.
It seems xml:lang is also required, so the included file has to be modified like this:
Code: Select all
<classDecl xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
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