[MOBY-dev] Prefixes for generated moby objects

Paul Gordon gordonp at ucalgary.ca
Fri Apr 7 16:42:43 UTC 2006


This must be a bug in JDOM, because the namespaces in the actual 
document are correct.  Attributes is another story though, as by 
default, these do not have namespaces.
>      I had similar problems. When I was using JDOM I was always asked 
> two questions: first using a local name, second with the moby namespace. 
> I have even added two methods in (jMoby) org.biomoby.shared.Utils:
>
>
>       * Get a child by 'name' from 'parent'. It tries first a child
>       * without any namespace, then with {@link #MOBY_NS}. <p>
>       *
>      public static Element getChild (Element parent, String name);
>
>       * Get text of a child 'name' from 'parent'. It tries first a
>       * child without any namespace, then with {@link #MOBY_NS}. <p>
>       *
>      public static String getChildText (Element parent, String name);
>
>     But I wonder if this is a correct way to do it. Anybody (perhaps 
> Paul?) knows more about how to treat namespaces?
>     Also, (Mark, Eddie?) what is in the Moby API about namepaces? Are 
> they mandatory or not?
>     I can surely add namespaces to primitive types as well... But I 
> would rather first wait for the answers...
>
>     Cheers,
>     Martin
>
>   




More information about the MOBY-dev mailing list