xsl-list
[Top] [All Lists]

Re: [xsl] Namespace issue

2010-12-09 09:05:27
Looks like a bug in the schema generator.

If you add abc: in type="abc:..." in these two lines
               <xs:element name="array" type="arrayType"/>
           <xs:element name="string" type="stringType"/>
it shouldn't have the error any more.

-W

On 9 December 2010 12:05, Silent lights 
<silentlights(_at_)yahoo(_dot_)co(_dot_)uk> wrote:
Hello there,
I am trying to generate an XSD with an XML instance. For this XML Instance,

<?xml version="1.0" encoding="UTF-8"?>
<abc:io xmlns:abc="urn:com.mycompany:bizatoms">
   <abc:array>
       <abc:string>Data posted</abc:string>
   </abc:array>
</abc:io>

The generated Schema was

<?xml version="1.0" encoding="utf8"?>
<?bpc.pltype.out bpm.pltype=xsd,bpm.pltype=xml?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:abc="urn:com.mycompany:bizatoms"
targetNamespace="urn:com.mycompany:bizatoms" elementFormDefault="qualified"
attributeFormDefault="unqualified">
   <xs:element name="io">
       <xs:complexType>
           <xs:sequence>
               <xs:element name="array" type="arrayType"/>
           </xs:sequence>
       </xs:complexType>
   </xs:element>
   <xs:complexType name="arrayType">
       <xs:sequence>
           <xs:element name="string" type="stringType"/>
       </xs:sequence>
   </xs:complexType>
   <xs:simpleType name="stringType">
       <xs:restriction base="xs:string"/>
   </xs:simpleType>
</xs:schema>

I get an error while valididating the Schema : 'stringType' must refer to an
existing simple or complex type.

I am not able to understand why this error pops up.. although the type is
defined and it is under the same namespace.

Can someone highlight on this particular case, and suggest how would the 
schema
be "pre-fixed perhaps?"

thank you
Densil





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--