Error reported in schema when using xsi:schemaLocation
Posted: Tue May 07, 2013 8:08 pm
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"