Hi,
An XML Schema document is an XML document. XML documents can only have 1 root element so xerces will not parse this as it is illegal.


Regards,

Gareth

zhangxian 33234 wrote:
Hi,
    The errors is that there are two root element "<xsd:schema>" in one file. 
But that is what I want Xerces to do.
    Now I have resolved this problem by this way. I divided this file into two new files.The 
first schema part to tmpfile_1,the second schema part to tmpfile_2 with inserting 
"<xsd:import ...   schemaLocation='location of tmpfile1'/>". Then I can parse 
tmpfile_2 succesfully.

Zhangxian


Hi,

What errors do you see / what are you trying to do?

Gareth

zhangxian 33234 wrote:

Hi,

   This is the content fo the file which Xerces can't parse. Can Xerces do it 
with configuring smoething?  Thanks

<xsd:schema
  targetNamespace='http://www.chinatelecom.com.cn/schema/ctcc/common/v1_0'
  xmlns:ctcc_common_xsd='http://www.chinatelecom.com.cn/schema/ctcc/common/v1_0'
  xmlns:xsd='http://www.w3.org/2001/XMLSchema'>

  <xsd:element name="ArrayOfURIElement" type="ctcc_common_xsd:ArrayOfURI"/>
  <xsd:complexType name='ArrayOfURI'>
     <xsd:sequence>
        <xsd:element name='ArrayOfURI' type='xsd:anyURI' minOccurs='0' 
maxOccurs='unbounded'/>
     </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="ArrayOfEndUserIdentifierElement" 
type="ctcc_common_xsd:ArrayOfEndUserIdentifier"/>
  <xsd:complexType name='ArrayOfEndUserIdentifier'>
     <xsd:sequence>
        <xsd:element name='ArrayOfEndUserIdentifier' 
type='ctcc_common_xsd:EndUserIdentifier' minOccurs='0' maxOccurs='unbounded'/>
     </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="EndUserIdentifierElement" 
type="ctcc_common_xsd:EndUserIdentifier"/>
  <xsd:complexType name='EndUserIdentifier'>
     <xsd:sequence>
        <xsd:element name='value' type='xsd:anyURI'/>
     </xsd:sequence>
  </xsd:complexType>
</xsd:schema>
<xsd:schema
  
targetNamespace='http://www.chinatelecom.com.cn/schema/ctcc/enhanced_call/v1_0'
  
xmlns:ctcc_enhanced_call_xsd='http://www.chinatelecom.com.cn/schema/ctcc/enhanced_call/v1_0'
  xmlns:ctcc_common_xsd='http://www.chinatelecom.com.cn/schema/ctcc/common/v1_0'
  xmlns:xsd='http://www.w3.org/2001/XMLSchema'>

  <xsd:complexType name='PowerAction'>
     <xsd:sequence>
        <xsd:element name='actionToPerform' 
type='ctcc_enhanced_call_xsd:PowerActionValues'/>
        <xsd:element name='presentnumber' 
type='ctcc_common_xsd:EndUserIdentifier'/>
        <xsd:element name='routingAddressArray' 
type='ctcc_common_xsd:ArrayOfEndUserIdentifier'/>
        <xsd:element name='askCallResult' 
type='ctcc_enhanced_call_xsd:AskCallResult'/>
        <xsd:element name='callLimit' type='xsd:int'/>
        <xsd:element name='resourceAddress' 
type='ctcc_enhanced_call_xsd:ResourceAddressValues'/>
     </xsd:sequence>
  </xsd:complexType>

<xsd:simpleType name='PowerActionValues'>
<xsd:restriction base='xsd:string'>
<xsd:enumeration value='EndCall'/>
<xsd:enumeration value='RunUI'/>
<xsd:enumeration value='BaseCall'/>
<xsd:enumeration value='SequenceCall'/> <xsd:enumeration value='ConcurrentCall'/>
</xsd:restriction>
</xsd:simpleType>


  <xsd:simpleType name='AskCallResult'>
     <xsd:restriction base='xsd:string'>
        <xsd:enumeration value='False'/>
        <xsd:enumeration value='True'/>
     </xsd:restriction>
  </xsd:simpleType>

<xsd:complexType name='ResourceAddressValues'>
<xsd:sequence>
<xsd:element name='addressType' type='ctcc_enhanced_call_xsd:AddressTypeValues'/>
<xsd:element name='addressValue' type='xsd:string'/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name='AddressTypeValues'>
<xsd:restriction base='xsd:string'>
<xsd:enumeration value='AnnounceID'/>
<xsd:enumeration value='SynAnnounceID'/>
<xsd:enumeration value='URL'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name='ServiceStatus'>
<xsd:sequence>
<xsd:element name='serviceStatusType' type='ctcc_enhanced_call_xsd:ServiceStatusType'/>
<xsd:element name='duration' type='xsd:int'/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name='ServiceStatusType'>
<xsd:restriction base='xsd:string'>
<xsd:enumeration value='Normal'/>
<xsd:enumeration value='Abnormal'/>
</xsd:restriction>
</xsd:simpleType>


</xsd:schema>


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



-- Gareth Reakes, Managing Director Parthenon Computing +44-1865-811184 http://blog.parthenoncomputing.com/xerces/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

-- Gareth Reakes, Managing Director Parthenon Computing +44-1865-811184 http://www.parthcomp.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to