Re: [xslt] Question concerning paths
- From: "Marc Heinz" <marc heinz no-log org>
- To: "The Gnome XSLT library mailing-list" <xslt gnome org>
- Subject: Re: [xslt] Question concerning paths
- Date: Thu, 22 Nov 2007 15:49:39 +0100 (CET)
Okay, I just figured that the significant error wasn't the one i
previously mentioned, the complete (verbose) output was:
[...]
xsltCopyOf: select document('/path_to/meta.xml')
Reusing dictionary for document
xsltCopyOf: result is a node set
xsltCopyTextString: copy text OpenOffice.org/2.0$Win32
OpenOffice.org_project/680m5$Build-9073
xsltCopyTextString: copy text Alex Alex
xsltCopyTextString: copy text 2006-12-06T10:22:16
xsltCopyTextString: copy text Alex Alex
xsltCopyTextString: copy text 2007-02-03T14:45:17
xsltCopyTextString: copy text fr-CH
xsltCopyTextString: copy text 20
xsltCopyTextString: copy text PT3H26M30S
Object is an XSLT value tree :
1 ELEMENT office:document-meta
namespace office href=urn:oasis:names:tc:opendocument:xmlns:of...
namespace xlink href=http://www.w3.org/1999/xlink
namespace dc href=http://purl.org/dc/elements/1.1/
namespace meta href=urn:oasis:names:tc:opendocument:xmlns:me...
namespace presentation href=urn:oasis:names:tc:opendocument:xmlns:pr...
namespace ooo href=http://openoffice.org/2004/office
namespace smil href=urn:oasis:names:tc:opendocument:xmlns:sm...
namespace anim href=urn:oasis:names:tc:opendocument:xmlns:an...
ATTRIBUTE version
TEXT
content=1.0
xsltProcessOneNode: applying template '/' for /
xsltApplySequenceConstructor: copy node Presentation
call-template: name getAuthor
applying xsl:template 'getAuthor'
xsltValueOf: select $metaDoc/office:document-meta/office:meta/dc:creator
Lookup variable 'metaDoc'
found variable 'metaDoc'
XPath error : Invalid type
[...]
Obviously the real problem is caused by the "Invalid Type Error".
Could it be a concatenation problem in the following statement:
select="$metaDoc/office:document-meta/office:meta/dc:creator"
If so, why should I do?
Thanks
M. H.
>
> Hi everybody,
>
> I have a little problem with a XSL file someone give me. This stylesheet
> has to deal with many XML source file, it access them trough XPath
> expression in this way:
> ---- CODE ----
> <xsl:variable name="metaDoc">
> <xsl:copy-of select="document(/a_certain_path/meta.xml)"/>
> </xsl:variable>
>
> <xsl:template name="getAuthor">
> <xsl:attribute name="author">
> <xsl:value-of
> select="$metaDoc/office:document-meta/office:meta/dc:creator"/>
> </xsl:attribute>
> </xsl:template>
> ---- END ----
>
> Until now, i didn't manage to make this working, the xpath expression:
> $metaDoc/office:document-meta/office:meta/dc:creator
> does never match anything, displaying: "XPath evaluation returned no
> result"
>
> Can someone enlighten me? Your help would be much appreciated...
> M. H.
>
> _______________________________________________
> xslt mailing list, project page http://xmlsoft.org/XSLT/
> xslt gnome org
> http://mail.gnome.org/mailman/listinfo/xslt
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]