Path of a resource
Sunday, 31 July 2016 · 2 messages
CC
Chahd Chahd31 Jul 2016 20:41 #
Hi,
I am using the Database Administration interface. I created a base named "MyFirstBase" and I add 2 resources (test.xml and test.xsd). How can I write the paths of the resources properly in a query? I tried:
validate:xsd('test.xml', 'test.xsd')
but I have a *[FODC0002] Resource 'test.xml' does not exist.*
*Thank you*CG
Christian Grün31 Jul 2016 22:53 #
Hi Chahd,
The functions in the Validation Module are not restricted to database resources. By default, if you specify a relative file path, it refers to your local file system.
Quoted text · Chahd Chahd · 1 line
> How can I write the paths of the resources properly in a query?
Here is one way to do it:
let $xml := db:open('MyFirstBase', 'test.xml')
let $xsd := db:open('MyFirstBase', 'test.xsd')
return validate:xsd($xml, $xsd)Cheers
Christian
Quoted text · Chahd Chahd · 5 lines
> I am using the Database Administration interface. I created a base named > "MyFirstBase" and I add 2 resources (test.xml and test.xsd). > validate:xsd('test.xml', 'test.xsd') > but I have a [FODC0002] Resource 'test.xml' does not exist. > Thank you
Written for BaseX 8.5. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery