Error reported in schema when using xsi:schemaLocation
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 269
- Joined: Sat Jul 10, 2010 4:03 pm
Error reported in schema when using xsi:schemaLocation
I have a schema, if I load up the rnc file Oxygen says its OK.
If I use this at the top of my xml file the schema is used, no errors and Oxygen validates with the schema
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="../schemas/mbel.rnc" type="compact"?>
<?oxygen SCHSchema="../schemas/mbel.isosch"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
If I use the xsi:schemaLocation attribute in the TEI tag Oxygen reports a error in the rnc file? "Content is not allowed in prolog"
<?xml version="1.0" encoding="us-ascii"?>
<TEI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.tei-c.org/ns/1.0"
xsi:schemaLocation="http://www.w3schools.com ../schemas/mbel.rnc">
<teiHeader>
Am I not using the xsi:schemaLocation attribute correctly?
below is the top of the rnc file, where the error is reported
****************************************************************
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace ns1 = "http://mbelibrary.org/ns1"
namespace ns2 = "http://www.isocat.org/ns/dcr"
default namespace ns3 = "http://www.tei-c.org/ns/1.0"
namespace rng = "http://relaxng.org/ns/structure/1.0"
namespace s = "http://www.ascc.net/xml/schematron"
namespace sch = "http://purl.oclc.org/dsdl/schematron"
namespace xlink = "http://www.w3.org/1999/xlink"
# Schema generated from ODD source 2013-03-23T16:33:53Z.
# Edition: 2.3.0. Last updated on 17th January 2013.
# Edition Location: http://www.tei-c.org/Vault/P5/2.3.0/
#
# Copyright 2011 Mary Baker Eddy Library, some rights
# reserved. Available under the terms of the Creative
# Commons Attribution-ShareAlike 3.0 Unported
# License.
mbel_macro.paraContent =
(text
| mbel_model.gLike
| mbel_model.phrase
| mbel_model.inter
| mbel_model.global
| mbel_lg)*
mbel_macro.limitedContent =
(text | mbel_model.limitedPhrase | mbel_model.inter)*
mbel_macro.phraseSeq =
(text | mbel_model.gLike | mbel_model.phrase | mbel_model.global)*
mbel_macro.phraseSeq.limited =
(text | mbel_model.limitedPhrase | mbel_model.global)*
mbel_macro.specialPara =
(text
| mbel_model.gLike
| mbel_model.phrase
| mbel_model.inter
| mbel_model.divPart
| mbel_model.global)*
mbel_macro.xtext = (text | mbel_model.gLike)*
mbel_data.certainty = "high" | "medium" | "low" | "unknown"
If I use this at the top of my xml file the schema is used, no errors and Oxygen validates with the schema
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="../schemas/mbel.rnc" type="compact"?>
<?oxygen SCHSchema="../schemas/mbel.isosch"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
If I use the xsi:schemaLocation attribute in the TEI tag Oxygen reports a error in the rnc file? "Content is not allowed in prolog"
<?xml version="1.0" encoding="us-ascii"?>
<TEI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.tei-c.org/ns/1.0"
xsi:schemaLocation="http://www.w3schools.com ../schemas/mbel.rnc">
<teiHeader>
Am I not using the xsi:schemaLocation attribute correctly?
below is the top of the rnc file, where the error is reported
****************************************************************
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace ns1 = "http://mbelibrary.org/ns1"
namespace ns2 = "http://www.isocat.org/ns/dcr"
default namespace ns3 = "http://www.tei-c.org/ns/1.0"
namespace rng = "http://relaxng.org/ns/structure/1.0"
namespace s = "http://www.ascc.net/xml/schematron"
namespace sch = "http://purl.oclc.org/dsdl/schematron"
namespace xlink = "http://www.w3.org/1999/xlink"
# Schema generated from ODD source 2013-03-23T16:33:53Z.
# Edition: 2.3.0. Last updated on 17th January 2013.
# Edition Location: http://www.tei-c.org/Vault/P5/2.3.0/
#
# Copyright 2011 Mary Baker Eddy Library, some rights
# reserved. Available under the terms of the Creative
# Commons Attribution-ShareAlike 3.0 Unported
# License.
mbel_macro.paraContent =
(text
| mbel_model.gLike
| mbel_model.phrase
| mbel_model.inter
| mbel_model.global
| mbel_lg)*
mbel_macro.limitedContent =
(text | mbel_model.limitedPhrase | mbel_model.inter)*
mbel_macro.phraseSeq =
(text | mbel_model.gLike | mbel_model.phrase | mbel_model.global)*
mbel_macro.phraseSeq.limited =
(text | mbel_model.limitedPhrase | mbel_model.global)*
mbel_macro.specialPara =
(text
| mbel_model.gLike
| mbel_model.phrase
| mbel_model.inter
| mbel_model.divPart
| mbel_model.global)*
mbel_macro.xtext = (text | mbel_model.gLike)*
mbel_data.certainty = "high" | "medium" | "low" | "unknown"
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Error reported in schema when using xsi:schemaLocation
Hello,
xsi:schemaLocation can only be used with XML Schema(.xsd). The xsi prefix kind of gives it away since it is mapped to the XML Schema instance namespace.
Oxygen currently supports the W3C XML model processing instruction for schema associations:
http://www.w3.org/TR/xml-model/
So, instead of the "oxygen" processing instructions (deprecated / Oxygen specific) you can now use these standard PIs. Oxygen already uses these by default when associating a schema with the Document > Schema > Associate Schema action.
Regards,
Adrian
xsi:schemaLocation can only be used with XML Schema(.xsd). The xsi prefix kind of gives it away since it is mapped to the XML Schema instance namespace.
Oxygen currently supports the W3C XML model processing instruction for schema associations:
http://www.w3.org/TR/xml-model/
So, instead of the "oxygen" processing instructions (deprecated / Oxygen specific) you can now use these standard PIs. Oxygen already uses these by default when associating a schema with the Document > Schema > Associate Schema action.
Regards,
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
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