Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » How to get access on the content of a XSDSimpletypeDefinition
How to get access on the content of a XSDSimpletypeDefinition [message #52504] Mon, 06 September 2004 14:05 Go to next message
Eclipse UserFriend
Originally posted by: gnoutsa.hotmail.com

I am trying to get the value of "base" in the Tag "<xsd:restiction" .
I try all the Methode but i don't really get what i need , maybe i use the
Methode wrong .
for example in this Fragment :

<xsd:simpleType name="ISBNTyp">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{9}[0-9X]"/>
<!-- 9 Ziffern gefolgt von einer Pr\x{00FC}fziffer im
Bereich zwischen 0 und 10
(10 wird als X dargestellt) -->
</xsd:restriction>
</xsd:simpleType>
the value "xsd:string" interesse me.
How should i do ????

Thanks !!!



Hier is a part of the XSDSchema i use and the Fragment of my Programm









//---------------------------------------------------------- ----------

<xsd:complexType name="WarenTyp">
<xsd:sequence>
<xsd:element name="Buch" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Titel" type="xsd:string"/>
<xsd:element name="Anzahl" >

<xsd:simpleType>
<xsd:restriction base="xsd:positiveInteger">
<xsd:maxExclusive value="100"/>
</xsd:restriction>
</xsd:simpleType>


</xsd:element>

<xsd:element name="PreisEUR" type="xsd:decimal"/>
<xsd:element ref="Kommentar" minOccurs="0"/>
<xsd:element name="Lieferdatum" type="xsd:date" minOccurs="0"/>
<xsd:element name="ISBN" type="ISBNTyp" use="required"/>
</xsd:sequence>
<xsd:attribute name="ISBN2" type="ISBNTyp" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="livre" type="xsd:decimal">
</xsd:sequence>
</xsd:complexType>




<xsd:simpleType name="ISBNTyp">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{9}[0-9X]"/>
<!-- 9 Ziffern gefolgt von einer Pr\x{00FC}fziffer im Bereich zwischen
0 und 10
(10 wird als X dargestellt) -->
</xsd:restriction>
</xsd:simpleType>




//---------------------------------------------------------- -------------


public void forXsdTypeDefinition(XSDTypeDefinition xsdTypeDefinition
,String nameEle) {

if (xsdTypeDefinition instanceof XSDSimpleTypeDefinition) {


// use on the Tag : <xsd:simpleType name="ISBNTyp">

XSDSimpleTypeDefinition xsdSimpleTypeDefinition
=(XSDSimpleTypeDefinition) xsdTypeDefinition ;
String mytyp ="" ;
if(xsdSimpleTypeDefinition.getBaseType() != null)
mytyp = xsdSimpleTypeDefinition.getBaseType().getName() ;

EList listfacet = xsdSimpleTypeDefinition.getFacets() ;
EList listfinal = xsdSimpleTypeDefinition.getFinal() ;
EList listfacet1 = xsdSimpleTypeDefinition.getFacetContents() ;
EList listfinal1 = xsdSimpleTypeDefinition.getContents() ;
EList listfacet2 = xsdSimpleTypeDefinition.getLexicalFinal() ;
EList listfinal2 = xsdSimpleTypeDefinition.getFinal() ;

System.out.println("ok "+xsdSimpleTypeDefinition.getStringFinal()+" ;
"+xsdSimpleTypeDefinition.getStringLexicalFinal()+" ; "
+ xsdSimpleTypeDefinition.getName() +" " +listfacet1.size()+"
"+listfinal1.size()+" " +listfacet2.size()+" "+listfinal2.size());


// all this EList have the size 0 , I just use them only for a controll


for (Iterator i = xsdSimpleTypeDefinition.getFacets().iterator();
i.hasNext(); )
{
XSDFacet xsdFacet = (XSDFacet)i.next();
System.out.println("oke "+xsdFacet.getClass());
if (xsdFacet instanceof XSDEnumerationFacet)
{
for (Iterator j =((XSDEnumerationFacet)xsdFacet).getValue().iterator();
j.hasNext(); )
{
Object enumerator = j.next();
System.out.println("okeeeeeeeeeeeeee "+enumerator.toString() );

}
}
else if (xsdFacet instanceof XSDPatternFacet)
{
}
}

}
if (xsdTypeDefinition instanceof XSDComplexTypeDefinition) {
System.out.println("ok222");

XSDComplexTypeDefinition xsdComplexTypeDefinition =
(XSDComplexTypeDefinition) xsdTypeDefinition;

switch (xsdComplexTypeDefinition.getContentTypeCategory()
.getValue()) {
case XSDContentTypeCategory.EMPTY: {
System.out.println("XSDContentTypeCategory.EMPTY");

break;
}
case XSDContentTypeCategory.SIMPLE: {
XSDSimpleTypeDefinition xsdSimpleTypeDefinition =
(XSDSimpleTypeDefinition) xsdComplexTypeDefinition
.getContentType();
System.out.println("XSDContentTypeCategory.SIMPLE");
break;
}

case XSDContentTypeCategory.ELEMENT_ONLY:
case XSDContentTypeCategory.MIXED: {
XSDParticle xsdParticle = (XSDParticle)
xsdComplexTypeDefinition.getContentType();


System.out.println("XSDCeeeeeeeeeeeeeeee :
"+xsdComplexTypeDefinition.getBaseType().getName() );


String nameEl = xsdComplexTypeDefinition.getName() ;

SchemaElement schEl = new
SchemaElement(nameEl,"XSDComplexTypeDefinition",null);

List children = null ;
System.out
.println("XSDContentTypeCategory.ELEMENT_ONLY OR _MIXED And Schema
create : "+schEl.getName() );


XSDTerm xsdTerm = xsdParticle.getTerm();
if (xsdTerm instanceof XSDModelGroup) {
children = new LinkedList() ;
XSDModelGroup xsdModelGroup = (XSDModelGroup) xsdTerm;
System.out.println();

for (Iterator i = xsdModelGroup.getParticles().iterator(); i.hasNext();)
{

SDParticle childXSDParticle = (XSDParticle) i.next();

XSDParticleImpl part = (XSDParticleImpl) childXSDParticle;

XSDTerm xsdTerm1 = part.getTerm();

XSDElementDeclaration elde = (XSDElementDeclaration) xsdTerm1;


String childName = elde.getName();
String childTyp =elde.getType().getName() ;
SchemaElement childEl = new SchemaElement(childName,childTyp ,null);
System.out.println("< " + " " + childName+ " , "+elde.getType().getName()
+ " , " /*+ elde.getType().getBaseType().getName() */+" >");

//if i remove this commentar and when the Programm arrive on this part of
my
// XSDschema ,
// <xsd:element name="Anzahl" >
// <xsd:simpleType>
// <xsd:restriction base="xsd:positiveInteger">
// <xsd:maxExclusive value="100"/>
// </xsd:restriction>
// </xsd:simpleType>
// </xsd:element>


// the Output : < Anzahl , null , positiveInteger > ;




// and when the Programm arrive
//<xsd:element name="ISBN" type="ISBNTyp" use="required"/>

// the Methode "elde.getType().getBaseType().getName()" would retieve null
// (that why i comment it.) and the Schema will jump(i suppose) on :



// <xsd:simpleType name="ISBNTyp">
// <xsd:restriction base="xsd:string">
// <xsd:pattern value="\d{9}[0-9X]"/>
// <!-- 9 Ziffern gefolgt von einer Pr\x{00FC}fziffer im
Bereich zwischen 0 und 10
(10 wird als X dargestellt) -->
//</xsd:restriction>
// </xsd:simpleType>



// GOTO : if (xsdTypeDefinition instanceof XSDSimpleTypeDefinition)







forXsdTypeDefinition(elde.getType(),nameEl );
schEl.add(childEl);

}
System.out.println();
} else if (xsdTerm instanceof XSDElementDeclaration) {
System.out
.println(" XSDElementDeclaration XSDElementDeclaration
XSDElementDeclaration ");
} else if (xsdTerm instanceof XSDWildcard) {
}

break;
}

}
}

}






//---------------------------------------------------------- -------------
Re: How to get access on the content of a XSDSimpletypeDefinition [message #52673 is a reply to message #52504] Tue, 07 September 2004 12:45 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Bertrand,

XSDSimpleTypeDefinition.getBaseTypeDefinition should do the trick.


Bertrand N. wrote:

>I am trying to get the value of "base" in the Tag "<xsd:restiction" .
>I try all the Methode but i don't really get what i need , maybe i use the
>Methode wrong .
>for example in this Fragment :
>
> <xsd:simpleType name="ISBNTyp">
> <xsd:restriction base="xsd:string">
> <xsd:pattern value="\d{9}[0-9X]"/>
> <!-- 9 Ziffern gefolgt von einer Pr\x{00FC}fziffer im
>Bereich zwischen 0 und 10
> (10 wird als X dargestellt) -->
> </xsd:restriction>
> </xsd:simpleType>
>the value "xsd:string" interesse me.
>How should i do ????
>
>Thanks !!!
>
>
>
>Hier is a part of the XSDSchema i use and the Fragment of my Programm
>
>
>
>
>
>
>
>
>
> //---------------------------------------------------------- ----------
>
><xsd:complexType name="WarenTyp">
> <xsd:sequence>
> <xsd:element name="Buch" minOccurs="0" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="Titel" type="xsd:string"/>
> <xsd:element name="Anzahl" >
>
> <xsd:simpleType>
> <xsd:restriction base="xsd:positiveInteger">
> <xsd:maxExclusive value="100"/>
> </xsd:restriction>
> </xsd:simpleType>
>
>
> </xsd:element>
>
> <xsd:element name="PreisEUR" type="xsd:decimal"/>
> <xsd:element ref="Kommentar" minOccurs="0"/>
> <xsd:element name="Lieferdatum" type="xsd:date" minOccurs="0"/>
> <xsd:element name="ISBN" type="ISBNTyp" use="required"/>
> </xsd:sequence>
> <xsd:attribute name="ISBN2" type="ISBNTyp" use="required"/>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="livre" type="xsd:decimal">
> </xsd:sequence>
></xsd:complexType>
>
>
>
>
><xsd:simpleType name="ISBNTyp">
> <xsd:restriction base="xsd:string">
> <xsd:pattern value="\d{9}[0-9X]"/>
> <!-- 9 Ziffern gefolgt von einer Pr\x{00FC}fziffer im Bereich zwischen
>0 und 10
> (10 wird als X dargestellt) -->
> </xsd:restriction>
></xsd:simpleType>
>
>
>
>
> //---------------------------------------------------------- -------------
>
>
> public void forXsdTypeDefinition(XSDTypeDefinition xsdTypeDefinition
>,String nameEle) {
>
> if (xsdTypeDefinition instanceof XSDSimpleTypeDefinition) {
>
>
> // use on the Tag : <xsd:simpleType name="ISBNTyp">
>
>XSDSimpleTypeDefinition xsdSimpleTypeDefinition
>=(XSDSimpleTypeDefinition) xsdTypeDefinition ;
> String mytyp ="" ;
>if(xsdSimpleTypeDefinition.getBaseType() != null)
> mytyp = xsdSimpleTypeDefinition.getBaseType().getName() ;
>
> EList listfacet = xsdSimpleTypeDefinition.getFacets() ;
> EList listfinal = xsdSimpleTypeDefinition.getFinal() ;
> EList listfacet1 = xsdSimpleTypeDefinition.getFacetContents() ;
> EList listfinal1 = xsdSimpleTypeDefinition.getContents() ;
> EList listfacet2 = xsdSimpleTypeDefinition.getLexicalFinal() ;
> EList listfinal2 = xsdSimpleTypeDefinition.getFinal() ;
>
> System.out.println("ok "+xsdSimpleTypeDefinition.getStringFinal()+" ;
>"+xsdSimpleTypeDefinition.getStringLexicalFinal()+" ; "
> + xsdSimpleTypeDefinition.getName() +" " +listfacet1.size()+"
>"+listfinal1.size()+" " +listfacet2.size()+" "+listfinal2.size());
>
>
>// all this EList have the size 0 , I just use them only for a controll
>
>
> for (Iterator i = xsdSimpleTypeDefinition.getFacets().iterator();
> i.hasNext(); )
> {
> XSDFacet xsdFacet = (XSDFacet)i.next();
> System.out.println("oke "+xsdFacet.getClass());
> if (xsdFacet instanceof XSDEnumerationFacet)
> {
>for (Iterator j =((XSDEnumerationFacet)xsdFacet).getValue().iterator();
>j.hasNext(); )
> {
> Object enumerator = j.next();
> System.out.println("okeeeeeeeeeeeeee "+enumerator.toString() );
>
> }
> }
> else if (xsdFacet instanceof XSDPatternFacet)
>{
> }
> }
>
> }
> if (xsdTypeDefinition instanceof XSDComplexTypeDefinition) {
> System.out.println("ok222");
>
> XSDComplexTypeDefinition xsdComplexTypeDefinition =
>(XSDComplexTypeDefinition) xsdTypeDefinition;
>
> switch (xsdComplexTypeDefinition.getContentTypeCategory()
> .getValue()) {
> case XSDContentTypeCategory.EMPTY: {
> System.out.println("XSDContentTypeCategory.EMPTY");
>
> break;
> }
> case XSDContentTypeCategory.SIMPLE: {
> XSDSimpleTypeDefinition xsdSimpleTypeDefinition =
>(XSDSimpleTypeDefinition) xsdComplexTypeDefinition
> .getContentType();
> System.out.println("XSDContentTypeCategory.SIMPLE");
> break;
> }
>
> case XSDContentTypeCategory.ELEMENT_ONLY:
> case XSDContentTypeCategory.MIXED: {
> XSDParticle xsdParticle = (XSDParticle)
>xsdComplexTypeDefinition.getContentType();
>
>
>System.out.println("XSDCeeeeeeeeeeeeeeee :
>"+xsdComplexTypeDefinition.getBaseType().getName() );
>
>
>String nameEl = xsdComplexTypeDefinition.getName() ;
>
>SchemaElement schEl = new
>SchemaElement(nameEl,"XSDComplexTypeDefinition",null);
>
> List children = null ;
> System.out
> .println("XSDContentTypeCategory.ELEMENT_ONLY OR _MIXED And Schema
>create : "+schEl.getName() );
>
>
> XSDTerm xsdTerm = xsdParticle.getTerm();
> if (xsdTerm instanceof XSDModelGroup) {
> children = new LinkedList() ;
> XSDModelGroup xsdModelGroup = (XSDModelGroup) xsdTerm;
> System.out.println();
>
>for (Iterator i = xsdModelGroup.getParticles().iterator(); i.hasNext();)
>{
>
> SDParticle childXSDParticle = (XSDParticle) i.next();
>
> XSDParticleImpl part = (XSDParticleImpl) childXSDParticle;
>
> XSDTerm xsdTerm1 = part.getTerm();
>
> XSDElementDeclaration elde = (XSDElementDeclaration) xsdTerm1;
>
>
> String childName = elde.getName();
> String childTyp =elde.getType().getName() ;
> SchemaElement childEl = new SchemaElement(childName,childTyp ,null);
>System.out.println("< " + " " + childName+ " , "+elde.getType().getName()
>+ " , " /*+ elde.getType().getBaseType().getName() */+" >");
>
>//if i remove this commentar and when the Programm arrive on this part of
>my
>// XSDschema ,
> // <xsd:element name="Anzahl" >
> // <xsd:simpleType>
> // <xsd:restriction base="xsd:positiveInteger">
> // <xsd:maxExclusive value="100"/>
> // </xsd:restriction>
> // </xsd:simpleType>
> // </xsd:element>
>
>
>// the Output : < Anzahl , null , positiveInteger > ;
>
>
>
>
>// and when the Programm arrive
> //<xsd:element name="ISBN" type="ISBNTyp" use="required"/>
>
>// the Methode "elde.getType().getBaseType().getName()" would retieve null
> // (that why i comment it.) and the Schema will jump(i suppose) on :
>
>
>
> // <xsd:simpleType name="ISBNTyp">
> // <xsd:restriction base="xsd:string">
> // <xsd:pattern value="\d{9}[0-9X]"/>
> // <!-- 9 Ziffern gefolgt von einer Pr\x{00FC}fziffer im
>Bereich zwischen 0 und 10
> (10 wird als X dargestellt) -->
> //</xsd:restriction>
> // </xsd:simpleType>
>
>
>
>// GOTO : if (xsdTypeDefinition instanceof XSDSimpleTypeDefinition)
>
>
>
>
>
>
>
> forXsdTypeDefinition(elde.getType(),nameEl );
> schEl.add(childEl);
>
> }
> System.out.println();
> } else if (xsdTerm instanceof XSDElementDeclaration) {
> System.out
> .println(" XSDElementDeclaration XSDElementDeclaration
>XSDElementDeclaration ");
> } else if (xsdTerm instanceof XSDWildcard) {
> }
>
> break;
> }
>
> }
> }
>
> }
>
>
>
>
>
>
> //---------------------------------------------------------- -------------
>
>
>
Re: How to get access on the content of a XSDSimpletypeDefinition [message #591482 is a reply to message #52504] Tue, 07 September 2004 12:45 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Bertrand,

XSDSimpleTypeDefinition.getBaseTypeDefinition should do the trick.


Bertrand N. wrote:

>I am trying to get the value of "base" in the Tag "<xsd:restiction" .
>I try all the Methode but i don't really get what i need , maybe i use the
>Methode wrong .
>for example in this Fragment :
>
> <xsd:simpleType name="ISBNTyp">
> <xsd:restriction base="xsd:string">
> <xsd:pattern value="\d{9}[0-9X]"/>
> <!-- 9 Ziffern gefolgt von einer Pr\x{00FC}fziffer im
>Bereich zwischen 0 und 10
> (10 wird als X dargestellt) -->
> </xsd:restriction>
> </xsd:simpleType>
>the value "xsd:string" interesse me.
>How should i do ????
>
>Thanks !!!
>
>
>
>Hier is a part of the XSDSchema i use and the Fragment of my Programm
>
>
>
>
>
>
>
>
>
> //---------------------------------------------------------- ----------
>
><xsd:complexType name="WarenTyp">
> <xsd:sequence>
> <xsd:element name="Buch" minOccurs="0" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="Titel" type="xsd:string"/>
> <xsd:element name="Anzahl" >
>
> <xsd:simpleType>
> <xsd:restriction base="xsd:positiveInteger">
> <xsd:maxExclusive value="100"/>
> </xsd:restriction>
> </xsd:simpleType>
>
>
> </xsd:element>
>
> <xsd:element name="PreisEUR" type="xsd:decimal"/>
> <xsd:element ref="Kommentar" minOccurs="0"/>
> <xsd:element name="Lieferdatum" type="xsd:date" minOccurs="0"/>
> <xsd:element name="ISBN" type="ISBNTyp" use="required"/>
> </xsd:sequence>
> <xsd:attribute name="ISBN2" type="ISBNTyp" use="required"/>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="livre" type="xsd:decimal">
> </xsd:sequence>
></xsd:complexType>
>
>
>
>
><xsd:simpleType name="ISBNTyp">
> <xsd:restriction base="xsd:string">
> <xsd:pattern value="\d{9}[0-9X]"/>
> <!-- 9 Ziffern gefolgt von einer Pr\x{00FC}fziffer im Bereich zwischen
>0 und 10
> (10 wird als X dargestellt) -->
> </xsd:restriction>
></xsd:simpleType>
>
>
>
>
> //---------------------------------------------------------- -------------
>
>
> public void forXsdTypeDefinition(XSDTypeDefinition xsdTypeDefinition
>,String nameEle) {
>
> if (xsdTypeDefinition instanceof XSDSimpleTypeDefinition) {
>
>
> // use on the Tag : <xsd:simpleType name="ISBNTyp">
>
>XSDSimpleTypeDefinition xsdSimpleTypeDefinition
>=(XSDSimpleTypeDefinition) xsdTypeDefinition ;
> String mytyp ="" ;
>if(xsdSimpleTypeDefinition.getBaseType() != null)
> mytyp = xsdSimpleTypeDefinition.getBaseType().getName() ;
>
> EList listfacet = xsdSimpleTypeDefinition.getFacets() ;
> EList listfinal = xsdSimpleTypeDefinition.getFinal() ;
> EList listfacet1 = xsdSimpleTypeDefinition.getFacetContents() ;
> EList listfinal1 = xsdSimpleTypeDefinition.getContents() ;
> EList listfacet2 = xsdSimpleTypeDefinition.getLexicalFinal() ;
> EList listfinal2 = xsdSimpleTypeDefinition.getFinal() ;
>
> System.out.println("ok "+xsdSimpleTypeDefinition.getStringFinal()+" ;
>"+xsdSimpleTypeDefinition.getStringLexicalFinal()+" ; "
> + xsdSimpleTypeDefinition.getName() +" " +listfacet1.size()+"
>"+listfinal1.size()+" " +listfacet2.size()+" "+listfinal2.size());
>
>
>// all this EList have the size 0 , I just use them only for a controll
>
>
> for (Iterator i = xsdSimpleTypeDefinition.getFacets().iterator();
> i.hasNext(); )
> {
> XSDFacet xsdFacet = (XSDFacet)i.next();
> System.out.println("oke "+xsdFacet.getClass());
> if (xsdFacet instanceof XSDEnumerationFacet)
> {
>for (Iterator j =((XSDEnumerationFacet)xsdFacet).getValue().iterator();
>j.hasNext(); )
> {
> Object enumerator = j.next();
> System.out.println("okeeeeeeeeeeeeee "+enumerator.toString() );
>
> }
> }
> else if (xsdFacet instanceof XSDPatternFacet)
>{
> }
> }
>
> }
> if (xsdTypeDefinition instanceof XSDComplexTypeDefinition) {
> System.out.println("ok222");
>
> XSDComplexTypeDefinition xsdComplexTypeDefinition =
>(XSDComplexTypeDefinition) xsdTypeDefinition;
>
> switch (xsdComplexTypeDefinition.getContentTypeCategory()
> .getValue()) {
> case XSDContentTypeCategory.EMPTY: {
> System.out.println("XSDContentTypeCategory.EMPTY");
>
> break;
> }
> case XSDContentTypeCategory.SIMPLE: {
> XSDSimpleTypeDefinition xsdSimpleTypeDefinition =
>(XSDSimpleTypeDefinition) xsdComplexTypeDefinition
> .getContentType();
> System.out.println("XSDContentTypeCategory.SIMPLE");
> break;
> }
>
> case XSDContentTypeCategory.ELEMENT_ONLY:
> case XSDContentTypeCategory.MIXED: {
> XSDParticle xsdParticle = (XSDParticle)
>xsdComplexTypeDefinition.getContentType();
>
>
>System.out.println("XSDCeeeeeeeeeeeeeeee :
>"+xsdComplexTypeDefinition.getBaseType().getName() );
>
>
>String nameEl = xsdComplexTypeDefinition.getName() ;
>
>SchemaElement schEl = new
>SchemaElement(nameEl,"XSDComplexTypeDefinition",null);
>
> List children = null ;
> System.out
> .println("XSDContentTypeCategory.ELEMENT_ONLY OR _MIXED And Schema
>create : "+schEl.getName() );
>
>
> XSDTerm xsdTerm = xsdParticle.getTerm();
> if (xsdTerm instanceof XSDModelGroup) {
> children = new LinkedList() ;
> XSDModelGroup xsdModelGroup = (XSDModelGroup) xsdTerm;
> System.out.println();
>
>for (Iterator i = xsdModelGroup.getParticles().iterator(); i.hasNext();)
>{
>
> SDParticle childXSDParticle = (XSDParticle) i.next();
>
> XSDParticleImpl part = (XSDParticleImpl) childXSDParticle;
>
> XSDTerm xsdTerm1 = part.getTerm();
>
> XSDElementDeclaration elde = (XSDElementDeclaration) xsdTerm1;
>
>
> String childName = elde.getName();
> String childTyp =elde.getType().getName() ;
> SchemaElement childEl = new SchemaElement(childName,childTyp ,null);
>System.out.println("< " + " " + childName+ " , "+elde.getType().getName()
>+ " , " /*+ elde.getType().getBaseType().getName() */+" >");
>
>//if i remove this commentar and when the Programm arrive on this part of
>my
>// XSDschema ,
> // <xsd:element name="Anzahl" >
> // <xsd:simpleType>
> // <xsd:restriction base="xsd:positiveInteger">
> // <xsd:maxExclusive value="100"/>
> // </xsd:restriction>
> // </xsd:simpleType>
> // </xsd:element>
>
>
>// the Output : < Anzahl , null , positiveInteger > ;
>
>
>
>
>// and when the Programm arrive
> //<xsd:element name="ISBN" type="ISBNTyp" use="required"/>
>
>// the Methode "elde.getType().getBaseType().getName()" would retieve null
> // (that why i comment it.) and the Schema will jump(i suppose) on :
>
>
>
> // <xsd:simpleType name="ISBNTyp">
> // <xsd:restriction base="xsd:string">
> // <xsd:pattern value="\d{9}[0-9X]"/>
> // <!-- 9 Ziffern gefolgt von einer Pr\x{00FC}fziffer im
>Bereich zwischen 0 und 10
> (10 wird als X dargestellt) -->
> //</xsd:restriction>
> // </xsd:simpleType>
>
>
>
>// GOTO : if (xsdTypeDefinition instanceof XSDSimpleTypeDefinition)
>
>
>
>
>
>
>
> forXsdTypeDefinition(elde.getType(),nameEl );
> schEl.add(childEl);
>
> }
> System.out.println();
> } else if (xsdTerm instanceof XSDElementDeclaration) {
> System.out
> .println(" XSDElementDeclaration XSDElementDeclaration
>XSDElementDeclaration ");
> } else if (xsdTerm instanceof XSDWildcard) {
> }
>
> break;
> }
>
> }
> }
>
> }
>
>
>
>
>
>
> //---------------------------------------------------------- -------------
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:xsdSchema.load() throws 'NullpointerException"! Help!1
Next Topic:HowTo reference definitions in multiple schemas
Goto Forum:
  


Current Time: Thu Apr 25 13:00:57 GMT 2024

Powered by FUDForum. Page generated in 0.04664 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top