xsl-list
[Top] [All Lists]

[xsl] Namespace issue

2010-12-09 05:06:06
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>
--~--