navigating XML Schema
This is a memo to navigate around the case classes for XML Schema. Besides the derivation by extension that programming languages have as inheritance, XML Schema also allows derivation by restriction. Since Scala I don't think expresses this easily, some types are wider than how they are specified in the schema.
XElement
- known subclasses: XTopLevelElement, XLocalElementable, XNarrowMaxMin, XLocalElement
- value member:
xelementoption : Option[DataRecord[XElementOption]]
-
- known subclasses: XLocalSimpleType, XLocalComplexType
- value member:
name: Option[String]
- value member:
ref : Option[QName]
- value member:
typeValue : Option[QName]
XSimpleType
- known subclasses: XTopLevelSimpleType, XLocalSimpleType
- value member:
arg1 : DataRecord[XSimpleDerivationOption]
-
- known subclasses: XUnion, XRestriction, XList
-
XUnion
-
- value member:
simpleType : Seq[XLocalSimpleType]
- value member:
-
- value member:
memberTypes : Option[Seq[QName]]
- value member:
-
XRestriction
-
- value member:
arg1 : XSimpleRestrictionModelSequence
- value member:
-
- XSimpleRestrictionModelSequence
-
-
- value member:
simpleType : Option[XLocalSimpleType]
- value member:
-
-
-
- value member:
arg2 : Seq[DataRecord[XFacetsOption]]
- value member:
-
-
-
-
- known subclasses: XFacetable, XWhiteSpace, XNumFacetable, XTotalDigits, XNoFixedFacetable, XPattern, XNumFacet, XNoFixedFacet, XFacet. At runtime, XNoFixedFacetable will be parsed as XNoFixedFacet.
-
-
def parseXFacetsGroup: Parser[scalaxb.DataRecord[xmlschema.XFacetsOption]] = (((scalaxb.ElemName(targetNamespace, "minExclusive")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XFacetable](x)))) | ((scalaxb.ElemName(targetNamespace, "minInclusive")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XFacetable](x)))) | ((scalaxb.ElemName(targetNamespace, "maxExclusive")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XFacetable](x)))) | ((scalaxb.ElemName(targetNamespace, "maxInclusive")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XFacetable](x)))) | ((scalaxb.ElemName(targetNamespace, "totalDigits")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XTotalDigits](x)))) | ((scalaxb.ElemName(targetNamespace, "fractionDigits")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XNumFacetable](x)))) | ((scalaxb.ElemName(targetNamespace, "length")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XNumFacetable](x)))) | ((scalaxb.ElemName(targetNamespace, "minLength")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XNumFacetable](x)))) | ((scalaxb.ElemName(targetNamespace, "maxLength")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XNumFacetable](x)))) | ((scalaxb.ElemName(targetNamespace, "enumeration")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XNoFixedFacetable](x)))) | ((scalaxb.ElemName(targetNamespace, "whiteSpace")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XWhiteSpace](x)))) | ((scalaxb.ElemName(targetNamespace, "pattern")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XPattern](x)))))
-
- value member:
base : Option[QName]
- value member:
-
XList
-
- value member:
simpleType : Option[XLocalSimpleType]
- value member:
-
- value member:
itemType : Option[QName]
- value member:
XComplexType
- known subclasses: XTopLevelComplexType, XLocalComplexType
- value member:
arg1 : DataRecord[XComplexTypeModelOption]
-
- known subclasses: XSimpleContent, XComplexContent, XComplexTypeModelSequence1
XSimpleContent
- value member:
xsimplecontentoption : DataRecord[XSimpleContentOption]
-
- known subclasses: XSimpleRestrictionType, XSimpleExtensionType
-
XSimpleRestrictionType
-
- super type: XRestrictionTypable
-
- value member:
xrestrictiontypableoption : Option[DataRecord[Any]]
. At runtime, this containsOption[DataRecord[XSimpleRestrictionModelSequence]]
.
- value member:
-
- XSimpleRestrictionModelSequence
-
-
- value member:
simpleType : Option[XLocalSimpleType]
- value member:
-
-
-
- value member:
arg2 : Seq[DataRecord[XFacetsOption]]
- value member:
-
-
- value member:
arg2 : XAttrDeclsSequence
- value member:
-
- value member:
base : QName
- value member:
-
XSimpleExtensionType
-
- super type: XExtensionTypable
-
- value member:
arg1 : Option[DataRecord[XTypeDefParticleOption]]
. At runtime this should always containNone
.
- value member:
-
- value member:
arg2 : XAttrDeclsSequence
- value member:
-
- value member:
base : QName
- value member:
XComplexContent
- value member:
xcomplexcontentoption : DataRecord[XComplexContentOption]
-
- known subclasses: XComplexRestrictionType, XExtensionTypable. At runtime, this will contain XExtentionType.
-
XComplexRestrictionType
-
- super type: XRestionTypable
-
- value member:
xrestrictiontypableoption : Option[DataRecord[Any]]
. At runtime, this containsOption[DataRecord[XTypeDefParticleOption]]
- value member:
-
- value member:
arg2 : XAttrDeclsSequence
- value member:
-
- value member:
base : QName
- value member:
-
XExtentionType
-
- super type: XExtensionTypable
-
- value member:
arg1 : Option[DataRecord[XTypeDefParticleOption]]
- value member:
-
- value member:
arg2 : XAttrDeclsSequence
- value member:
-
- value member:
base : QName
- value member:
XComplexTypeModelSequence1
This is an abbreviated form of complex content restriction of xs:anyType
.
- value member:
arg1 : Option[DataRecord[XTypeDefParticleOption]]
- value member: arg2 : XAttrDeclsSequence
XTypeDefParticleOption
- known subclasses: XExplicitGroupable, XGroupRef, XAllable
def parseXTypeDefParticleGroup(wrap: Boolean): Parser[scalaxb.DataRecord[xmlschema.XTypeDefParticleOption]] = (((scalaxb.ElemName(targetNamespace, "group")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XGroupRef](x)))) | ((scalaxb.ElemName(targetNamespace, "all")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XAllable](x)))) | ((scalaxb.ElemName(targetNamespace, "choice")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XExplicitGroupable](x)))) | ((scalaxb.ElemName(targetNamespace, "sequence")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XExplicitGroupable](x)))))
-
XGroupRef
-
super type: XRealGroupable, which extends XGroup
- value member:
arg1 : Seq[DataRecord[XParticleOption]]
. At runtime, this will beNil
. - value member:
name : Option[String]
. At runtime, this will beNone
. - value member:
ref : Option[QName]
. At runtime, this will beSome(qname)
. - value member:
maxOccurs : String
-
value member:
minOccurs : Int
-
XExplicitGroupable
Likely at the runtime, this is parsed as XExplicitGroup.
-
super type: XGroup
- value member:
arg1 : Seq[DataRecord[XParticleOption]]
. -
- known subclasses: XLocalElementable, XExplicitGroupable, XGroupRef, XAllable, XAny. At runtime, XAllable will not appear nested.
def parseXParticleGroup(wrap: Boolean): Parser[scalaxb.DataRecord[xmlschema.XParticleOption]] = (((scalaxb.ElemName(targetNamespace, "element")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XLocalElementable](x)))) | ((scalaxb.ElemName(targetNamespace, "group")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XGroupRef](x)))) | ((scalaxb.ElemName(targetNamespace, "all")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XAllable](x)))) | ((scalaxb.ElemName(targetNamespace, "choice")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XExplicitGroupable](x)))) | ((scalaxb.ElemName(targetNamespace, "sequence")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XExplicitGroupable](x)))) | ((scalaxb.ElemName(targetNamespace, "any")) ^^ (x => scalaxb.DataRecord(x.namespace, Some(x.name), fromXML[xmlschema.XAny](x)))))
- value member:
name : Option[String]
. At runtime, this will beNone
. - value member:
ref : Option[QName]
. At runtime, this will beNone
. - value member:
maxOccurs : String
-
value member:
minOccurs : Int
-
XAllable
Likely at the runtime, this is parsed as XAllType.
-
super type: XExplicitGroupable
- value member:
arg1 : Seq[DataRecord[XParticleOption]]
. At runtime, this will only containXLocalElementable
. - value member:
name : Option[String]
. At runtime, this will beNone
. - value member:
ref : Option[QName]
. At runtime, this will beNone
. - value member:
maxOccurs : String
- value member:
minOccurs : Int