I want to use
some custom XML tags to add some extra information to the document. For
example, I may specify for certain group of graphic shapes, there are
certain callbacks. Those callbacks will be specified as either elements
or attributes.
Thomas DeWeese wrote:
This makes me think that you may want (or at least get away with) something that looks more like:
<svg:svg width="4cm" height="8cm" version="1.1" xmlns="http://example.org" xmlns:svg="http://www.w3.org/2000/svg"> <svg:ellipse cx="2cm" cy="4cm" rx="2cm" ry="1cm"> <callback-list> <!-- callbacks for the ellipse element --> <callback name="foo" function="bar"/> </callback-list> </svg:ellipse> </svg:svg>
This will work trivially "right out of the box".
This indeed works! But the callback related elements are not in SVG DTD,
so batik does not validate the document?
It does not do so by default[*] (even so Batik does check things fairly closely). Even with that the SVG Specification states that an SVG document is valid if it validates according to the SVG DTD after elements that are not in the SVG namespace have been removed.
[*] Squiggle has runtime options to turn on validation, although I don't believe it strips foreign namespaces prior to validation.
If I make a DTD or schema by adding some extra information to SVG DTD (is it possible to do inheritance with a DTD?), how can I let batik know?
The SVG DTD has a number of 'extension' entities that you can use to insert your elements as allowed children of the SVG elements. I can't tell you much more than this as I am not a DTD expert (and it is my belief that you need to be to make use of this feature :).
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]