Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Inkscape-SVG #5

Open
tmr232 opened this issue Feb 14, 2012 · 2 comments
Open

Use Inkscape-SVG #5

tmr232 opened this issue Feb 14, 2012 · 2 comments
Assignees
Milestone

Comments

@tmr232
Copy link
Owner

tmr232 commented Feb 14, 2012

Currently, the plain-svg option in inkscape is used.
It works, but has many limitations - any non-standard attribute (Inkscape's or custom) are removed from the final SVG.
This makes storing meta-data quite difficult.

@ghost ghost assigned tmr232 Feb 14, 2012
@tmr232
Copy link
Owner Author

tmr232 commented Feb 14, 2012

Basic testing shows that all custom SVG properties added in Inkscape are saved into the Inkscape-SVG file.
Browser display for Inkscape-SVG still needs to be tested - does it need extra manipulations or not???

@tmr232
Copy link
Owner Author

tmr232 commented Feb 18, 2012

Just found how to overcome the xml-namespace issue!

>>> expr = "//*[local-name() = $name]"

>>> print(root.xpath(expr, name = "foo")[0].tag)
foo

>>> print(root.xpath(expr, name = "bar")[0].tag)
bar

>>> print(root.xpath("$text", text = "Hello World!"))
Hello World!

From lxml documentation, right before "Namespaces and prefixes". That is going to save me some coding :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant