Fernando Silva wrote:
> I have a doubt in how to define a schema for the following XML:
>
> <X_0>
> <A>1</A>
> <B>2</B>
> </X_0>
> <X_1>
> <A>1</A>
> <B>2</B>
> </X_1>
> <X_2>
> <A>1</A>
> <B>2</B>
> </X_2>
> <X>
> <N>3</N>
> </X>
>
> The problem is that I don't know who many elements X_y (y is the
> number) are going to appear. They are variable.
> Is this possible to define in a Schema? Or I just have to insert as
> many X_y as the possible maximum?
I would consider changing the structure to
<x-list>
<x x="1">...</x>
<x y="2">...</x>
...
<x y="n">...</x>
</x-list>
as you can't have a schema where element names have a variable part
--
Martin Honnen
http://JavaScript.FAQTs.com/