[Xml-compile] XML Compile write with xsd to validate
Mark Overmeer
mark at overmeer.net
Tue Jun 18 07:29:16 GMT 2013
* JOSE RAMON GONZALEZ MARTINEZ (joseramon.gonzalez at ext.mpsa.com) [130618 06:57]:
> but I am lost about how to add this:
> xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> xsi:noNamespaceSchemaLocation="variables.xsd"
The second line tells the user of the schema where definitions can be
found which are not in a namespace.
For namespace-qualified components, you can use <import>
<import namespace="http://www.w3.org/2001/SMIL20/"
schemaLocation="../smil/smil20.xsd"/>
Usually, the location uri is broken. And "schema technology" expects
it to be loaded dynamically from the web. As maintainer I hate broken
and "dynamic": you have to import everything explicitly:
my $schema = XML::Compile::Cache->new([glob '*.xsd']); # or
$schema->importDefinitions('variables.xsd');
> Again many thanks for your help.
Welcome.
--
Regards,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark at Overmeer.net solutions at overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net
More information about the Xml-compile
mailing list