[xsd-users] "Unable to open in read mode" using --namespace-regex

Boris Kolpackov boris at codesynthesis.com
Wed Mar 26 09:50:42 EDT 2008


Hi Timothy,

Lenz, Timothy K <timothy.k.lenz at lmco.com> writes:

> For some reason, every single time I run it with -trace, I get
> that "unable to open in read mode" error, even if it works without
> the -trace.  Makes --namespace-regex-trace worthless to me.

Let me try to clarify this a bit: --namespace-regex and
--namespace-regex-trace are not the same. --namespace-regex has a
value which is a regular expression that is used to translate XML
namespaces to C++ namespaces. This options is used like so:

--namespace-regex <regex>

The --namespace-regex-trace option does not have a value. It is
just a flag that specifies whether the process of applying regular
expressions should be traced or not. If it is not specified, then
there is no tracing. If it is specified, then the tracing is
performed. You would normally use this option *together* with
--namespace-regex, not instead of.

Now since this option does not have a value, when you do something
like this:

$ xsd --namespace-regex-trace '/foo/bar/' file.xsd

The compiler treats both /foo/bar/ and file.xsd as input files.
This is why you get the unable to open error.

Boris




More information about the xsd-users mailing list