[Playlist] Schema files and element order
Tim Mccune
tmccune at yahoo-inc.com
Wed Feb 14 19:50:35 UTC 2007
On Wed, 2007-02-14 at 20:17 +0100, Sebastian Pipping wrote:
> --------------------------------------------------------------------------
> I'm not sure if <choice> is the solution.
> Let's look at this one:
>
> <xsd:choice minOccurs="0" maxOccurs="unbounded">
> <xsd:element name="abc" minOccurs="0" maxOccurs="1"/>
> <xsd:element name="def" minOccurs="0" maxOccurs="unbounded"/>
> </xsd:choice>
>
> Doesn't this allow more than one <abc> tag in the end?
> We would need <abc> at any place between <def> but maximum once.
> --------------------------------------------------------------------------
Yes, but you can still achieve the behavior that you describe.
<xsd:choice>
<xsd:sequence>
<xsd:sequence>
<xsd:element name="def" maxOccurs="unbounded"/>
<xsd:element name="abc" minOccurs="0"/>
</xsd:sequence>
<xsd:element name="def"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element name="def" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.musicbrainz.org/pipermail/playlist/attachments/20070214/55a847ad/attachment.htm
More information about the Playlist
mailing list