Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Repeating elements in a sequence.

Repeating elements in a sequence.

Scheduled Pinned Locked Moved XML / XSL
question
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nay
    wrote on last edited by
    #1

    I want some child elements in an element to repeat. But I also don't care what order. I cant use the "all" compositor because the maxOccurance can only be 1. Here's what I have tried but I still don't have the result I want. The way I thought this should work is "line" and "field" should repeat as many times as needed.

    <xsd:element name="group">
    xsd:complexType
    xsd:sequence
    <xsd:element name="name" minOccurs = "1" maxOccurs ="1"/>

    	<xsd:choice minOccurs = "0" maxOccurs = "unbounded">
    		<xsd:element ref="line" minOccurs = "0" maxOccurs = "unbounded"/>
    		<xsd:element ref="field" minOccurs = "0" maxOccurs = "unbounded"/>
    	</xsd:choice>
    
    	<xsd:element ref="TextFieldGroup" minOccurs = "0" maxOccurs = "unbounded"/>
    </xsd:sequence>
    	<xsd:attribute name="groupType" use = "optional"/>
    </xsd:complexType>
    </xsd:element>	
    

    Any ideas on what I can do? nay

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups