Re: [Newbie] Output something using XSLT even if an element is missing in some documents?
- From: "John Larson" <wocket@xxxxxxxxxxx>
- Date: Sat, 27 Sep 2008 23:58:57 +0200
"John Larson" wrote:
My apologies - there was a quote missing right at the end by newline.
After fixing this the tranformation now runs. Sadly the output only
contains the field name and a lot of tabs - none of the content is printed
out (and there is content in some elements that should be there).
The root element of my XML files is "inspec" and each file contains an
number of articles, which is next level down in the tree. The data I want
to extract is in child elements under article. An example XPATH is
"inspec/article/bibliog/jrefg/jrog/vid/vol". Am I somehow pointing
incorrectly or not calling the select correctly or ?
Thanks - John
After a lot of trial and error I figured out that I needed to shorten my
XPATHs in the value of select statements (e.g. from <xsl:value-of
select="inspec/article/contg/accn"/> to <xsl:value-of
select="contg/accn"/>). It now works beautifully - thanks to Hermann for
pointing to this solution.
Best
- John
.
- Follow-Ups:
- References:
- [Newbie] Output something using XSLT even if an element is missing in some documents?
- From: John Larson
- Re: [Newbie] Output something using XSLT even if an element is missing in some documents?
- From: Hermann Peifer
- Re: [Newbie] Output something using XSLT even if an element is missing in some documents?
- From: John Larson
- Re: [Newbie] Output something using XSLT even if an element is missing in some documents?
- From: John Larson
- [Newbie] Output something using XSLT even if an element is missing in some documents?
- Prev by Date: Re: [Newbie] Output something using XSLT even if an element is missing in some documents?
- Next by Date: Re: XPath query difficulty...
- Previous by thread: Re: [Newbie] Output something using XSLT even if an element is missing in some documents?
- Next by thread: Re: [Newbie] Output something using XSLT even if an element is missing in some documents?
- Index(es):
Relevant Pages
|