David, thanks very much. I did check the FAQ, but I obviously wasn't
searching using the correct words to find the solution.
Kind regards
Colin
-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk]
Sent: 17 August 2006 13:14
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Doesn't see elements when using namespaces
//CodingNoticesP6P6B"
That selects all CodingNoticesP6P6B in no-namespace in the whole
document, and then since you are using value-of in xslt1, it discards
all but the first.
However your document has no such elements, it has CodingNoticesP6P6B in
namespace http://www.govtalk.gov.uk/taxation/CodingNoticesP6P6B/2
so add
xmlns:c2="http://www.govtalk.gov.uk/taxation/CodingNoticesP6P6B/2"
to your xsl stylesheet and use
select="c2:CodingNoticesP6P6B"
so you select elements in the right namespace and only children of the
current element.
Similarly remove other uses of // and refer to other elements in the
right namespace,
<xsl:value-of select="Name"/>
<xsl:value-of select="TaxCode"/>
should also both use c2: namespace.
David
(This is a FAQ)
--~------------------------------------------------------------------
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>
--~--
************************************************************************
Blue Arrow is official sponsor and recruitment partner of Team GB, the
British Olympic Association and OPEN, the Olympic and Paralympic
Employment Network.
Your company can become a member of OPEN - the Olympic and Paralympic
Employment Network today, for free - visit www.bluearrow.co.uk/OPEN
Find out more about all Blue Arrow recruitment solutions - visit
www.bluearrow.co.uk
************************************************************************
************************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
************************************************************************
--~------------------------------------------------------------------
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>
--~--