[xsd-users] Problems with location-regex pathnames on Windows
Matthew.Hutchins at csiro.au
Matthew.Hutchins at csiro.au
Mon Jun 9 20:27:11 EDT 2008
Hi,
I am using XSD 3.1.0 on Windows.
When I use --location-regex to map a schema name to a pathname, and the
pathname is an absolute pathname containing a drive letter and Windows
path separators "\", I get an error like this:
> xsd cxx-tree schema2.xsd --location-regex
"%http://www.csiro.au/(.*)%P:\\staff\\matthew\\development\\sandbox\\xsd
\\$1%"
schema2.xsd: error:
'P:\staff\matthew\development\sandbox\xsd\schema1.xsd' is not a valid
filesystem path
In fact this also seems to be true for a relative pathname containing
Windows separators "\".
However calling xsd with this path is fine:
> xsd cxx-tree "P:\staff\matthew\development\sandbox\xsd\schema1.xsd"
(works and produces output)
I looked at the code a bit, and it seems the job of determining whether
a path is valid is handed to boost, and it is supposed to be checking
for native paths, so I don't understand why there is a problem. Perhaps
the location-regex part of the code was compiled with different compiler
flags ... ?
Anyway, can anyone help with this problem or suggest a work-around? I
want to be able to import schemas that reside on a different Windows
drive to the schema being compiled.
Thanks
Matthew
PS: Schemas used to generate above output:
---
schema1.xsd:
---
<?xml version="1.0"?>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.csiro.au/Schema1"
targetNamespace="http://www.csiro.au/Schema1"
elementFormDefault="qualified"
>
</xsd:schema>
---
schema2.xsd
---
<?xml version="1.0"?>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.csiro.au/Schema2"
xmlns:Schema1="http://www.csiro.au/Schema1"
targetNamespace="http://www.csiro.au/Schema2"
elementFormDefault="qualified"
>
<xsd:import namespace="http://www.csiro.au/Schema1"
schemaLocation="http://www.csiro.au/schema1.xsd" />
</xsd:schema>
---
__________________________________
Dr Matthew A Hutchins
Senior Research Scientist
Networking Technologies Laboratory
CSIRO ICT Centre
---
Matthew.Hutchins at csiro.au
Phone: +61 2 6216 7088 | Mobile: 0408 862 669 | Fax: +61 2 6216 7111
Mail: GPO Box 664 Canberra ACT 2601 Australia
www.ict.csiro.au
More information about the xsd-users
mailing list