Skip to content

xs:any parseable ? #75

@vortex314

Description

@vortex314

I got this XSD info

    <xs:complexType name="SupplementaryDataEnvelope1">
        <xs:sequence>
            <xs:any namespace="##any" processContents="lax"/>
        </xs:sequence>
    </xs:complexType>

I don't seem to find any sub-elements in the sequence.

  def xsdSequenceToElement(xsdSequence: XsdSequence, xpath: String): JSONObject = {
    val node = createObjectOfType("Sequence")
    Option(xsdSequence.getAnnotation).foreach(annotation => objectEnrichWithAnnotation(node, annotation))

    xsdSequence.getChildrenElements.forEach(el => {
      getOrCreateChildren(node).put(recurseXsdElement(el, xpath))
      ()
    })
    xsdSequence.getChildrenChoices.forEach(choice => {
      getOrCreateChildren(node).put(xsdChoiceToElement(choice, xpath))
      ()
    })
    xsdSequence.getChildrenSequences.forEach(seq => {
      getOrCreateChildren(node).put(xsdSequenceToElement(seq, xpath))
      ()
    })

    node
  }

Can I detect this case ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions