[xsd-users] Prefix can not be resolved to a URI

Boris Kolpackov boris at codesynthesis.com
Thu Jul 2 22:10:36 EDT 2009


Hi Daniel,

Daniel Pfeifer <daniel at pfeifer-mail.de> writes:

> When I compile the file jabber-client.xsd, I get the following errors:
> 
> jabber-client.xsd:172:49: error: Prefix: 'err' can not be resolved to a URI
> ...

When I tried to compile jabber-client.xsd I got this error:

jabber-client.xsd: error: 'http://xmpp.org/schemas/stanzaerror.xsd': unable to open in read mode

This error is due to the XSD compiler only supporting local filesystem
paths for security reasons. Perhaps you tried to "fix" this error by
removing the import declaration that caused it and that's how you got
the above error? ;-)

The recommended fix for this is to download stanzaerror.xsd (and xml.xsd)
and then use the --location-map options to re-map URI locations to local
files. In the end I was able to compile jabber-client.xsd with the
following command line:

xsd cxx-tree \
--location-map http://xmpp.org/schemas/stanzaerror.xsd=stanzaerror.xsd \
--location-map http://www.w3.org/2001/03/xml.xsd=xml.xsd \
--namespace-map jabber:client=jabber_client \
--namespace-map urn:ietf:params:xml:ns:xmpp-stanzas=xmpp_stanzas \
jabber-client.xsd

Boris




More information about the xsd-users mailing list