User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 402,836 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,056 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our XML, XSLT and XPATH advertiser: Programming Forums
Views: 537 | Replies: 0
Join Date: Nov 2006
Posts: 17
Reputation: santoo is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
santoo santoo is offline Offline
Newbie Poster

help regarding xsd schema

  #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.
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb XML, XSLT and XPATH Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the XML, XSLT and XPATH Forum

All times are GMT -4. The time now is 12:02 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC