import in xsd

Thursday, 27 February 2014 · 4 messages · last reply 3 Mar 2014
JT
Jan Techter27 Feb 2014 16:01 #
Hi, is the validation:xsd() function able to handle the import of other schemata? I tried to do something like
     <import namespace="http://bibtexml.sf.net/"
schemaLocation="bibtexml-handwritten.xsd"/>
to use types which are defined in this schema in my own schema. Both schema files are lying next to each other in the same basex database. The validation function doesnt throw an error that the import failed. But rather only states that it can't resolve the types i used from the other schema: Validation failed. "Fatal:src-resolve: Cannot resolve the name 'bibtex:entry' to a(n) 'type definition' component." So it seems like it just ignores the import statement. Best, Jan
CG
Christian Grün28 Feb 2014 20:23 #
Hi Jan, the reason for the unexpected behavior may be that the referenced schema files cannot be retrieved from the database. Instead, they will be requested from the local system. One of the reasons is that schema validation is peformed by the standard Java validators, or by Saxon, and both of them have no access to database files. Hope this helps, Christian
Quoted text · Jan Techter · 25 lines
> is the validation:xsd() function able to handle the import of other > schemata? > I tried to do something like > > <import namespace="http://bibtexml.sf.net/" > schemaLocation="bibtexml-handwritten.xsd"/> > > to use types which are defined in this schema in my own schema. > Both schema files are lying next to each other in the same basex database. > > The validation function doesnt throw an error that the import failed. > But rather only states that it can't resolve the types i used from the other > schema: > > Validation failed. "Fatal:src-resolve: Cannot resolve the name > 'bibtex:entry' to a(n) 'type definition' component." > > So it seems like it just ignores the import statement. > > Best, > Jan > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
JT
Jan Techter3 Mar 2014 12:08 #
Hi, thx for the info. I'll have to manage with absolute paths then for the time being. Best, Jan
Quoted text · Christian Grün · 38 lines
On 02/28/2014 08:23 PM, Christian Grün wrote: > Hi Jan, > > the reason for the unexpected behavior may be that the referenced > schema files cannot be retrieved from the database. Instead, they will > be requested from the local system. One of the reasons is that schema > validation is peformed by the standard Java validators, or by Saxon, > and both of them have no access to database files. > > Hope this helps, > Christian > ___________________________________ > >> is the validation:xsd() function able to handle the import of other >> schemata? >> I tried to do something like >> >> <import namespace="http://bibtexml.sf.net/" >> schemaLocation="bibtexml-handwritten.xsd"/> >> >> to use types which are defined in this schema in my own schema. >> Both schema files are lying next to each other in the same basex database. >> >> The validation function doesnt throw an error that the import failed. >> But rather only states that it can't resolve the types i used from the other >> schema: >> >> Validation failed. "Fatal:src-resolve: Cannot resolve the name >> 'bibtex:entry' to a(n) 'type definition' component." >> >> So it seems like it just ignores the import statement. >> >> Best, >> Jan >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
AB
Andy Bunce3 Mar 2014 12:26 #
Could not a custom LSResourceResolver<http://docs.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/ls/LSResourceResolver.html>[1] be created to handle loading from the database? Regards /Andy [1] http://docs.oracle.com/javase/1.5.0/docs/api/javax/xml/validation/Validator.html#setResourceResolver%28org.w3c.dom.ls.LSResourceResolver%29 On Mon, Mar 3, 2014 at 11:08 AM, Jan Techter <techter at mailbox.tu-berlin.de>wrote:
Quoted text · Jan Techter · 60 lines
> Hi, > > thx for the info. > I'll have to manage with absolute paths then > for the time being. > > Best, > Jan > > > > > On 02/28/2014 08:23 PM, Christian Grün wrote: > >> Hi Jan, >> >> the reason for the unexpected behavior may be that the referenced >> schema files cannot be retrieved from the database. Instead, they will >> be requested from the local system. One of the reasons is that schema >> validation is peformed by the standard Java validators, or by Saxon, >> and both of them have no access to database files. >> >> Hope this helps, >> Christian >> ___________________________________ >> >> is the validation:xsd() function able to handle the import of other >>> schemata? >>> I tried to do something like >>> >>> <import namespace="http://bibtexml.sf.net/" >>> schemaLocation="bibtexml-handwritten.xsd"/> >>> >>> to use types which are defined in this schema in my own schema. >>> Both schema files are lying next to each other in the same basex >>> database. >>> >>> The validation function doesnt throw an error that the import failed. >>> But rather only states that it can't resolve the types i used from the >>> other >>> schema: >>> >>> Validation failed. "Fatal:src-resolve: Cannot resolve the name >>> 'bibtex:entry' to a(n) 'type definition' component." >>> >>> So it seems like it just ignores the import statement. >>> >>> Best, >>> Jan >>> _______________________________________________ >>> 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 >

⚡Generated with XQuery