On 04.03.2022 10:28, Arantza Etxebarria Pablo wrote:
Dear Community,
We have been trying to validate a file using the function *validate:xsd-info*($input as item(), $schema as item()?) as xs:string* against several different schemas and, we don't know how to send the parameter “schema” with more than one schema for this function.
We have tried to declare the variable *schema *like this :
let $schema:= "http://inspire.ec.europa.eu/schemas/bu-base/4.0/BuildingsBase.xsd http://schemas.opengis.net/gml/3.2.1/gml.xsd"
It seems the first schema imports the second so I would think using the first schema as the $schema parameter should suffice to have the validator load any imports. Or did you try that and got other errors or warnings?
But it returns this error message:
XML document 'example.gml': -1:-1: schema_reference.4: Failed to read schema document 'http://inspire.ec.europa.eu/schemas/bu-base/4.0/BuildingsBase.xsd http://schemas.opengis.net/gml/3.2.1/gml.xsd' , because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.
I have tried this function when no schema is given and it takes the contain of schemaLocation attribute, and in this case, is able to validate more than one schema. But I need to pass the schemas through a variable
Could any of you point us in the right direction?
Thanks
-- *Arantza Etxebarria *