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

Re: Problems accessing child elements in template

Subject: Re: Problems accessing child elements in template
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Wed, 13 Feb 2002 14:38:36 -0800
peter setera
First thing I would do is check the namespace declarations in both your input 
XML and the stylesheet.  It's possible to have an element called dc:title in 
your input that does not match dc:title in your XSL if the namespaces do not 
match; check for typos.

If that doesn't work, could you post the relavent snippet of your input and 
xsl?

On Wednesday 13 February 2002 12:54, Setera, Craig wrote:
> Hello,
>
> I am a relative newbie, but I've spent some time looking through the FAQ
> and still cannot understand what I might be doing wrong.  I don't seem to
> be able to access the text of a child node that really appears to be there.
> I'm afraid this might have something to do with namespaces which gets even
> further from my real knowledge.
>
> I found the Trace logging stuff in Xalan and have been using it to try to
> figure out what is going on.  Why would it be that:
>
> <xsl:copy-of select="." /> in the current context yields the following in
> the trace:
> file:///c:/temp/ocs.xsl Line #31, Column #29: copy-of, select='.':
>      10015: rdf:description
> STARTELEMENT: rdf:description
> CHARACTERS:
>
> STARTELEMENT: dc:title
> CHARACTERS: Moreover3Mnews
> ENDELEMENT: dc:title
>
> And yet, <xsl:copy-of select="./dc:title" /> in the same context yields:
> file:///c:/temp/ocs.xsl Line #32, Column #38: copy-of, select='./dc:title':
>      [empty node list]
>
> The trace for the first call shows very obviously that "dc:title" element
> is in the current context and yet I can't select it.  I know I must be
> missing something very basic here.
>
> Finally, the following actually extracts the text I'm looking for, even
> though I'm sure I can't be guaranteed that the elements are always in the
> same order.
> file:///c:/temp/ocs.xsl Line #32, Column #39: copy-of,
> select='*[1]/text()':
>
>      10019: #text
> CHARACTERS: Moreover3Mnews
>
> Thanks for any help that can be offered.
> Craig
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
Peter Davis
You are going to have a new love affair.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

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-2013 All Rights Reserved.