Re: [xslt] <html xmlns=.... > issue
- From: Daniel Veillard <veillard redhat com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] <html xmlns=.... > issue
- Date: Fri, 4 Feb 2005 05:28:40 -0500
On Fri, Feb 04, 2005 at 11:16:27AM +0100, Joost Helberg wrote:
> ls,
>
> I try to retrieve the title from an XHTML document using a
> stylesheet.
> Using xsltproc from libxslt-2.6.17 I get no result in case the opening
> html-element contains a xmlns spec:
>
> <html xmlns="http://www.w3.org/1999/xhtml">
>
> when I remove the xmlns declaration, the title is correctly printed.
>
> I expected that in both cases the title should appear.
>
> Can anyone explain what I'm doing wrong?
<pattern match="title">
won't match an xhtml:title or title in a default namespace. It's
The most frequently asked question about the XPath spec. You must
use
<pattern match="xhtml:title">
with a proper xhtml namespace prefix definition to catch those.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]