Project

Profile

Help

Bug #1525

Mixed case SVG element names

Added by Manfred Staudinger about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Low
Assignee:
Sprint/Milestone:
-
Start date:
2012-05-06
Due date:
% Done:

0%

Estimated time:

Description

If mixed case SVG elements appear in the static HTML (here svg:clipPath and svg:textArea@) their names get translated to lower case, but still show up in Opera 11.62 [@id_27@]. If later on copied over with @xsl:copy-of the svg:textArea does not display anymore. Dynamically added elements get their names translated to lower case and do not show up in the browser if written with a NS prefix, but display normally if added with a default NS [compare id_25 and id_91@]. The @svg:text element shows none of these problems [@id_69@].

http://test.rudolphina.org/Plaene/test3/svg-t5-011.xhtml?logLevel=FINE

svg-t5-011.xhtml (2.21 KB) svg-t5-011.xhtml Manfred Staudinger, 2012-05-06 21:37
svg-t5-011.svg (780 Bytes) svg-t5-011.svg Manfred Staudinger, 2012-05-06 21:37
svg-t5-browser-v2.xsl (4.28 KB) svg-t5-browser-v2.xsl Manfred Staudinger, 2012-05-06 21:37
svg-t5.css (822 Bytes) svg-t5.css Manfred Staudinger, 2012-05-06 21:37

History

#1 Updated by Philip Fearon about 8 years ago

  • Status changed from New to In Progress
  • Assignee set to Philip Fearon

This issue is the same as #1483 - I think you're resubmitted this as a bug because the beta 0.2 release doesn't fix the issue as you had hoped.

In #1483 I state:

The HTML5 specification doesn't support the use of such prefixes, instead the SVG namespace should be declared as the default namespace for top level SVG elements embedded within HTML.

Saxon-CE has now been (for the next release) amended to conform to this spec when writing to the HTML or XHTML DOM - thus fixing the Opera issue at the same time.

To be more specific on this - Saxon-CE was fixed to conform to the XSLT specification so that if you use no prefix for the SVG namespace elements in your XSLT then this is reflected in what is written to the DOM.

I suspect the difficulty is because you'd like to use the svg prefix in literal result elements in your XSLT but Opera insists on you using no prefix if you want to preserve the case of names. If this is the case, you might be able to use the xsl:namespace-alias instruction to get to a solution that is more workable. Or, perhaps - for the future - Saxon-CE should have an xsl:output method setting (html5?) that detects SVG namespaced elements and always ensures they have no prefix when written to the DOM?

Because the JavaScript API allows Saxon-CE to be used in cases where the output of a transform is XML but not HTML, we have to be a bit more careful with how nodes are written to the DOM using the default method.

#2 Updated by Manfred Staudinger about 8 years ago

Sorry about that: I did not realize that default and prefixed element namespace is not the same in HTML5. I have to do more reading - please close this issue!

#3 Updated by Philip Fearon about 8 years ago

  • Status changed from In Progress to Closed

Please register to edit this issue

Also available in: Atom PDF