On 10/26/05, Kevin Dangoor <[EMAIL PROTECTED]> wrote:
>
> On 10/26/05, Jaime Wyant <[EMAIL PROTECTED]> wrote:
> > I recall seeing the "item.tag=='{http://www.w3.org/1999/xhtml}head'".
> > However I'm confused as to what that actually does. I understand this
> > simple example ->
> >
> > <element py:match="item.tag == 'mytag'">
> >
> > The {http...} confuses me in that item.tag expression. What exactly
> > does that do?
>
> That is the XML namespace of the tag. Imagine, for a moment, that you
> had a document that was XHTML but included some XML measurement data
> for a person. That measurement data may have a <head> element for the
> size of the person's head. In order to keep the XHTML <head> separate
> from the measurement <head>, you would need to differentiate via
> namespaces.
>
> Under certain circumstances, I think that ElementTree does not require
> you to list the namespace. These documents have two namespaces (the
> XHTML one and the Kid one), so that may be why ElementTree sticks the
> namespace in front of the tag name.
*Lightbulb glows brightly*
Thanks! I get it now :)
jw