You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Tonny Kohar <to...@kiyut.com> on 2004/03/30 03:19:49 UTC
DTD vs AttributeInitializer, is it bug?
Hi,
Sorry for crossposting.
I found that batik generate default attribute value for certain element
is invalid against the DTD.
For example in ImageElement batik generate default value attribute is
xlink:show="replace" where the DTD says it must be xlink:show="embed".
This will become problem because the SVG DOM generate by batik is not
valid against the DTD.
Here is the bugzilla id: 28035
However, I think the fix is quite simple, just replace the
AttributeInitializer of the problem element with the value valid from
the DTD. Here I provide the list of problem element with valid DTD
value. see below. I also include the snipset of the DTD for quick
reference (it is SVG 1.1 DTD though not 1.0)
<!ENTITY % SVG.XLink.attrib
"%XLINK.xmlns.attrib;
%XLINK.pfx;type ( simple ) #FIXED 'simple'
%XLINK.pfx;href %URI.datatype; #IMPLIED
%XLINK.pfx;role %URI.datatype; #IMPLIED
%XLINK.pfx;arcrole %URI.datatype; #IMPLIED
%XLINK.pfx;title CDATA #IMPLIED
%XLINK.pfx;show ( other ) 'other'
%XLINK.pfx;actuate ( onLoad ) #FIXED 'onLoad'
%SVG.XLink.extra.attrib;"
>
<!ENTITY % SVG.XLinkRequired.attrib
"%XLINK.xmlns.attrib;
%XLINK.pfx;type ( simple ) #FIXED 'simple'
%XLINK.pfx;href %URI.datatype; #REQUIRED
%XLINK.pfx;role %URI.datatype; #IMPLIED
%XLINK.pfx;arcrole %URI.datatype; #IMPLIED
%XLINK.pfx;title CDATA #IMPLIED
%XLINK.pfx;show ( other ) 'other'
%XLINK.pfx;actuate ( onLoad ) #FIXED 'onLoad'
%SVG.XLinkRequired.extra.attrib;"
>
<!ENTITY % SVG.XLinkEmbed.attrib
"%XLINK.xmlns.attrib;
%XLINK.pfx;type ( simple ) #FIXED 'simple'
%XLINK.pfx;href %URI.datatype; #REQUIRED
%XLINK.pfx;role %URI.datatype; #IMPLIED
%XLINK.pfx;arcrole %URI.datatype; #IMPLIED
%XLINK.pfx;title CDATA #IMPLIED
%XLINK.pfx;show ( embed ) 'embed'
%XLINK.pfx;actuate ( onLoad ) #FIXED 'onLoad'
%SVG.XLinkEmbed.extra.attrib;"
>
<!ENTITY % SVG.XLinkReplace.attrib
"%XLINK.xmlns.attrib;
%XLINK.pfx;type ( simple ) #FIXED 'simple'
%XLINK.pfx;href %URI.datatype; #REQUIRED
%XLINK.pfx;role %URI.datatype; #IMPLIED
%XLINK.pfx;arcrole %URI.datatype; #IMPLIED
%XLINK.pfx;title CDATA #IMPLIED
%XLINK.pfx;show ( new | replace ) 'replace'
%XLINK.pfx;actuate ( onRequest ) #FIXED 'onRequest'
%SVG.XLinkReplace.extra.attrib;"
>
- SVGOMScriptElement.java
--> %SVG.XLink.attrib;
* type = simple
* show = other
* actuate = onLoad
- SVGOMImageElement.java
--> %SVG.XLinkEmbed.attrib;
* type = simple
* show = embed
* actuate = onLoad
- SVGOMUseELement.java
--> %SVG.XLinkEmbed.attrib;
* type = simple
* show = embed
* actuate = onLoad
- SVGOMCursorElement.java
--> %SVG.XLinkRequired.attrib;
* type = simple
* show = other
* actuate = onLoad
- SVGOMColorProfileElement.java
--> %SVG.XLink.attrib;
* type = simple
* show = other
* actuate = onLoad
- SVGOMPatternElement.java
--> %SVG.XLink.attrib;
* type = simple
* show = other
* actuate = onLoad
- SVGOMAltGlyphElement.java
--> %SVG.XLink.attrib;
* type = simple
* show = other
* actuate = onLoad
- SVGOMTextPathElement.java
--> %SVG.XLinkRequired.attrib;
* type = simple
* show = other
* actuate = onLoad
- SVGOMMPathElement.java
--> %SVG.XLinkRequired.attrib;
* type = simple
* show = other
* actuate = onLoad
- SVGOMGlyphRefElement.java
--> %SVG.XLink.attrib;
* type = simple
* show = other
* actuate = onLoad
- SVGOMFEImageElement.java
--> %SVG.XLinkEmbed.attrib;
* type = simple
* show = embed
* actuate = onLoad
- SVGOMGradientElement.java
--> %SVG.XLink.attrib;
* type = simple
* show = other
* actuate = onLoad
- SVGOMFilterElement.java
--> %SVG.XLink.attrib;
* type = simple
* show = other
* actuate = onLoad
Regards
Tonny Kohar
--
Sketsa
SVG Graphics Editor
http://www.kiyut.com
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org