[Xml-compile] schema namespace `<none>' not (yet) supported

Anthony Wood bessington at gmail.com
Mon Aug 27 03:32:20 GMT 2012


Hi Mark and All

#!/usr/local/bin/perl

use warnings;
use strict;
use XML::Compile::Cache;

# xsd copied locally from http://www.loc.gov/standards/mets/mets.xsd
my $xsd =3D '/cygdrive/h/tony.wood/xml/xsd/mets.xsd';
my $schema =3D XML::Compile::Cache->new($xsd);
$schema->addSchemaDirs('/cygdrive/h/tony.wood/xml/xsd');

# xlink.xsd is from http://www.loc.gov/standards/xlink/xlink.xsd
$schema->importDefinitions('xlink.xsd');

I'm not getting the data in because of the error:

 schema namespace `<none>' not (yet) supported

sure enough, xlink.xsd doesn't have an xmlsn tag (is that the right
terminlology ?) so presumably no namespaces defined. Is there anything i
can do to work around this issue ?

thanks in advance!
Tony Wood

here's xlink.xsd :
<!-- METS XLink Schema, v. 2, Nov. 15, 2004 -->
<schema targetNamespace=3D"http://www.w3.org/1999/xlink"
elementFormDefault=3D"qualified">
<!--  global attributes  --><attribute name=3D"href"
type=3D"anyURI"/><attribute name=3D"role" type=3D"string"/><attribute
name=3D"arcrole" type=3D"string"/><attribute name=3D"title"
type=3D"string"/><attribute name=3D"show"><simpleType><restriction
base=3D"string"><enumeration value=3D"new"/><enumeration
value=3D"replace"/><enumeration value=3D"embed"/><enumeration
value=3D"other"/><enumeration
value=3D"none"/></restriction></simpleType></attribute><attribute
name=3D"actuate"><simpleType><restriction base=3D"string"><enumeration
value=3D"onLoad"/><enumeration value=3D"onRequest"/><enumeration
value=3D"other"/><enumeration
value=3D"none"/></restriction></simpleType></attribute><attribute
name=3D"label" type=3D"string"/><attribute name=3D"from"
type=3D"string"/><attribute name=3D"to" type=3D"string"/><attributeGroup
name=3D"simpleLink"><attribute name=3D"type" type=3D"string" fixed=3D"simpl=
e"
form=3D"qualified"/><attribute ref=3D"xlink:href" use=3D"optional"/><attrib=
ute
ref=3D"xlink:role" use=3D"optional"/><attribute ref=3D"xlink:arcrole"
use=3D"optional"/><attribute ref=3D"xlink:title" use=3D"optional"/><attribu=
te
ref=3D"xlink:show" use=3D"optional"/><attribute ref=3D"xlink:actuate"
use=3D"optional"/></attributeGroup><attributeGroup
name=3D"extendedLink"><attribute name=3D"type" type=3D"string" fixed=3D"ext=
ended"
form=3D"qualified"/><attribute ref=3D"xlink:role" use=3D"optional"/><attrib=
ute
ref=3D"xlink:title" use=3D"optional"/></attributeGroup><attributeGroup
name=3D"locatorLink"><attribute name=3D"type" type=3D"string" fixed=3D"loca=
tor"
form=3D"qualified"/><attribute ref=3D"xlink:href" use=3D"required"/><attrib=
ute
ref=3D"xlink:role" use=3D"optional"/><attribute ref=3D"xlink:title"
use=3D"optional"/><attribute ref=3D"xlink:label"
use=3D"optional"/></attributeGroup><attributeGroup name=3D"arcLink"><attrib=
ute
name=3D"type" type=3D"string" fixed=3D"arc" form=3D"qualified"/><attribute
ref=3D"xlink:arcrole" use=3D"optional"/><attribute ref=3D"xlink:title"
use=3D"optional"/><attribute ref=3D"xlink:show" use=3D"optional"/><attribute
ref=3D"xlink:actuate" use=3D"optional"/><attribute ref=3D"xlink:from"
use=3D"optional"/><attribute ref=3D"xlink:to"
use=3D"optional"/></attributeGroup><attributeGroup
name=3D"resourceLink"><attribute name=3D"type" type=3D"string" fixed=3D"res=
ource"
form=3D"qualified"/><attribute ref=3D"xlink:role" use=3D"optional"/><attrib=
ute
ref=3D"xlink:title" use=3D"optional"/><attribute ref=3D"xlink:label"
use=3D"optional"/></attributeGroup><attributeGroup
name=3D"titleLink"><attribute name=3D"type" type=3D"string" fixed=3D"title"
form=3D"qualified"/></attributeGroup><attributeGroup
name=3D"emptyLink"><attribute name=3D"type" type=3D"string" fixed=3D"none"
form=3D"qualified"/></attributeGroup></schema>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20120827/64=
b7f8ce/attachment.htm


More information about the Xml-compile mailing list