Sounds like a bug to me.

-Patrick

On Jan 21, 2008 4:58 AM, Mircea Lazar <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> For orm files, it is possible to create the XML files using a
> namespace, so instead of using
>
> <named-query name="findSomething">
>         <query>
>         </query>
> </named-query>
> we can write:
> <orm:named-query name="findSomething">
>         <orm:query>
>         </orm:query>
> </orm:named-query>
> However, OpenJPA will not process the namespace prefixed declarations.
> In org.apache.openjpa.persistence.XMLPersistenceMetaDataParser, the
> _elems represents keywords without any namespace and when the XML file
> is parsed, org.apache.openjpa.lib.meta.XMLMetaDataParser will call:
>
> public void startElement(String uri, String name, String qName,
>         Attributes attrs) throws SAXException {
>         _depth++;
>         if (_depth <= _ignore)
>             if (!startElement(qName, attrs))
>                 ignoreContent(true);
> }
> In order to work, the subsequent startElement should be called with
> 'name' as parameter, which does not have a namespace. The same story
> for endElement.
> Should namespaces be avoided or it's a bug in OpenJPA?
>
> Environment:
> Java 1.6
> Glassfish v2
> openjpa-1.0.1-r420667
>
> Mircea Lazar
>



-- 
Patrick Linskey
202 669 5907

Reply via email to