Validation using xs:include
Tuesday, 24 July 2012 · 4 messages
HV
Huib Verweij24 Jul 2012 10:56 #
Hi,
I am trying to use the excellent validation function. It used to work great, however, recently we added a xs:include statement. Now the validator can't find the included schema (that is located in the same directory as the including schema). I think the validator is missing a ResourceResolver. It works fine though if I include an absolute path. But absolute paths tend to only work on one machine. Any help is much appreciated.
Hartelijke groet,
Huib Verweij.
Verstuurd vanaf mijn iPhone
DK
Dirk Kirsten24 Jul 2012 12:19 #
Hello Huib,
Would you be so kind to provide a small example [1] about what you are doing exactly. I am pretty sure the xs:include() works quite well, as I used it recently. I used the xsd in [2] and as you can see this is relative as well.
Cheers,
Dirk
[1] http://mindprod.com/jgloss/sscce.html
[2]
http://www.editeur.org/onix/2.1/short/ONIX_BookProduct_Release2.1_short.xsd
Quoted text · Huib Verweij · 21 lines
On Tue, Jul 24, 2012 at 10:56 AM, Huib Verweij <huib.verweij at carthago-ict.nl > wrote: > Hi, > > I am trying to use the excellent validation function. It used to work > great, however, recently we added a xs:include statement. Now the validator > can't find the included schema (that is located in the same directory as > the including schema). I think the validator is missing a ResourceResolver. > It works fine though if I include an absolute path. But absolute paths tend > to only work on one machine. Any help is much appreciated. > > Hartelijke groet, > > Huib Verweij. > > Verstuurd vanaf mijn iPhone > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
HV
Huib Verweij24 Jul 2012 13:18 #
Hi Dirk,
thanks for the quick answer. Good to know it *should* work and does work. I'm using basexhttp and RESTXQ, and have the schemas in a directory next to the "http" directory, e.g. "../xsd/Book.xsd". The including schema is found, but the included is not. I'll make a sscce. Perhaps it'll simply be enough to move the schemas to the "http" directory. I read something about not using ".." in the path.
Hartelijke groet,
Huib.
Verstuurd vanaf mijn iPhone
Op 24 jul. 2012 om 12:19 heeft "Dirk Kirsten" <dk at basex.org> het volgende geschreven:
Quoted text · Dirk Kirsten · 25 lines
> Hello Huib, > > Would you be so kind to provide a small example [1] about what you are doing exactly. I am pretty sure the xs:include() works quite well, as I used it recently. I used the xsd in [2] and as you can see this is relative as well. > > Cheers, > Dirk > > [1] http://mindprod.com/jgloss/sscce.html > [2] http://www.editeur.org/onix/2.1/short/ONIX_BookProduct_Release2.1_short.xsd > > On Tue, Jul 24, 2012 at 10:56 AM, Huib Verweij <huib.verweij at carthago-ict.nl> wrote: > Hi, > > I am trying to use the excellent validation function. It used to work great, however, recently we added a xs:include statement. Now the validator can't find the included schema (that is located in the same directory as the including schema). I think the validator is missing a ResourceResolver. It works fine though if I include an absolute path. But absolute paths tend to only work on one machine. Any help is much appreciated. > > Hartelijke groet, > > Huib Verweij. > > Verstuurd vanaf mijn iPhone > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
HV
Huib Verweij24 Jul 2012 13:54 #
Oops. My bad. I created a XML document from the schema, instead of using just the name. So there was no baseURI to look for included schemas I guess. Don't know why I did that ...
Thanks Dirk.
Hartelijke groet,
Huib.
Verstuurd vanaf mijn iPhone
Op 24 jul. 2012 om 13:18 heeft Huib Verweij <huib.verweij at carthago-ict.nl> het volgende geschreven:
Quoted text · Huib Verweij · 41 lines
> Hi Dirk, > > thanks for the quick answer. Good to know it *should* work and does work. I'm using basexhttp and RESTXQ, and have the schemas in a directory next to the "http" directory, e.g. "../xsd/Book.xsd". The including schema is found, but the included is not. I'll make a sscce. Perhaps it'll simply be enough to move the schemas to the "http" directory. I read something about not using ".." in the path. > > Hartelijke groet, > > Huib. > > Verstuurd vanaf mijn iPhone > > Op 24 jul. 2012 om 12:19 heeft "Dirk Kirsten" <dk at basex.org> het volgende geschreven: > >> Hello Huib, >> >> Would you be so kind to provide a small example [1] about what you are doing exactly. I am pretty sure the xs:include() works quite well, as I used it recently. I used the xsd in [2] and as you can see this is relative as well. >> >> Cheers, >> Dirk >> >> [1] http://mindprod.com/jgloss/sscce.html >> [2] http://www.editeur.org/onix/2.1/short/ONIX_BookProduct_Release2.1_short.xsd >> >> On Tue, Jul 24, 2012 at 10:56 AM, Huib Verweij <huib.verweij at carthago-ict.nl> wrote: >> Hi, >> >> I am trying to use the excellent validation function. It used to work great, however, recently we added a xs:include statement. Now the validator can't find the included schema (that is located in the same directory as the including schema). I think the validator is missing a ResourceResolver. It works fine though if I include an absolute path. But absolute paths tend to only work on one machine. Any help is much appreciated. >> >> Hartelijke groet, >> >> Huib Verweij. >> >> Verstuurd vanaf mijn iPhone >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Written for BaseX 7.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery