Click here to Skip to main content
15,903,175 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Detect Invalid sequence of tag in XML document using schema. Pin
tprakash18-Jun-09 18:10
tprakash18-Jun-09 18:10 
GeneralRe: Detect Invalid sequence of tag in XML document using schema. Pin
tprakash14-Jul-09 2:18
tprakash14-Jul-09 2:18 
GeneralRe: Detect Invalid sequence of tag in XML document using schema. Pin
Stuart Dootson14-Jul-09 2:25
professionalStuart Dootson14-Jul-09 2:25 
GeneralRe: Detect Invalid sequence of tag in XML document using schema. Pin
tprakash14-Jul-09 22:54
tprakash14-Jul-09 22:54 
GeneralRe: Detect Invalid sequence of tag in XML document using schema. Pin
Stuart Dootson15-Jul-09 0:27
professionalStuart Dootson15-Jul-09 0:27 
GeneralRe: Detect Invalid sequence of tag in XML document using schema. Pin
tprakash15-Jul-09 21:35
tprakash15-Jul-09 21:35 
GeneralRe: Detect Invalid sequence of tag in XML document using schema. Pin
tprakash14-Jul-09 23:13
tprakash14-Jul-09 23:13 
GeneralRe: Detect Invalid sequence of tag in XML document using schema. Pin
Stuart Dootson15-Jul-09 0:42
professionalStuart Dootson15-Jul-09 0:42 
As I said in this message[^], I think I was wrong about not being able to use ref attributes. I'm not sure what was going on in my head that day Smile | :)

This schema validates your XML with libxml2 2.7.3 (which is a pretty recent release). I've put in the maxOccurs attribute of the sequence that contains the Permission element to enable multiple Permission elements in a Permissions element.

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

   <xs:element name="Roles">
      <xs:complexType>
         <xs:sequence>
            <xs:element ref ="Role"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>

   <xs:element name ="Role">
      <xs:complexType>
         <xs:sequence>
            <xs:element ref="Permissions"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>

   <xs:element name ="Permissions">
      <xs:complexType>
         <xs:sequence maxOccurs="unbounded">
            <xs:element name ="Permission" type="xs:string" />
         </xs:sequence>
      </xs:complexType>
   </xs:element>


</xs:schema>


Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Detect Invalid sequence of tag in XML document using schema. Pin
tprakash15-Jul-09 22:28
tprakash15-Jul-09 22:28 
Question[Message Deleted] Pin
lostinxsl16-Jun-09 4:49
lostinxsl16-Jun-09 4:49 
AnswerRe: XSL: which generates Javascript Pin
led mike16-Jun-09 5:36
led mike16-Jun-09 5:36 
General[Message Deleted] Pin
lostinxsl16-Jun-09 13:45
lostinxsl16-Jun-09 13:45 
GeneralRe: XSL: which generates Javascript Pin
led mike17-Jun-09 4:29
led mike17-Jun-09 4:29 
QuestionXML Accuracy Puzzle Pin
contactowen16-Jun-09 2:40
contactowen16-Jun-09 2:40 
AnswerRe: XML Accuracy Puzzle Pin
Stuart Dootson16-Jun-09 2:54
professionalStuart Dootson16-Jun-09 2:54 
GeneralRe: XML Accuracy Puzzle Pin
contactowen16-Jun-09 4:19
contactowen16-Jun-09 4:19 
GeneralRe: XML Accuracy Puzzle Pin
Stuart Dootson16-Jun-09 5:43
professionalStuart Dootson16-Jun-09 5:43 
QuestionImage in XML attribute Pin
Nikkiee15-Jun-09 16:59
Nikkiee15-Jun-09 16:59 
AnswerRe: Image in XML attribute Pin
Stuart Dootson15-Jun-09 22:48
professionalStuart Dootson15-Jun-09 22:48 
QuestionSpecifying condition with count function Pin
Fadi Yoosuf15-Jun-09 0:28
Fadi Yoosuf15-Jun-09 0:28 
AnswerRe: Specifying condition with count function [modified] Pin
Stuart Dootson15-Jun-09 4:05
professionalStuart Dootson15-Jun-09 4:05 
GeneralRe: Specifying condition with count function Pin
Fadi Yoosuf16-Jun-09 1:03
Fadi Yoosuf16-Jun-09 1:03 
QuestionXML DOM insertBefore() Method Pin
p_196011-Jun-09 23:58
p_196011-Jun-09 23:58 
AnswerRe: XML DOM insertBefore() Method Pin
George L. Jackson12-Jun-09 2:23
George L. Jackson12-Jun-09 2:23 
QuestionHow to modify XML file's Element and Attribute copying from another file using C# Pin
Nikkiee11-Jun-09 13:45
Nikkiee11-Jun-09 13:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.