xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McCormack <...@mcc.id.au>
Subject Re: Fragment checking in IRI on svg:image/@xlink:href
Date Sun, 06 Mar 2011 05:10:00 GMT
Jeremias Maerki:
> Personally, I'm inclined to change:
> 
>         if (uriStr.indexOf('#') != -1) {
>             throw new BridgeException(ctx, e, ERR_ATTRIBUTE_VALUE_MALFORMED,
>                                       new Object[] {"xlink:href", uriStr});
>         }
> 
> to:
> 
>         if (uriStr.startsWith("#")) {
>             throw new BridgeException(ctx, e, ERR_ATTRIBUTE_VALUE_MALFORMED,
>                                       new Object[] {"xlink:href", uriStr});
>         }
> 
> Anything speaking against that?

I imagine that SVG view specifications in the fragment should be
honoured when referencing an SVG file from an <image>, anyway.  Throwing
an exception solely on the presence of a "#" seems wrong.  Having <image
xlink:href="something.svg#foo"> where foo is the ID of a graphic
elements should render the whole something.svg document, as if the
fragment wasn’t there, I think.

Also, in the presence of xml:base="", even <image xlink:href="#foo">
could be valid.

-- 
Cameron McCormack ≝ http://mcc.id.au/

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Mime
View raw message