Thanks Werner, it works. I'm participating a summer school in Nice, France this week. For the schema generator, I'm working in annotations that has added recently in annotation processing. The internet connection here is too slow, I will update the code soon.
Regards, Bao On Sun, Aug 24, 2008 at 11:43 PM, Werner Guttmann <[EMAIL PROTECTED]>wrote: > Just found this in the code of the DTDConverter: > > type = schema.getSimpleType( > schema.getBuiltInTypeName(SimpleTypesFactory.ID_TYPE) ); > > This basically returns a SimpleType instance that represents an ID type. > > Hope this helps. > > Werner > > Werner Guttmann wrote: > > Actually, just had a look at the sources, and it seems that xs:ID is > > internally represented by a string-typed simple type whose type code iot > > set to SimlpleTypeFactory.ID. Does this answer your question ? > > > > Werner > > > > Le Duc Bao wrote: > >> Hello, > >> > >> I use schema API to create a schema instance. I tried to created a > schema > >> element with type="xs:ID" like this: > >> <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> > >> <xs:complexType name="foo"> > >> <xs:sequence> > >> <xs:element name="data" *type="xs:ID" *minOccurs="0"/> > >> </xs:sequence> > >> </xs:complexType> > >> </xs:schema> > >> > >> But I can't find any method to create a ID type. For example: > >> > >> ElementDecl e = null; > >> ... > >> e.setTypeReference(String); // or > >> e.setType(XmlType); > >> > >> Has this functionality implemented? > >> > >> Regards, > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Le Duc Bao