Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > Other Languages

Reply
 
LinkBack Thread Tools
Old August 6th, 2006, 08:30 AM   #1
New Member
 

Join Date: Aug 2006
Location: Sežana
Age: 39
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 myghty is on a distinguished road
Xsd Xml Schema - Same Element With Different Properties

Hi!
I am writing an xml schema and i came to an problem. I want to have
element "protocol" 2 times but each time with different properties. It also has
an element access also each time different properties.
I have tried the choice option but my validation tool says that a can't use the same element. Is it possible to solve this in an different way?

<xs:choice>
<xs:element name="protocol">
<xs:complexType>
<xs:sequence>
<xs:element name="type" type="xs:string" />
<xs:element name="version" type="xs:string" />
<xs:element name="timeout" type="xs:integer" />
<xs:element name="access" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="security_level" type="xs:string" />
<xs:element name="user_security_name" type="xs:string" />
<xs:element name="user_context_name" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="protocol">
<xs:complexType>
<xs:sequence>
<xs:element name="type" type="xs:string" />
<xs:element name="access" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="community" type="xs:string" />
<xs:element name="set_community" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

Is it possible to solve this? Please help.
myghty is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
xsd , xml , schema , same , element , different , properties


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Element has no properties when querying antonyx JavaScript 13 August 25th, 2006 10:06 AM
XML Schema validation with schematron andregm Other Languages 0 April 28th, 2006 07:00 AM
nesting in XML schema - help needed sh33p1985 Other Languages 0 January 18th, 2006 03:53 PM
XHTML Block Element in an Inline Element gohankid77 HTML, XHTML and CSS 6 July 27th, 2004 06:15 AM
has no properties pmichael JavaScript 3 January 9th, 2004 02:10 PM


Search Engine Optimization by vBSEO 3.2.0 RC8