[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Matching namespaces - one works, one doesn't ?

Subject: Matching namespaces - one works, one doesn't ?
From: "Kerry, Richard" <richard.kerry@xxxxxxxxxxx>
Date: Thu, 29 Nov 2007 11:22:39 -0000
 Matching namespaces - one works
Can anyone point me at what I might be doing wrong.
I am using an identity template with matches to copy this some xml but
remove certain attributes.
I'm having trouble dealing with a couple of attributes that have
namespaces.

My source xml includes an element as follows :

<slots xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="generic_snmp_slots.xsd">

Using this XSL template :
	<xsl:template
match="@*[local-name()='noNamespaceSchemaLocation']" />

successfully removes the xsi:noNamespaceSchemaLocation attribute.

Ie the result is
<slots xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

However, if I have
	<xsl:template match="@*[local-name()='xsi']" />
It has no effect on the xmlns:xsi attribute, which remains in the
output.

I've also tried
	<xsl:template match="@xsi" />
Also with no effect.

Looking at the Namespaces page on D Pawson's XSL FAQ I tried adding
	xmlns:mytest="http://www.test.org"
To the xsl:stylesheet element and using
	<xsl:template match="@mytest:xsi" />
As the match.  This also has no effect, the xmlns:xsi attribute remains
in the output.


I may well be failing to understand something about namespaces.
Is the xmlns namespace perhaps handled differently ?

Can anyone tell me what I'm doing wrong or advise a solution ?




Richard Kerry
Colledia Control Engineer
Siemens IT Solutions and Services Ltd
Room 457 Design Building, BBC Television Centre, Wood Lane, London, W12
7RJ
T: +44 (0)20 82259063 F: +44 (0)20 8576 8182 M: +44 (0)7921 244993
Email: richard.kerry@xxxxxxxxxxx
<blocked::mailto:richard.kerry@xxxxxxxxxxx>
Website:  www.siemens.co.uk/it-solutions
<blocked::outbind://47/www.siemens.co.uk/it-solutions>

This e-mail contains confidential information and is for the exclusive
use of the addressee/s.  If you are not the addressee, then any
distribution, copying or use of this e-mail is prohibited. If received
in error, please advise the sender and delete it immediately.  We accept
no liability for any loss or damage suffered by any person arising from
use of this e-mail.

Siemens IT Solutions and Services Limited
Registered No: 1203466 England
Registered Office: Faraday House, Sir William Siemens Square, Frimley,
Camberley, GU16 8QD

Current Thread

Back To School Sale!

Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop.

Offer ends August 31, 2008.

Coupon Code
TRTY-C4JV-OFF

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.