You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Marcel Heijmans <ma...@mnemonics.nl> on 2004/02/19 14:35:36 UTC

XSD reference to outside java package

Hi,

Is it possible from within an xsd to refer to a type in
another package (not in an xsd).

Something like:

<xsd:attribute name="date" type="bar.foo.Date"/>

Cheers,



---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: XSD reference to outside java package

Posted by Jochen Wiedmann <jo...@ispsoft.de>.
Marcel Heijmans wrote:

> Is it possible from within an xsd to refer to a type in
> another package (not in an xsd).
> 
> Something like:
> 
> <xsd:attribute name="date" type="bar.foo.Date"/>

Assuming that you accept a little bit different syntax:
In theory, yes. In practice, a little work remains.

First of all, lets discuss the question of syntax. I would
suggest something like

     <xsd:attribute name="date">
	<xsd:simpleType base="xsd:dateTime">
	    <xsd:annotation><xsd:appinfo>
                 <jaxme:type sgClass="bar.foo.generator.Date"/>
             </xsd:appinfo></xsd:annotation>
         </xsd:simpleType>
     </xsd:attribute>

with sgClass being a subclass of AtomicTypeSGImpl, much like
DateTimeSG.

(The code handling the jaxme:type element would need to be
written, but that's an almost trivial task.)


Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org