assign namespace to normal datasource?
This is an open discussion with 1 reply, filed under Troubleshooting.
Search
Ok I figured this out. My default namespace was xhtml (http://www.w3.org/2002/06/xhtml2), so instead of using the actual prefix, I matched by uri:
<xsl:template match="*[namespace-uri() = 'http://www.w3.org/2002/06/xhtml2']" >
Which is better anyway, since the prefixes themselves are arbitrary.
EDIT:
Actually, elements coming out of symphony data have a blank default ns, so this is the way I'm doing it:
<xsl:template match="*[namespace-uri() = 'http://www.w3.org/2002/06/xhtml2' or namespace-uri() = '' ]">
Create an account or sign in to comment.
I'm using a namespace as an xpath selector for doing some final formatting. Does anyone know if there is a way to apply a namespace to normal datasource outputs?
Basically, I have templates that use 'xhtml:*' as the match, but it only works with the markup in my templates (since it is namespaced), not the actual data coming from /data. Also, I'd rather not use a mode on the datasource matches, because some of the DS content will be in other namespaces, and meant for other templates.
Any thoughts? My plan B is to tweak tinyMCE to add prefixes or declare the default ns in a wrapper element, or something...