What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » XSD linking constraints to other elements

XSD linking constraints to other elements
Author: Message:
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
O.P. XSD linking constraints to other elements
Hai

ok so i dont really know how to explain this but....


XML code:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"
 
<!-- our test element, which has an attribute called limit <test limit="10"/> --->
<xs:element name="test">
    <xs:complexType>
        <xs:sequence>
            <xs:attribute name="limit" type="xs:integer"/>
        <xs:sequence>
    </xs:complexType>
</xs:element>
 
<!-- our xxx element, which we define the numbers constraints --->
<xs:element name="xxx">
    <xs:complexType>
        <xs:sequence>
            <xs:attribute name="num" type="xs:integer">
                <xs:simpleType>
                    <xs:restriction base="xs:integer">
                        <xs:minInclusive value="2"/>
                        <xs:maxInclusive value="40"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        <xs:sequence>
    </xs:complexType>
</xs:element>
 
 
</xs:schema>



ok so thats my xml schema file, now what i want to do is link the maxInclusive value to the attribute in the <test> element

is there anyway to do that?

eg so <xs:maxInclusive value="test[@limit]"/> or something


edit:


so turns out its impossible :(

This post was edited on 09-01-2009 at 06:34 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
09-01-2009 05:55 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On