Click here to Skip to main content
15,896,606 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Ignore whitespace problem while reading XML file Pin
biglewy26-Oct-06 20:12
biglewy26-Oct-06 20:12 
GeneralRe: Ignore whitespace problem while reading XML file Pin
led mike27-Oct-06 6:36
led mike27-Oct-06 6:36 
GeneralRe: Ignore whitespace problem while reading XML file Pin
Dustin Metzgar27-Oct-06 8:03
Dustin Metzgar27-Oct-06 8:03 
QuestionSchema for "Element or List of Elements" Pin
peterchen25-Oct-06 6:06
peterchen25-Oct-06 6:06 
AnswerRe: Schema for "Element or List of Elements" Pin
led mike25-Oct-06 8:58
led mike25-Oct-06 8:58 
GeneralRe: Schema for "Element or List of Elements" Pin
peterchen25-Oct-06 9:15
peterchen25-Oct-06 9:15 
GeneralRe: Schema for "Element or List of Elements" Pin
Michael Dunn25-Oct-06 9:30
sitebuilderMichael Dunn25-Oct-06 9:30 
AnswerRe: Schema for "Element or List of Elements" Pin
BoneSoft27-Oct-06 10:29
BoneSoft27-Oct-06 10:29 
This is easy to do in the Schema, the software that uses it is where the complication comes in with this type of structure. Never understood why someone would want to do this, but it can be done.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:complexType name="Topic">
	</xs:complexType>
	<xs:complexType name="TopicList">
		<xs:sequence>
			<xs:element type="Topic" minOccurs="0" maxOccurs="unbounded"></xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="RootNode">
		<xs:choice>
			<xs:element type="Topic"></xs:element>
			<xs:element type="TopicList"></xs:element>
		</xs:choice>
	</xs:complexType>
	
	<xs:element type="RootNode"></xs:element>
</xs:schema>


Your root node is of type "RootNode", which is a Choice, meaning it will accept either a "Topic" or a "TopicList". And "TopicList" is a sequence of "Topics".



Try code model generation tools at BoneSoft.com.

GeneralRe: Schema for "Element or List of Elements" Pin
peterchen27-Oct-06 12:06
peterchen27-Oct-06 12:06 
AnswerRe: Schema for "Element or List of Elements" Pin
KaЯl2-Nov-06 21:35
KaЯl2-Nov-06 21:35 
QuestionXSL/Xpath Problem Pin
Sarvis24-Oct-06 17:23
Sarvis24-Oct-06 17:23 
GeneralRe: XSL/Xpath Problem Pin
Elina Blank25-Oct-06 2:39
sitebuilderElina Blank25-Oct-06 2:39 
GeneralRe: XSL/Xpath Problem Pin
Sarvis25-Oct-06 4:46
Sarvis25-Oct-06 4:46 
GeneralRe: XSL/Xpath Problem Pin
Elina Blank25-Oct-06 5:45
sitebuilderElina Blank25-Oct-06 5:45 
GeneralRe: XSL/Xpath Problem Pin
Sarvis25-Oct-06 10:22
Sarvis25-Oct-06 10:22 
GeneralRe: XSL/Xpath Problem Pin
Elina Blank26-Oct-06 3:38
sitebuilderElina Blank26-Oct-06 3:38 
GeneralRe: XSL/Xpath Problem Pin
Sarvis27-Oct-06 12:04
Sarvis27-Oct-06 12:04 
AnswerRe: XSL/Xpath Problem Pin
Dustin Metzgar26-Oct-06 9:33
Dustin Metzgar26-Oct-06 9:33 
GeneralRe: XSL/Xpath Problem Pin
Sarvis26-Oct-06 14:02
Sarvis26-Oct-06 14:02 
GeneralRe: XSL/Xpath Problem Pin
Dustin Metzgar27-Oct-06 7:59
Dustin Metzgar27-Oct-06 7:59 
GeneralRe: XSL/Xpath Problem Pin
Sarvis27-Oct-06 12:03
Sarvis27-Oct-06 12:03 
GeneralRe: XSL/Xpath Problem Pin
Dustin Metzgar27-Oct-06 12:21
Dustin Metzgar27-Oct-06 12:21 
GeneralRe: XSL/Xpath Problem Pin
Sarvis27-Oct-06 13:07
Sarvis27-Oct-06 13:07 
GeneralRe: XSL/Xpath Problem Pin
Dustin Metzgar27-Oct-06 14:08
Dustin Metzgar27-Oct-06 14:08 
GeneralRe: XSL/Xpath Problem Pin
Sarvis1-Nov-06 4:35
Sarvis1-Nov-06 4:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.