Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 5th, 2007, 05:42 AM
Registered User
 
Join Date: Jun 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Namespace in XML preventing XSL for-each

I have been given some client XML, with a namespace declared like this:
<Message>
<Person MessageId="Person" xmlns="http://www.xxx.com/SMDS">

My xsl will not find any match when I do:

<xsl:for-each select="Message/Person">

If I remove the xmlns="http://www.xxx.com/SMDS" declaration, then data is processed as expected.

Anything I need to do to process this, or do I have the get the client to remove the namespace declaration?




 
Old February 5th, 2007, 06:14 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Try googling for

XSLT FAQ default namespace

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Transforming XML From One Namespace to Another mail4kaja XSLT 1 November 10th, 2008 10:14 AM
convert XML to XMl - Another Namespace question bonekrusher XSLT 2 July 10th, 2007 07:32 AM
XSL namespace-alias problem cheez XSLT 4 August 22nd, 2006 03:20 AM
xml namespace and asp werD420 XML 1 August 12th, 2005 01:12 PM
xsl namespace vidhya XSLT 3 June 29th, 2005 10:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.