[xsd-users] Q: schemaLocation in schema file
Rangarajan, Ravi_Sowmian
raviraja at qti.qualcomm.com
Tue Feb 11 01:48:28 EST 2014
Just wanted to add that I am not setting no_namespace_schema_location field of schemaProperties, I am only setting schema_location of schemaProperties.
Thanks
Ravi
-----Original Message-----
From: Rangarajan, Ravi_Sowmian
Sent: Monday, February 10, 2014 10:31 PM
To: xsde-users at codesynthesis.com
Cc: xsd-users at codesynthesis.com
Subject: RE: [xsd-users] Q: schemaLocation in schema file
Yes Boris, we had specified file://filepath/schema_name.xsd and namespace string in schema_location() API call - where filepath is in the local directory of the server where parsing of MPD happens. Path starts like /opt/.... which means file:///opt/.../schema_name.xsd
It doesn't ignore schemaLocation with this specification. Should the third / be removed or what else can be wrong that makes code synthesis not ignore schemaLocation?
Thanks again
Ravi
P.S: I tired dont_validate option and parser didn't abort as was happening earlier - only drawback I see with this option is that validation is totally disabled instead of relaxing specifications for schemaLocation alone.
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Monday, February 10, 2014 8:18 PM
To: Rangarajan, Ravi_Sowmian
Cc: xsde-users at codesynthesis.com; xsd-users at codesynthesis.com
Subject: Re: [xsd-users] Q: schemaLocation in schema file
Hi Ravi,
Rangarajan, Ravi_Sowmian <raviraja at qti.qualcomm.com> writes:
> My question was how do I tell code synthesis to ignore if
> schemaLocation field is completely missing from XML instance file or
> it could be present, but location part could be missing? (I mean any
> way other than telling code synthesis not to validate schema).
>
> xml_schema::properties schemaProperties;
>
> schemaProperties.schema_location(...)
If you specified the schema_location() correctly (full path starting with file://, as described in the manual), then the schemaLocation attribute in the XML document should be completely ignored. Is that not the behavior you are getting?
Boris
More information about the xsd-users
mailing list