-
1. Re: Pvm parser and namespaces
tom.baeyens Oct 29, 2007 12:05 PM (in response to porcherg)never should we have a hard dependency on namespaces.
but i would like our parser to be able to support namespaces, in case users do want it.
we should try to make our languages fit together as much as possible without needing namespaces. i believe that should very well be possible. -
2. Re: Pvm parser and namespaces
porcherg Oct 30, 2007 4:55 AM (in response to porcherg)BPEL defines 5 different namespaces. So we need a parser with namespace support to parse a BPEL file.
For things such as environment, we may not need to add a specific namespace.
I've submitted a modification where:
- by default, a binding is associated with a null namespace (matches only tags with no namespace)
- you can associate a binding with a QName (matches only tags with the good namespace uri)
This is a first step to have a namespace aware parser.
regards,
Guillaume -
3. Re: Pvm parser and namespaces
tom.baeyens Oct 30, 2007 6:34 AM (in response to porcherg)"porcherg" wrote:
- by default, a binding is associated with a null namespace (matches only tags with no namespace)
could you make the default to match with *any* namespace instead of only the null namespace ?"porcherg" wrote:
- you can associate a binding with a QName (matches only tags with the good namespace uri)
great. -
4. Re: Pvm parser and namespaces
porcherg Oct 30, 2007 8:54 AM (in response to porcherg)"tom.baeyens@jboss.com" wrote:
could you make the default to match with *any* namespace instead of only the null namespace ?
For me, a binding that matches with any namespace is against the concepts of XML:
- if an element is declared without namespace, then it has a default empty namespace.
- if an two elements have the same localname but different namespace, they represent different entities and cannot be handled by the same binding.
Do you have a use case where we need to match with any namespace ?
Guillaume -
5. Re: Pvm parser and namespaces
csouillard Oct 30, 2007 9:40 AM (in response to porcherg)I agree with Guillaume.
I think XML is based on qualified names so we need to handle namespaces.
Charles -
6. Re: Pvm parser and namespaces
tom.baeyens Oct 30, 2007 10:36 AM (in response to porcherg)"porcherg" wrote:
Do you have a use case where we need to match with any namespace ?
any element might be defined by a given name space. first of all, i would like that element tag to match with unspecified name space usage and specified namespace usage.
secondly, there are things such as wiring xml. they appear in configuration xml as well as process xml. and they might appear in many more. ah.. but then you probably have different parsers.
in any case, i want users that don't know namespace to be able to work with our XML.
e.g. each time when i have to configure the default namespace and use validation (noNamespaceSchemaLocation or something like that) i have to look up the 2 really weird attributes that i have to set. took me quite a while to figure it out the first time.
users should not be bothered with this if they don't want to be bothered.
on the other hand. again, i agree that it must be possible to support name spaces if people *do* want it. -
7. Re: Pvm parser and namespaces
kukeltje Oct 30, 2007 5:48 PM (in response to porcherg)
secondly, there are things such as wiring xml. they appear in configuration xml as well as process xml. and they might appear in many more. ah.. but then you probably have different parsers.
Only if you need a parser for the other namespave. I extended jbpm a little as a triel so the 'jbpm namespace' is the 'default' one (no prefix) and custom elements a user adds are in a specifc namespace. I'm sure together we can come up with a 1 page description of this. Sotook me quite a while to figure it out the first time.
will not happen to you^H^H^H other users.on the other hand. again, i agree that it must be possible to support name spaces if people *do* want it.
hahaha.... I do....