[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Entities in XML Schemas [OT?]

Subject: Entities in XML Schemas [OT?]
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Mon, 13 Oct 2003 13:15:00 +0000
text bold italic xsd
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:

<doc>
<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>
</doc>


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=???>
???
</xsd:element>

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.

Sincerely,
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.