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

Notations, subschemas, entities

  • From: John Cowan <cowan@l...>
  • To: XML Dev <xml-dev@i...>
  • Date: Thu, 04 Jun 1998 15:54:00 -0400

subschemas
Toby Speight wrote:

> I can't remember (nor find easily in the spec) whether notations must
> be declared before use.

There seems to be no such requirement.  The VC simply says:
"Values of this type [i.e., notation] must match one of the notation
names included in the declaration; all notation names in the
declaration must be declared."

> John> Indeed, I'm thinking that XSchemas should have structure, ...
> 
> Sorry, you lost me with this paragraph. Can you illustrate it with an
> example?

In other words:

	<DOCTYPE root="blah">
	 <DOCTYPE>
           <ELEMENT id="blah"> ... </ELEMENT>
	   <ELEMENT id="bazz"> ... </ELEMENT>
	   <NOTATION id="foo"> ... </ELEMENT>
	 </DOCTYPE>
	 <DOCTYPE>
	   <ELEMENT id="zim"> ... </ELEMENT>
	   <DOCTYPE>
	    <ENTITY ...> ... </ENTITY>
	    <ENTITY ...> ... </ENTITY>
	   <ELEMENT id="zam"> ... </ELEMENT>
	 </DOCTYPE>
	</DOCTYPE>

In one sense it would be better to have a separate element for
grouping declarations, but using the same element for both
root and subordinate allows direct incorporation of XSchemas
into other XSchemas either by cut-and-paste or by external
text entities, as I mentioned before.

> I'm not keen on arbitrary markup, because I'm interested in processing the
> documentation with DSSSL to give a pretty-printed human-readable document
> to go with the DTD. It's hard to do that if you don't know what elements
> to expect.

Out of my depth.

> And, as I mentioned, we'll want some XSchema-specific elements
> to refer to ELEMENT definitions (for example).

XLink can do that using "#elementname", but that may not be the
Right Thing.

My concern is that we will bloat the simple XSchema DTD with
elements for marking up fancy text.  If we were going to do that,
we'd need a subschema (see above!) that handled just the bare bones
of fancy text, preferably in an HTML-compatible way.

(I do happen to have such a thing in my back pocket....)

> <!ELEMENT EXTERNAL-ENTITY (DOC)>
> <!ATTLIST EXTERNAL-ENTITY
> %external;
> notation CDATA #IMPLIED>
> <!ELEMENT INTERNAL-ENTITY (DOC)>
> <!ATTLIST INTERNAL-ENTITY
> value CDATA #REQUIRED>

Using an attribute value to hold the definition of an internal
entity involves processing out all markup characters (&, <, ', "),
thus:

<!ENTITY yutz 'I use &int-entity; and refer to "&ext-entity;"'>

would come out as

<INTERNAL-ENTITY value="I use &amp;int-entity; and refer to &quot;&amp;ext-entity;&quot;"/>

whereas

<INTERNAL-ENTITY><![CDATA[I use &int-entity, and refer to "&ext-entity"]]></INTERNAL-ENTITY>

is far more readable and writable.

The spec should say that the content of an ENTITY element should be
wrapped in a CDATA marked section.

-- 
John Cowan	http://www.ccil.org/~cowan		cowan@c...
	You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
	You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
		Clear all so!  'Tis a Jute.... (Finnegans Wake 16.5)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.