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/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ [email protected] http://mail.gnome.org/mailman/listinfo/xslt
