You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by David Bau <da...@bea.com> on 2003/08/19 22:38:35 UTC

Re: [apache-xmlbeans] breaking a schema namespace into packages via xsdconfig?

If you supply a fully-qualified name in your .xsdconfig file as

<xb:qname name="my:typeName" javaname="my.package.FooType"/>

Then when generating typeName into a class, things should work - you should
get your requested package.  Currently the config works purely by allowing
you to override the suggested Java translation for a QName for all
situations where the QNames is used, so it's probably not fine-grained
enough when there is QName aliasing going on (e.g., elts vs types vs local
elts etc).  A few folks have asked for more fine-grained .xsdconfig
controls, and it seems like a good area for development.

David


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Re: [apache-xmlbeans] breaking a schema namespace into packages via xsdconfig?

Posted by James Strachan <ja...@yahoo.co.uk>.
On Tuesday, August 19, 2003, at 09:38  pm, David Bau wrote:

> If you supply a fully-qualified name in your .xsdconfig file as
>
> <xb:qname name="my:typeName" javaname="my.package.FooType"/>
>
> Then when generating typeName into a class, things should work - you 
> should
> get your requested package.  Currently the config works purely by 
> allowing
> you to override the suggested Java translation for a QName for all
> situations where the QNames is used, so it's probably not fine-grained
> enough when there is QName aliasing going on (e.g., elts vs types vs 
> local
> elts etc).  A few folks have asked for more fine-grained .xsdconfig
> controls, and it seems like a good area for development.

It'd be really nice to be able to say 'for all QNames in foo.xsd use 
package org.apache.foo' - then I could use separate packages for each 
part of the J2EE schema. I could auto-generate the bindings of QNames 
-> package via XSLT on the schema files I guess. What would help is if 
the XSLT didn't have to do QName -> Java class name munging. i.e. if we 
could do something like

<xb:qname name="my:typeName" javapackage="my.package"/>

Then the XSLT wouldn't have to worry about doing the typeName -> 
className conversion. Though being able to bind schema files to 
packages directly in the xsdconfig file would really rock.

James
-------
http://radio.weblogs.com/0112098/


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Re: [apache-xmlbeans] breaking a schema namespace into packages via xsdconfig?

Posted by James Strachan <ja...@yahoo.co.uk>.
On Tuesday, August 19, 2003, at 09:38  pm, David Bau wrote:

> If you supply a fully-qualified name in your .xsdconfig file as
>
> <xb:qname name="my:typeName" javaname="my.package.FooType"/>
>
> Then when generating typeName into a class, things should work - you 
> should
> get your requested package.  Currently the config works purely by 
> allowing
> you to override the suggested Java translation for a QName for all
> situations where the QNames is used, so it's probably not fine-grained
> enough when there is QName aliasing going on (e.g., elts vs types vs 
> local
> elts etc).  A few folks have asked for more fine-grained .xsdconfig
> controls, and it seems like a good area for development.

It'd be really nice to be able to say 'for all QNames in foo.xsd use 
package org.apache.foo' - then I could use separate packages for each 
part of the J2EE schema. I could auto-generate the bindings of QNames 
-> package via XSLT on the schema files I guess. What would help is if 
the XSLT didn't have to do QName -> Java class name munging. i.e. if we 
could do something like

<xb:qname name="my:typeName" javapackage="my.package"/>

Then the XSLT wouldn't have to worry about doing the typeName -> 
className conversion. Though being able to bind schema files to 
packages directly in the xsdconfig file would really rock.

James
-------
http://radio.weblogs.com/0112098/


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/