I'm trying to understand the comment "We will not render physical
attributes in the XMLNS namespace or whose name is \"xmlns\". In fact, the
parser will eat these."
Does this mean "xmlns:foo" in the following example isn't supported?
<script type="text/os-template" xmlns:foo="http://example.com"
xmlns:os="http://ns.opensocial.org/2008/markup"><foo:Bar><foo:element>Hello</foo:element></foo:Bar></script>
xmlns attributes on script elements in HTML are useless since script
elements can't contain child elements. You may think the script element in
your example contains elements in the foo namespace, but it doesn't.
That makes sense to me, but it seems to be the way custom os-template[1]
tags are implemented in Shindig (if i understand it correctly).
Neko ignores the xmlns attribute on script elements during the initial
parse and considers everything inside as text.
After the initial parse
org.apache.shindig.gadgets.parse.GadgetHtmlParser#reprocessScriptForOpenSocial()[2]
reprocess all script nodes individually.
There are other similar examples that fail in TemplateBasedTagHandlerTest
when CajaHtmlParser is used.
[1] -
http://opensocial-resources.googlecode.com/svn/spec/1.0/OpenSocial-Templating.xml#rfc.section.10.4.1
[2] -
http://github.com/apache/shindig/blob/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/GadgetHtmlParser.java#L293