[jira] [Updated] (BATIK-1252) Exception by parsing link from one pattern to the other

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (BATIK-1252) Exception by parsing link from one pattern to the other

Simon Steiner (Jira)

     [ https://issues.apache.org/jira/browse/BATIK-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Tsarev updated BATIK-1252:
---------------------------------
    Attachment: BATIK-1252_fix.patch

> Exception by parsing link from one pattern to the other
> -------------------------------------------------------
>
>                 Key: BATIK-1252
>                 URL: https://issues.apache.org/jira/browse/BATIK-1252
>             Project: Batik
>          Issue Type: Bug
>          Components: Bridge
>    Affects Versions: 1.10
>            Reporter: Vladislav Fuks
>            Priority: Major
>             Fix For: 1.10
>
>         Attachments: BATIK-1252_fix.patch, Example.svg
>
>
> There is an exception when parsing local link (_xlink:href_ attribute) from one _<pattern>_ element to the other _<pattern>_ element.
> In the attached file "Example.svg" there are two _<pattern>_ elements: "ptrn5-363" and "ptrn5-363_381". The second one refers to the first through it's _xlink:href_ attribute. By parsing second _<pattern>_ element the following exception is thrown:
> The URI "#ptrn5-363" specified on the element pattern is invalid (org.apache.batik.bridge.BridgeException) at org.apache.batik.bridge.SVGPatternElementBridge.extractPatternContent(SVGPatternElementBridge.java:259)
> In the code position before (SVGPatternElementBridge.java:258) by checking parsed url (_ParsedURL_) there is no check if reference for this parsed url is defined. So if existing check
> "_if (!purl.complete())_" will be replaced by: "_if (!purl.complete() && getRef() == null)_" the attached example file will be parsed correctly.
>  
> P.S. Also with this extended check no exception will be thrown if css contains links to the _<pattern>_ element (_fill:url(#ptrn5-363_381)_) which aren't immediate children of a _<defs>_ element.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]