Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML schema question

Reply
Thread Tools

XML schema question

 
 
Robert Harakaly
Guest
Posts: n/a
 
      10-27-2004
Hi
I have a problem to express my needs in the XML schema. I need to
validate an XML configuration file, where I have following XML tags:

<param name="some_name" value="some_value"/>

But I need to make a check between the name attribute value (some_name)
and the type(value) of the value attribute. I need to find a way how to
define the type of the "value" attribute for each value of the "name"
attribute.

In other words: I need to express that the attribute "name" can have a
value from a list of enumerated values ("name1", "name2", ...) but also
that each name form this list has associated its own type of the value
attribute.

In XML it would be:
....
....
<param name="name1" value="99"/>
<!-- value for "name1" is an integer from 0 to 100 -->
<param name="name2" value="String"/>
<!-- value for "name2" is a string -->
....
....


!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The:
<param name="name1" value="101"/>
or
<param name="name1" value="Some_name"/>

should generate a validation error.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I'll appreciate any direction where to look, URL, partial solution from
which I can learn, etc, to help me to solve this problem.

Thank you

Robert Harakaly
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
Validation with XSD using XML::LibXML::Schema, and XML::Validator::Schema huntingseasonson@gmail.com Perl Misc 5 11-29-2006 12:37 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
XML Schema to XML Schema Conversion Hari Om XML 1 03-02-2004 09:04 PM
XML schema regular expressions question and recommended XML Schema book Fred Smith XML 1 02-05-2004 11:12 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57