help regarding xsd schema

Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2006
Posts: 17
Reputation: santoo is an unknown quantity at this point 
Solved Threads: 0
santoo santoo is offline Offline
Newbie Poster

help regarding xsd schema

 
0
  #1
Apr 29th, 2008
Hi,

this is my xml fragment

<?xml version="1.0" encoding="ISO-8859-1"?>

<Table xmlns="urn:UMS-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance/UMS_APP.xsd">
<Row>
<APP_ID>skumar</APP_ID>
<APP_NAME>1</APP_NAME>
<APP_DESC>Sample test application 2</APP_DESC>
<ACTIVE>true</ACTIVE>
</Row>
<Row>
<APP_ID>10</APP_ID>
<APP_NAME>Test3</APP_NAME>
<APP_DESC>sample test</APP_DESC>
<ACTIVE>true</ACTIVE>
</Row>
<Row>
<APP_ID>11</APP_ID>
<APP_NAME>Test4</APP_NAME>
<ACTIVE>true</ACTIVE>
</Row>
</Table>


this is the xsd schema file for validating the above xml

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="UMS_APPS"
targetNamespace="urn:UMS-application"
xmlns="urn:UMS-application" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Row">
<xs:complexType>
<xs:sequence>
<xs:element name="APP_ID" type="xs:positiveinteger"/>
<xs:element name="APP_NAME" type="xs:string" />
<xs:element minOccurs="0" name="APP_DESC" type="xs:string" default="" />
<xs:element name="ACTIVE" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>


when I validate the xml using the xsd it is saying validation success.

when I chenge the appid in xml to a string ,or appname to a integer value..still it running with out any errors.wher appid is of type integer and appname is of type string.plzz tell me whether there is any mistake in xsd file.

thanks.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the XML, XSLT and XPATH Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC