[xsl] Entities in XML Schemas [OT?]

Subject: [xsl] Entities in XML Schemas [OT?]
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Mon, 13 Oct 2003 13:15:00 +0000
Hello all,

I do not know if this is off topic for this list. If that is the case, then please direct me to the right place.

I would like to know how to make the equivalent of entities in schema, alternatively how to use entities as is in schemas.

Having an XML document somewhat like:

<text>This is <Bold/>bold</Bold> text</text>
<text>Look at comment<Comment>Beware!</Comment> to be sure you have understood everything</text>
<text><Bold><Italic>Both bold and italic text</Italic></Bold></text>

in DTD I would have something like:

<!-- snip -->
<!ENTITY % Inline "Bold|Italic|Uline|Comment;">
<!ELEMENT text (#PCDATA|%Inline;)*>
<!ELEMENT Bold (#PCDATA|%Inline;)*>
<!ELEMENT Italic (#PCDATA|%Inline;)*>
<!-- Snip -->

The entity contains numerous other types than those shown.

Now I at trying to convert to XML Schema, but I don't know how to do entities like this in schema.
I have Eric van der Vlist's XML Schema book, but have found no examples of this kind.

I want to be able to write something like:

<xsd:element name="text" minOccurs="0" maxOccurs="unbounded" type=???>

What to write in these places (marked with ???).
I would primarily like a solution where I do not have to write something like: Bold|Italic| ... a lot of times.

I hope that someone can help me with this.

Ragulf Pickaxe :)

Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread