Re: [xslt] Question concerning paths

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$Win32
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=
    namespace dc href=
    namespace meta href=urn:oasis:names:tc:opendocument:xmlns:me...
    namespace presentation href=urn:oasis:names:tc:opendocument:xmlns:pr...
    namespace ooo href=
    namespace smil href=urn:oasis:names:tc:opendocument:xmlns:sm...
    namespace anim href=urn:oasis:names:tc:opendocument:xmlns:an...
    ATTRIBUTE version
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:
If so, why should I do?

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
> xslt gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]