[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [xml] problem with id and xpath in 2.5.7



Stefan Seefeld <seefeld sympatico ca> writes:

> Petr Pajas wrote:
>  > Hi,
>  >
>  > According to xml specs, ID like a:b should be perfectly valid as it
>  > matches the Name production http://www.w3.org/TR/REC-xml#NT-Name
>
> according to the same document:
>
> "The Namespaces in XML Recommendation [XML Names] assigns a meaning to
> names containing colon characters. Therefore, authors should not use the
> colon in XML names except for namespace purposes, but XML processors
> must accept the colon as a name character."
>
> In short, an element with name "a:b" has 'local name' 'b', and a
> 'namespace alias' 'a'. The same applies to attributes...

Agreed. Elements, attributes. Their names. But I never heard of the
namespace concept being applied to attribute *values* as well ...

Recall, I have <bar id="a:b"/> not <a:b/> or <bar a:b="foo"/>.

Anyway, if it is the case and my document is wrong (which I'm still
not convinced about) than xmllint --valid should say so (as it does
for <a:b/> with undeclared NS prefix a), shouldn't it?

-- Petr



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]