Re: [xslt] Re: simpler testcase
- From: Matt Sergeant <matt sergeant org>
- To: Daisuke Maki <daisuke wafu ne jp>
- Cc: "veillard redhat com" <veillard redhat com>,"xslt gnome org" <xslt gnome org>,"axkit-users axkit org" <axkit-users axkit org>
- Subject: Re: [xslt] Re: simpler testcase
- Date: Fri, 28 Mar 2003 10:34:26 +0000 (GMT)
On Fri, 28 Mar 2003, Daisuke Maki wrote:
> two things:
>
> (1) there was a typo in my code,
> (2) *I* said that XML::LibXML (the perl module) is broken, not libxml2
>
> For (1), the xpath expression should have read /foo:foo/foo:bar. Which
> works on xsltproc:
>
> source XML:
> <foo xmlns="urn:foo">
> <bar>BAZ!</bar>
> </foo>
>
> XSL file:
> <xsl:output method="text" />
> <xsl:template match="foo:foo">
> <xsl:value-of select="foo:bar" />
> <xsl:template>
>
> This prints "BAZ!" using xsltproc. With XML::LibXML and XML::LibXSLT, it
> doesn't even match with foo:foo.
Of course, because you haven't mapped the namespace prefix. To do that you
need XML::LibXML::XPathContext, from CPAN.
--
<!-- Matt -->
<:->get a SMart net</:->
Spam trap - do not mail: spam-sig@spamtrap.messagelabs.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]