Ludovic Kuty
Usenet Archive
- Joined
- Nov 2, 2009
- Messages
- 8
- Reaction score
- 0
Dear group readers,
Both "Namespaces in XML" recommendations (1.0 and 1.1) define a qualified name with the following sentence :
"A qualified name is a name subject to namespace interpretation."
This is rather vague. To clarify things, I went checking the BNF grammar of productions 7, 8 and 9, and saw :
[7] QName ::= PrefixedName | UnprefixedName
[8] PrefixedName ::= Prefix ':' LocalPart
[9] UnprefixedName ::= LocalPart
So at the syntactic level, a qualified name is prefixed or is not prefixed.
My question is : is a qualified name _always_ in a NS (prefixed means there is an explicit NS binding and unprefixed means there is a default NS declaration) or is a qualified name sometimes not in any NS i.e. there is no default NS declaration and the name has no prefix ?
I ask this because I thought that a qualified name could be a name outside any NS. And then I read in "Definitive XML Schema" 2nd edition by Priscilla Walmsley that "Unqualified names, on the other hand, are names that are not in any namespace" (page 40). Things are clear from her point of view but I found it not so clear in the recommendation, that's why I am asking this here. Of course, I then told myself that using the term "qualified" would be weird if the name was not in any NS.
So the next question is : is there a place in the recommendation where this is answered clearly ?
TIA
Ludovic Kuty
Both "Namespaces in XML" recommendations (1.0 and 1.1) define a qualified name with the following sentence :
"A qualified name is a name subject to namespace interpretation."
This is rather vague. To clarify things, I went checking the BNF grammar of productions 7, 8 and 9, and saw :
[7] QName ::= PrefixedName | UnprefixedName
[8] PrefixedName ::= Prefix ':' LocalPart
[9] UnprefixedName ::= LocalPart
So at the syntactic level, a qualified name is prefixed or is not prefixed.
My question is : is a qualified name _always_ in a NS (prefixed means there is an explicit NS binding and unprefixed means there is a default NS declaration) or is a qualified name sometimes not in any NS i.e. there is no default NS declaration and the name has no prefix ?
I ask this because I thought that a qualified name could be a name outside any NS. And then I read in "Definitive XML Schema" 2nd edition by Priscilla Walmsley that "Unqualified names, on the other hand, are names that are not in any namespace" (page 40). Things are clear from her point of view but I found it not so clear in the recommendation, that's why I am asking this here. Of course, I then told myself that using the term "qualified" would be weird if the name was not in any NS.
So the next question is : is there a place in the recommendation where this is answered clearly ?
TIA
Ludovic Kuty