On 23/04/2010 14:49, Jacobus Reyneke wrote:
Thank you very much Martin and Michael. I think I understand it now.
As always it is astonishing how helpful you gentleman are. Thanks again.
If I may ask Michael, why the warning on namespaces? It's probably a
bit nutty, but I'm currently using them as a way to highlight my XML!
Kind regards,
Jacobus
th ewarning about namespaces is because testing the element name as a
string is not namespace aware.
If you select "x:foo" then it will select that element whatever prefix
is used in the source, but if you go
<xsl:variable name="x" select="'x:foo'"/>
select="*[name()=$x]"
then it will only work correctly if the namespace bindings in the source
are the same as those in the stylesheet as it will (only) match any
element with name 'x:foo' whatever namespace x is bound to in that
elements context,
David
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--