file format for including svg/mathml/other xml


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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

However, whichever option we pick, we have to determine the format for
<data>. I see the following options -

<data>
<d ...>
base64 stuff
</d>
<svgImage ...>
svg stuff
</svgImage>
</data>

This has the advantage of not breaking the current format. It has the
disadvantage that <d> as a name is pretty bad. It also prevents us from
having other base64 encoded data other than png images without further
modification.

option 2 -

<data>
<pngImage . . . >
base64
</pngImage>
<svgImage . . .>
svg
</svgImage>
<-- and in the future
<gifImage>
base64
</gifImage>
- -->
</data>

This is just a slightly more clear and extensible version of option 1.

option 3 -

<data>
<d>
base64
</d>
<d>
<svgImage>
svg
</svgImage>
</d>
</data>

This is illegal XML, and looks ugly to boot. We shouldn't use it.

Significantly, none of these can be specified via DTD. Therefore, one we
introduce this sort of thing, the DTD will be deprecated (although still
maintained).

                                     sam th
                                     sam@uchicago.edu
                                http://sam.rh.uchicago.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5CPHZt+kM0Mq9M/wRAtyEAKCLqH/IgJWdpLetGeahYOm+BIm4eQCg25nv
lhH+aNok2if6pVX0+epkUx4=
=4FdZ
-----END PGP SIGNATURE-----



This archive was generated by hypermail 2b25 : Thu Apr 27 2000 - 21:05:14 CDT