XML Schema: all, sequence & groups

Yggxewva

New Member
I'm writing an XML schema for the first time and I found some usefull tools to help me writing it.Now I'm in a strange situation. The schema I wrote is valid for some tools and not for some others.This schema is a mix of "all", "sequence" and "group". Here is my XML schema:\[code\]<?xml version="1.0" encoding="utf-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:group name="test"> <xsd:all> <xsd:element name="e2" minOccurs="0" maxOccurs="1"/> <xsd:element name="e3" minOccurs="0" maxOccurs="1"/> <xsd:element name="e4" minOccurs="0" maxOccurs="1"/> </xsd:all> </xsd:group> <xsd:element name="e0"> <xsd:complexType> <xsd:sequence> <xsd:element name="e1" maxOccurs="unbounded"/> <xsd:group ref="test"/> </xsd:sequence> </xsd:complexType> </xsd:element></xsd:schema>\[/code\]Is this schema right?It goes right with this validator and this one too but the XML Tools plugin for Notepad++ says "Unable to parse schema file".P.S: I wrote this schema because I wanted to have an element "e0" with this the possibility to have a mix of e1, e2, e3 and e4. e2, e3 and e4 should appear 0 or 1 time and e1 could occurs an illimited times.For example this XML files should pass:\[code\]<e0> <e1/> <e1/> <e1/> <e1/> <e1/> <e2/></e0><e0> <e2/> <e3/> <e4/></e0><e0> <e1/> <e2/> <e3/> <e4/></e0>\[/code\]Do you know an other way to do this?Thanks
 
Back
Top