Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

#67 Metadata not being assign correctly if no <title> tags

closed
zvtm (49)
5
2012-10-24
2008-06-20
greenfreak
No

If a SVG file is being imported and the tags do not have tags associated with them, the context information will not be assigned to the new Glyph. It this a requirement of inputted SVG files? If not, the patch below should solve this problem by removing the check for 'title' tags.</p>

Discussion

  • greenfreak

    greenfreak - 2008-06-20
     
  • Emmanuel Pietriga

    Logged In: YES
    user_id=616074
    Originator: NO

    I don't think this is a requirement. The reason for this is probably that there was no reason to create a context if no information had to be propagated (lazy instantiation of context). Are there cases where contextual information is not propagated in the current implementation?

     
  • greenfreak

    greenfreak - 2008-06-23

    Logged In: YES
    user_id=2114797
    Originator: YES

    Yes, that explicit check for the tags is not allowing the 'id' attr to be assigned to the Metadata when importing the SVG. I'm using a custom SVG file that wraps different svg element types by using the <g> tag; essentially grouping things like text, rect, and polygons. I need the 'id' attribute in the <g> tag in order to assign the Glyph owners appropriately. I will have to include <title> tags in all of my <g> tags to retrieve this data, unless you remove that explicit check. I removed this on my end (see patch) and the data propagates correctly. I just wasn't sure if you wanted to leave the check in place because of DOT requirements or other requirements I'm not aware of. I didn't want to break the ZGR Viewer. :)</p>

     
  • Emmanuel Pietriga

    Logged In: YES
    user_id=616074
    Originator: NO

    It probably wouldn't break anything, and it would indeed be more general. I'll fix this and see if it has any consequence on ZGRViewer. If it does not, then I'll commit this to the trunk.

     
  • Emmanuel Pietriga

    Logged In: YES
    user_id=616074
    Originator: NO

    It seems to work fine (in the sense that it does not break my ZGRViewer test cases). I've committed a new version of SVGReader (not exactly your patch, but should behave appropriately). In SVN since 20080623. In ZVTM 0.9.7-SNAPSHOT. Let me know if it works for you.

     
  • greenfreak

    greenfreak - 2008-06-23

    Logged In: YES
    user_id=2114797
    Originator: YES

    Yep, this works for my current test cases; it behaves as I expected. Feel free to close this out and I'll submit another report if this becomes an issue in the future. Thanks!

     

Anonymous
Anonymous

Cancel  Add attachments