[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] What's wrong with namespaces? Some observations and suggestions
- From: Bjoern Hoehrmann <derhoermi@gmx.net>
- To: Amelia A Lewis <amyzing@talsever.com>
- Date: Sun, 05 Dec 2010 01:18:58 +0100
* Amelia A Lewis wrote:
>containing the expression. I spent half an hour trying (surprisingly
>patiently) to explain to an astronomer (very *bright*--but not involved
>in XML) friend that even if she bound the default prefix of her
>stylesheet to the namespace URI which was bound to the default prefix
>of her incoming document (the XHTML namespace), "/html/body/p" still
>wasn't going to match anything. She had to "redundantly" bind to "h"
>and use "/h:html/h:body/h:p" (in the end, she didn't do it that way ...
>she preprocessed the incoming XHTML with a quick script that removed
>the namespace declaration, so she could write XPath that made sense to
>her ... and that was largely because my explanation devolved into chaos
>when she wanted to match on "@class" attribtues (no, not @h:class ...
>well, because attributes don't work like that ... no, don't take out
>the "h" binding! ... wait, what are you doing? ... oh .... fine, just
>strip the namespace decl and do it that way, then)).
What was so difficult to understand about the diagnostics messages she
got from the tool she was using? Surely it noted there are no "html"
elements in the document but there is a {"http://www.w3.org/1999/xhtml",
"html"} element in the document and that in order to match it, she has
to setup a namespace binding and use the prefix to match it? Tools do
that these days, right?
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]