From: Paul K. <pau...@ya...> - 2004-04-17 06:11:16
|
Mark, --- "Mark A. Fuller" <mar...@ea...> wrote: > You're right. The following accesses the "xml:lang" attribute: > > $name->{'_attr'}{'xml:lang'}; This code works, but shouldn't be used. See below. > While we're on the subject of different syntaxes, you provided this > example as a way to bypass ATTRIBUTES hash checking: > > foo->attr({bar => 'foobar'}) > > Is there a form that will return the value? I'm keeping all these > examples and intend to work them into my samples of exercising v2. There is. In fact, the code above is not the best way to do it as it sets 'bar' as the ONLY attribute effectively removing everything else. Here is the code that does what you need. foo->attr->{bar} = 'foobar'; # SET print foo->attr->{bar}; # GET > 1. UDDI:Lite limits its awareness to only attributes within the > UDDI namespace? Users will have to be aware that they must use the > format above to access attributes outside the namespace? Yes. No. Below. > 2. UDDI:Lite maintains non-uddi namespace in its ATTRIBUTES table? > and the user access attributes as "foo->ns:bar" in those cases? > (The interpreter doesn't like that syntax. We'd have to come up > with another way of keeping namespace). This syntax won't work. I suggest we keep everything as it is (ALL attributes in one table) and add one more table for namespaces. Those attributes that are not in UDDI namespace will (also) be represented there. Code that generates attributes will be smart to look at that table. That won't work if there are two element in different namespaces with the same name, but that's not the sace with existing UDDI specs as far as I know. > 3. Since UDDI is a single namespace, can namespace be ignored? > Could there be a collision of differently namespaced elements or > attributes within the UDDI schema? No; you still need to generate proper namespaces, or server will reject your request. Unlikely. > I think this is an important question because v3 increases the use > of "xml:lang". In v1 it may not have been important. It was used on > only one element. For v2 it is used on two and is part of querying > by name (specifying language to limit the query to). v3 increases > it to 4 elements (address and personName). Agreed. I uploaded a new version that includes elements and attributes for UDDIv2 and UDDIv3 you provided. I also fixed NAMESPACES/GENERIC for UDDIv2 and v3. Next step is to figure out what todo for attributes in non-UDDI namespace. I'll check if my idea works. Best wishes, Paul. |