W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2000

compound docs: try processContents="strict" or equivalence classes

From: Dan Connolly <connolly@w3.org>
Date: Mon, 01 May 2000 17:54:53 -0500
Message-ID: <390E0B3D.62FF2D99@w3.org>
To: sytobinh@uchicago.edu
CC: xmlschema-dev@w3.org, abiword-dev@abisource.com
Hi Sam,

I just came across:

/====
excerpt from
Subject: file format for including svg/mathml/other xml
From: sam th (sam@bur-jud-118-039.rh.uchicago.edu)
Date: Thu Apr 27 2000 - 21:05:11 CDT 
http://www.abisource.com/mailinglists/abiword-dev/00/April/0327.html

Well, in poking around in the XML schema specs I finally figured out how 
to properly include non-abiword XML in an abiword document. however,
this 
will require some minor changes in how we represent the <d> element. 

Currently, we have 

<d name="name"> 
base64 encoded 
stuff here 
</d> 
            
Now, in order to include other XML in our document, it is neccessary to 
have an element specifically for that purpose, like so 

<xml-container> 
<svg> 
<path d="blah blah blah"/> 
</svg> 
</xml-container> 

and then later 

<xml-container> 
<mathml> 
<mrow>a = b</mrow> <-- I realize this is bad MathML --> 
</mathml> 
</xml-container> 

However, it is not possible to validate these fragments, as any sort of 
(well-formed) XML can go into them. However, if we create seperate 
containers for each type of XML we want to include, we can do validation 
properly. This would look like 

<svgImage> 
<svg> 
<path d="..."/> 
</svg> 
</svgImage> 

and similarly for mathml. It is then possible to specify exactly what
XML 
can legally be in <svgImage>. Me being a sucker for validation, I like 
the second option. 
====/

There is another option: you can use processContents="strict" to
require that the contents of the <d> element have to be valid
w.r.t. a declared type. cf
	http://www.w3.org/TR/xmlschema-1/#Wildcard

I think the result would look like:

	<d>
	<svg xmlns='http://www.w3.org/2000/svg-20000303-stylable'>
	<path d="...">
	</svg>
	</d>

You might need some schemaLocation attributes... I don't think
there's an SVG schema available at that address just yet.

It seems like there should be a way to use equivalence classes
to say "any image-like thing can go here" and "svg is an image-like
thing".

But I haven't worked out the details.

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Monday, 1 May 2000 18:55:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:17 GMT