473,480 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

XSD schema problem

Hi all,
I have a problem with xml that output from application I need to
validate one of the values by using XSD schema
The xml output like this

<?xml version="1.0" encoding="UTF-8"?>
<csv:csv xmlns:csv="http://xmlns.myapplication.com/2007/message-
format/
csv"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.myapplication.com/2007/
message-format/csv right.xsd" >
<csv:line>
<csv:field>I</csv:field>
<csv:field>3871</csv:field>
<csv:field>0</csv:field"i want to check this value"
<csv:field>25042008</csv:field>
<csv:field>0</csv:field>
<csv:field>4233</csv:field>
</csv:line>
<csv:line>
<csv:field>I</csv:field>
<csv:field>3871</csv:field>
<csv:field>29042008</csv:field>
<csv:field>25042008</csv:field>
<csv:field>6600183376</csv:field>
<csv:field>4233</csv:field>
<csv:field/>
</csv:line>
<csv:line>
<csv:field>I</csv:field>
<csv:field>3871</csv:field>
<csv:field>29042008</csv:field>
<csv:field>25042008</csv:field>
</csv:line>
</csv:csv>

I get the XSD schema like this

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:csv="http://xmlns.myapplication.com/2007/message-
format/csv" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
attributeFormDefault="unqualified"
elementFormDefault="qualified" targetNamespace="http://
xmlns.myapplication.com/2007/message-format/csv"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="csv">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="line">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="field"
type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
But the problem that I want to check the value of the third tag
<csv:fieldto know if it contain 0 or 1
Can anyone help me to write this XSD
Jun 27 '08 #1
0 1275

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4194
by: C. M. Sperberg-McQueen | last post by:
wooks (wookiz@hotmail.com) wrote: > <?xml version='1.0'?> > <userlogin xmlns="urn:faster:userlogin" > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> > <login>mick</login> > ...
1
2695
by: Gregg Williams | last post by:
Hi--I am having a problem designing a schema to fit my XML data, and I'm hoping that someone can help. Essentially, I have a schema in mind and two target vocabularies for it, where one vocabulary...
4
2368
by: Gordon Dickens | last post by:
I have target xml to generate from schema. All of the XML instances have the same global element i.e. <base>. I would like to combine all of the schemas into a single schema where I could...
5
2218
by: Zombie | last post by:
Hi, Can I have 2 namespaces in the same XML schema? In the schema, I wish to declare elements such that some of them belong to one namespace and others belong to a second namespace. Is this...
1
2694
by: Marcello Villani | last post by:
Hi All, I have this problem: my customer sent me a RDF file with its own schema. I absolutely need to convert that RDF schema in XML schema. Does anybody knows if this operation is possible? Can...
2
1508
by: Rajesh Jain | last post by:
I Have 2 separate schemas. --------------Schema 1 is defined as below----------- <xs:schema targetNamespace="http://Schemas/1" xmlns="http://Schemas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema"...
4
2468
by: Iain A. Mcleod | last post by:
Hi I'm stuck with the following schema validation problem in VS.NET 2003: I have two types of xml document and related schema: project and projectCollection. A projectcollection is just a set...
2
7276
by: Ali | last post by:
I am having problem compiling schema contained in WSDL file when analyzing schema types contained in it (for example http://www.ebout.net/net/GoogleSearch.wsdl). Following code demonstrates my...
5
4932
by: paul_zaoldyeck | last post by:
does anyone know how to validate an xml file against multiple defined schema? can you show me some examples? i'm making here an xml reader.. thank you
2
2388
by: yannick.beot | last post by:
Hi, I have a problem with nested namespace in a schema. I defined a schema A. A is importing a schema B with the namespace nsB and a schema C with the namespace nsC. But both B and C are...
0
7039
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7037
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6735
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5326
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4770
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4476
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
176
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.