Support for <xsd:import>

Jan 24, 2009 at 12:53 PM

Hello,

would it be possible to support <xsd:import>?
Currently, when using a type from an imported schema, code generation just fails with an error "Type ... is not declared".
At least, could there be an option to ignore this error?

Klaus

Jan 25, 2009 at 1:38 AM
Hi, it supported. I've schema which includes 15 other schemas using xsd:import.

Probably you have incorrect values in schemaLocation and namespace attributes. Please attach your schema files and we will try to reproduce your problem.
Jan 25, 2009 at 6:58 AM
Thank you for the information.
The schema I imported was http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd.
The problem seems to be the DOCTYPE declaration on top of this schema; if I remove it, xsd2code works fine.
Here is a minimal xsd to reproduce:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://tempuri.org/importtest.xsd" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:imptest="http://tempuri.org/importtest.xsd">
  <xs:import schemaLocation="xmldsig-core-schema.xsd" namespace="http://www.w3.org/2000/09/xmldsig#"/>
  <xs:element type="ds:SignatureType" name="Signature"/>>
</xs:schema>

Klaus
Jan 25, 2009 at 11:56 PM
Thank you for reporting this problem. We will try to resolve this problem if it possible.
Jan 25, 2009 at 11:58 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.