Suche senden
Hochladen
Java and XML Schema
âą
Als PPTX, PDF herunterladen
âą
1 gefÀllt mir
âą
2,851 views
Raji Ghawi
Folgen
tutorial about processing XML Schema using Java with XSOM API https://xsom.java.net/
Weniger lesen
Mehr lesen
Technologie
Melden
Teilen
Melden
Teilen
1 von 22
Jetzt herunterladen
Empfohlen
Game Economy Balancing Workshop
Game Economy Balancing Workshop
Mariana Boucault
Â
Data Driven Game Design
Data Driven Game Design
Pier Luca Lanzi
Â
[COSCUP 2020] How to use llvm frontend library-libtooling
[COSCUP 2020] How to use llvm frontend library-libtooling
Douglas Chen
Â
A whirlwind tour of the LLVM optimizer
A whirlwind tour of the LLVM optimizer
Nikita Popov
Â
CïŒïŒ11ăemscriptenăšä»ăćăŁăŠïŒćčŽéăźæŻăèżă
CïŒïŒ11ăemscriptenăšä»ăćăŁăŠïŒćčŽéăźæŻăèżă
paosidufgythrj
Â
Linuxă«ăŒăă«ăèȘăă§æčăăŠç„ăăăă»ăčăšăčăŹăăăźéă
Linuxă«ăŒăă«ăèȘăă§æčăăŠç„ăăăă»ăčăšăčăŹăăăźéă
Retrieva inc.
Â
llvm basic porting for risc v
llvm basic porting for risc v
Tsung-Chun Lin
Â
COSCUP2016 - LLVMæĄæ¶ăç±æ·șć „æ·ș
COSCUP2016 - LLVMæĄæ¶ăç±æ·șć „æ·ș
hydai
Â
Empfohlen
Game Economy Balancing Workshop
Game Economy Balancing Workshop
Mariana Boucault
Â
Data Driven Game Design
Data Driven Game Design
Pier Luca Lanzi
Â
[COSCUP 2020] How to use llvm frontend library-libtooling
[COSCUP 2020] How to use llvm frontend library-libtooling
Douglas Chen
Â
A whirlwind tour of the LLVM optimizer
A whirlwind tour of the LLVM optimizer
Nikita Popov
Â
CïŒïŒ11ăemscriptenăšä»ăćăŁăŠïŒćčŽéăźæŻăèżă
CïŒïŒ11ăemscriptenăšä»ăćăŁăŠïŒćčŽéăźæŻăèżă
paosidufgythrj
Â
Linuxă«ăŒăă«ăèȘăă§æčăăŠç„ăăăă»ăčăšăčăŹăăăźéă
Linuxă«ăŒăă«ăèȘăă§æčăăŠç„ăăăă»ăčăšăčăŹăăăźéă
Retrieva inc.
Â
llvm basic porting for risc v
llvm basic porting for risc v
Tsung-Chun Lin
Â
COSCUP2016 - LLVMæĄæ¶ăç±æ·șć „æ·ș
COSCUP2016 - LLVMæĄæ¶ăç±æ·șć „æ·ș
hydai
Â
Java 5 Features
Java 5 Features
sholavanalli
Â
Java architecture for xml binding
Java architecture for xml binding
Hosein Zare
Â
The State of JavaScript (2015)
The State of JavaScript (2015)
Domenic Denicola
Â
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar Prokopec
LoĂŻc Descotte
Â
RMI Java Programming Lab Manual 2019
RMI Java Programming Lab Manual 2019
Gebreigziabher Ab
Â
XML Support: Specifications and Development
XML Support: Specifications and Development
Peter Eisentraut
Â
Unfiltered Unveiled
Unfiltered Unveiled
Wilfred Springer
Â
Summary of C++17 features
Summary of C++17 features
Bartlomiej Filipek
Â
Ast transformations
Ast transformations
HamletDRC
Â
Sax Dom Tutorial
Sax Dom Tutorial
vikram singh
Â
Design Patterns in .Net
Design Patterns in .Net
Dmitri Nesteruk
Â
Xml generation and extraction using XMLDB
Xml generation and extraction using XMLDB
pallavi kasibhotla
Â
Wien15 java8
Wien15 java8
Jaanus Pöial
Â
Java serialization
Java serialization
Ecommerce Solution Provider SysIQ
Â
What is new in Java 8
What is new in Java 8
Sandeep Kr. Singh
Â
Working With XML in IDS Applications
Working With XML in IDS Applications
Keshav Murthy
Â
zinno
zinno
guest6a7933
Â
Swift study: Closure
Swift study: Closure
Futada Takashi
Â
Advance Java Programs skeleton
Advance Java Programs skeleton
Iram Ramrajkar
Â
Namespaces
Namespaces
zindadili
Â
Database Programming Techniques
Database Programming Techniques
Raji Ghawi
Â
Java and XML
Java and XML
Raji Ghawi
Â
Weitere Àhnliche Inhalte
Ăhnlich wie Java and XML Schema
Java 5 Features
Java 5 Features
sholavanalli
Â
Java architecture for xml binding
Java architecture for xml binding
Hosein Zare
Â
The State of JavaScript (2015)
The State of JavaScript (2015)
Domenic Denicola
Â
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar Prokopec
LoĂŻc Descotte
Â
RMI Java Programming Lab Manual 2019
RMI Java Programming Lab Manual 2019
Gebreigziabher Ab
Â
XML Support: Specifications and Development
XML Support: Specifications and Development
Peter Eisentraut
Â
Unfiltered Unveiled
Unfiltered Unveiled
Wilfred Springer
Â
Summary of C++17 features
Summary of C++17 features
Bartlomiej Filipek
Â
Ast transformations
Ast transformations
HamletDRC
Â
Sax Dom Tutorial
Sax Dom Tutorial
vikram singh
Â
Design Patterns in .Net
Design Patterns in .Net
Dmitri Nesteruk
Â
Xml generation and extraction using XMLDB
Xml generation and extraction using XMLDB
pallavi kasibhotla
Â
Wien15 java8
Wien15 java8
Jaanus Pöial
Â
Java serialization
Java serialization
Ecommerce Solution Provider SysIQ
Â
What is new in Java 8
What is new in Java 8
Sandeep Kr. Singh
Â
Working With XML in IDS Applications
Working With XML in IDS Applications
Keshav Murthy
Â
zinno
zinno
guest6a7933
Â
Swift study: Closure
Swift study: Closure
Futada Takashi
Â
Advance Java Programs skeleton
Advance Java Programs skeleton
Iram Ramrajkar
Â
Namespaces
Namespaces
zindadili
Â
Ăhnlich wie Java and XML Schema
(20)
Java 5 Features
Java 5 Features
Â
Java architecture for xml binding
Java architecture for xml binding
Â
The State of JavaScript (2015)
The State of JavaScript (2015)
Â
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar Prokopec
Â
RMI Java Programming Lab Manual 2019
RMI Java Programming Lab Manual 2019
Â
XML Support: Specifications and Development
XML Support: Specifications and Development
Â
Unfiltered Unveiled
Unfiltered Unveiled
Â
Summary of C++17 features
Summary of C++17 features
Â
Ast transformations
Ast transformations
Â
Sax Dom Tutorial
Sax Dom Tutorial
Â
Design Patterns in .Net
Design Patterns in .Net
Â
Xml generation and extraction using XMLDB
Xml generation and extraction using XMLDB
Â
Wien15 java8
Wien15 java8
Â
Java serialization
Java serialization
Â
What is new in Java 8
What is new in Java 8
Â
Working With XML in IDS Applications
Working With XML in IDS Applications
Â
zinno
zinno
Â
Swift study: Closure
Swift study: Closure
Â
Advance Java Programs skeleton
Advance Java Programs skeleton
Â
Namespaces
Namespaces
Â
Mehr von Raji Ghawi
Database Programming Techniques
Database Programming Techniques
Raji Ghawi
Â
Java and XML
Java and XML
Raji Ghawi
Â
Java and SPARQL
Java and SPARQL
Raji Ghawi
Â
Java and OWL
Java and OWL
Raji Ghawi
Â
SPARQL
SPARQL
Raji Ghawi
Â
XQuery
XQuery
Raji Ghawi
Â
XPath
XPath
Raji Ghawi
Â
Ontology-based Cooperation of Information Systems
Ontology-based Cooperation of Information Systems
Raji Ghawi
Â
OWSCIS: Ontology and Web Service based Cooperation of Information Sources
OWSCIS: Ontology and Web Service based Cooperation of Information Sources
Raji Ghawi
Â
Coopération des SystÚmes d'Informations basée sur les Ontologies
Coopération des SystÚmes d'Informations basée sur les Ontologies
Raji Ghawi
Â
Building Ontologies from Multiple Information Sources
Building Ontologies from Multiple Information Sources
Raji Ghawi
Â
Database-to-Ontology Mapping Generation for Semantic Interoperability
Database-to-Ontology Mapping Generation for Semantic Interoperability
Raji Ghawi
Â
Mehr von Raji Ghawi
(12)
Database Programming Techniques
Database Programming Techniques
Â
Java and XML
Java and XML
Â
Java and SPARQL
Java and SPARQL
Â
Java and OWL
Java and OWL
Â
SPARQL
SPARQL
Â
XQuery
XQuery
Â
XPath
XPath
Â
Ontology-based Cooperation of Information Systems
Ontology-based Cooperation of Information Systems
Â
OWSCIS: Ontology and Web Service based Cooperation of Information Sources
OWSCIS: Ontology and Web Service based Cooperation of Information Sources
Â
Coopération des SystÚmes d'Informations basée sur les Ontologies
Coopération des SystÚmes d'Informations basée sur les Ontologies
Â
Building Ontologies from Multiple Information Sources
Building Ontologies from Multiple Information Sources
Â
Database-to-Ontology Mapping Generation for Semantic Interoperability
Database-to-Ontology Mapping Generation for Semantic Interoperability
Â
KĂŒrzlich hochgeladen
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Â
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(âïž+971_581248768%)**%*]'#abortion pills for sale in dubai@
Â
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Andrey Devyatkin
Â
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Orbitshub
Â
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Jeffrey Haguewood
Â
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
apidays
Â
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
rafiqahmad00786416
Â
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
apidays
Â
Elevate Developer Efficiency & build GenAI Application with Amazon Qâ
Elevate Developer Efficiency & build GenAI Application with Amazon Qâ
Bhuvaneswari Subramani
Â
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
Christopher Logan Kennedy
Â
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
johnbeverley2021
Â
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
Â
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
Zilliz
Â
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
Â
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
apidays
Â
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
MadyBayot
Â
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
Remote DBA Services
Â
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Â
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vĂĄzquez
Â
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Orbitshub
Â
KĂŒrzlich hochgeladen
(20)
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Â
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Â
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Â
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Â
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Â
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Â
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
Â
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Â
Elevate Developer Efficiency & build GenAI Application with Amazon Qâ
Elevate Developer Efficiency & build GenAI Application with Amazon Qâ
Â
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
Â
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
Â
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Â
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
Â
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Â
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Â
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
Â
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
Â
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Â
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Â
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Â
Java and XML Schema
1.
Java and XML
Schema XSOM XML Schema Object Model Raji GHAWI 19/01/2009
2.
Import required packages import import import import com.sun.xml.xsom.*; com.sun.xml.xsom.XSModelGroup.*; com.sun.xml.xsom.impl.*; com.sun.xml.xsom.parser.*;
3.
Create the parser XSOMParser
parser = new XSOMParser(); parser.setErrorHandler(new MyErrorHandler());
4.
MyErrorHandler public class MyErrorHandler
implements ErrorHandler{ public void warning(SAXParseException se){ System.err.println("warning : "+se.getMessage()); } public void error(SAXParseException se){ System.err.println("error : "+se.getMessage()); } public void fatalError(SAXParseException se){ System.err.println("fatal error : "+se.getMessage()); } }
5.
Parse an XML
schema file try { parser.parse(new File("./example.xsd")); // .... } catch (IOException ioe) { ioe.printStackTrace(); } catch (SAXException se) { se.printStackTrace(); }
6.
XSSchemaSet XSSchemaSet schemaSet =
parser.getResult(); Iterator<XSSchema> schemaIter = schemaSet.iterateSchema(); while (schemaIter.hasNext()) { XSSchema schema = (XSSchema) schemaIter.next(); if(schema.getTargetNamespace(). equals("http://www.w3.org/2001/XMLSchema")) continue; // .... }
7.
<xs:element name="product"> <xs:complexType> <xs:attribute name="prodid"
type="xs:positiveInteger" /> </xs:complexType> </xs:element> anonymous complex type <xs:element name="member" type="personinfo" /> <xs:complexType name="personinfo"> <xs:sequence> <xs:element name="firstname" type="xs:string" /> <xs:element name="lastname" type="xs:string" /> </xs:sequence> </xs:complexType> named complex type <xs:element name="car" default="Audi"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="Audi" /> <xs:enumeration value="Golf" /> <xs:enumeration value="BMW" /> </xs:restriction> </xs:simpleType> </xs:element> anonymous simple type <xs:element name="car2" type="carType" fixed="BMW" /> <xs:simpleType name="carType"> <xs:restriction base="xs:string"> <xs:enumeration value="Audi" /> <xs:enumeration value="Golf" /> <xs:enumeration value="BMW" /> </xs:restriction> </xs:simpleType> named simple type <xs:element name="dateborn" type="xs:date" abstract="true" /> primitive type
8.
Elements System.out.println("--------- elements ---------"); Iterator<XSElementDecl>
elemIter = schema.iterateElementDecls(); while (elemIter.hasNext()) { XSElementDecl elem = elemIter.next(); System.out.println(describeElement(elem)); }
9.
Elements public static String
describeElement(XSElementDecl elem) { String txt = elem.getName(); XSType type = elem.getType(); txt += (" t ("+type.toString()+")"); if (elem.isGlobal()) txt += " (global)"; else if (elem.isLocal()) txt += " (local)"; if (elem.isAbstract()) txt += " t(abstract)"; XmlString defaultValue = elem.getDefaultValue(); if(defaultValue!=null){ txt += " t(default='"+defaultValue+"')"; } } XmlString fixedValue = elem.getFixedValue(); if(fixedValue!=null){ txt += " t(fixed='"+fixedValue+"')"; } return txt; --------- elements --------car (anonymous simple type) (global) (default='Audi') member (personinfo complex type) (global) product (anonymous complex type) (global) dateborn (date simple type) (global) (abstract) car2 (carType simple type) (global) (fixed='BMW')
10.
Attributes System.out.println("--------- attributes ---------"); Iterator<XSAttributeDecl>
attIter = schema.iterateAttributeDecls(); while (attIter.hasNext()) { XSAttributeDecl att = attIter.next(); System.out.println(describeAttribute(att)); }
11.
Attributes public static String
describeAttribute(XSAttributeDecl att) { String txt = att.getName()+" t "+att.getType().getName(); XmlString defaultValue = att.getDefaultValue(); if(defaultValue!=null){ txt += " t(default='"+defaultValue+"')"; } XmlString fixedValue = att.getFixedValue(); if(fixedValue!=null){ txt += " t(fixed='"+fixedValue+"')"; } // isRequired ?? return txt; } <xs:attribute <xs:attribute <xs:attribute <xs:attribute name="lang1" name="lang2" name="lang3" name="lang4" type="xs:string" type="xs:string" type="xs:string" type="xs:string" /> default="EN" /> fixed="EN" /> use="required" /> --------- attributes --------lang1 string lang3 string (fixed='EN') lang2 string (default='EN') lang4 string
12.
Types System.out.println("--------- types ---------"); Iterator<XSType>
typeIter = schema.iterateTypes(); while (typeIter.hasNext()) { XSType st = typeIter.next(); System.out.println(describeType(st)); }
13.
Types public static String
describeType(XSType type) { String txt = ""; if(type.isAnonymous()) txt += "(anonymous)"; else txt += type.getName(); if (type.isGlobal()) txt += " (global)"; else if (type.isLocal()) txt += " (local)"; if(type.isComplexType()) txt += " (complex)"; else if(type.isSimpleType()) txt += " (simple)"; } int deriv = type.getDerivationMethod(); switch(deriv){ case XSType.EXTENSION: txt += " (EXTENSION)"; break; case XSType.RESTRICTION: txt += " (RESTRICTION)"; break; case XSType.SUBSTITUTION: txt += " (SUBSTITUTION)"; break; } return txt; --------- types --------carType (global) (simple) (RESTRICTION) personinfo (global) (complex) (RESTRICTION) Global Types only !!
14.
How to get
all types ? public static Vector<XSType> allTypes = new Vector<XSType>(); Iterator<XSType> typeIter = schema.iterateTypes(); while (typeIter.hasNext()) { XSType st = typeIter.next(); allTypes.addElement(st); } // .... System.out.println("--------- types ---------"); for (int i = 0; i < allTypes.size(); i++) { XSType type = allTypes.get(i); System.out.println(describeType(type)); } public static String describeElement(XSElementDecl elem) { String txt = elem.getName(); XSType type = elem.getType(); if(!allTypes.contains(type)){ allTypes.addElement(type); } // .... } primitive type !! --------- types --------carType (global) (simple) (RESTRICTION) personinfo (global) (complex) (RESTRICTION) (anonymous) (local) (simple) (RESTRICTION) (anonymous) (local) (complex) (RESTRICTION) date (global) (simple) (RESTRICTION)
15.
How to ignore
primitive types ? public static String describeElement(XSElementDecl elem) { String txt = elem.getName(); XSType type = elem.getType(); if(!allTypes.contains(type)){ if(type.isSimpleType()){ if(!type.asSimpleType().isPrimitive()){ allTypes.addElement(type); } } else { allTypes.addElement(type); } } // .... } --------- types --------carType (global) (simple) (RESTRICTION) personinfo (global) (complex) (RESTRICTION) (anonymous) (local) (simple) (RESTRICTION) (anonymous) (local) (complex) (RESTRICTION)
16.
Complex and Simple
Types // XSType type if(type.isComplexType()){ XSComplexType complex = type.asComplexType(); // } else if(type.isSimpleType()){ XSSimpleType simple = type.asSimpleType(); // } schema.iterateSimpleTypes(); schema.iterateComplexTypes();
17.
XSComplexType // XSComplexType complex XSContentType
contenetType = complex.getContentType(); if(contenetType instanceof EmptyImpl){ XSContentType empty = contenetType.asEmpty(); // } else if(contenetType instanceof ParticleImpl){ XSTerm term = contenetType.asParticle().getTerm(); // } else if(contenetType instanceof SimpleTypeImpl){ XSSimpleType st = contenetType.asSimpleType(); // }
18.
XSTerm // XSTerm term if(term.isElementDecl()){ XSElementDecl elem
= term.asElementDecl(); // } else if(term.isModelGroup()){ XSModelGroup mg = term.asModelGroup(); // } else if(term.isModelGroupDecl()){ XSModelGroupDecl mgd = term.asModelGroupDecl(); XSModelGroup mg = mgd.getModelGroup(); // } else if(term.isWildcard()){ XSWildcard wildcard = term.asWildcard(); // }
19.
XSModelGroup // XSModelGroup modelGroup Compositor
comp = modelGroup.getCompositor(); if(comp.equals(Compositor.SEQUENCE)){ // } else if(comp.equals(Compositor.ALL)){ // } else if(comp.equals(Compositor.CHOICE)){ // } XSParticle[] particles = modelGroup.getChildren(); for (int i = 0; i < particles.length; i++) { XSTerm term = particles[i].getTerm(); // .... }
20.
XSSimpleType // XSSimpleType simpe if(simple.isList()){ XSListSimpleType
lst = simple.asList(); // } else if(simple.isUnion()){ XSUnionSimpleType ust = simple.asUnion(); // } else if(simple.isRestriction()){ XSRestrictionSimpleType rst = simple.asRestriction(); // }
21.
XSRestrictionSimpleType // XSRestrictionSimpleType restriction XSType
baseType = restriction.getBaseType(); // .... Iterator<?> facets = restriction.getDeclaredFacets().iterator(); while (facets.hasNext()) { XSFacet facet = (XSFacet) facets.next(); String name = facet.getName(); XmlString value = facet.getValue(); if(name.equalsIgnoreCase("enumeration")){ // } else if(name.equalsIgnoreCase("minInclusive")){ // } else if(name.equalsIgnoreCase("minExclusive")){ // } else if(name.equalsIgnoreCase("maxInclusive")){ // } else if(name.equalsIgnoreCase("maxExclusive")){ // } else if(name.equalsIgnoreCase("whiteSpace")){ // } }
22.
References ïŻ https://xsom.dev.java.net/ (Kohsuke Kawaguchi, Sun
Microsystems ) ïŻ http://www.stylusstudio.com/w3c/schema0/_index.htm
Jetzt herunterladen