May 11, 2007 #1 ttdobj Technical User Sep 30, 2002 63 GB If in an XSD, an element does not have minOccurs specified, what default value is that element assumed to have? I am running Stylus Studio, which seems to think that the it therefore defaults to a minOccurs value of 1. Is this right? Ta John
If in an XSD, an element does not have minOccurs specified, what default value is that element assumed to have? I am running Stylus Studio, which seems to think that the it therefore defaults to a minOccurs value of 1. Is this right? Ta John
May 11, 2007 Thread starter #2 ttdobj Technical User Sep 30, 2002 63 GB But also, if an element is present in the file but is empty. For example: Code: <foobar /> is that the equivalent of an occurance of once or no occurance? Yours confusedly John Upvote 0 Downvote
But also, if an element is present in the file but is empty. For example: Code: <foobar /> is that the equivalent of an occurance of once or no occurance? Yours confusedly John
May 11, 2007 #3 tsuji Technical User Jul 25, 2001 10,675 US [1] If I take a quick tour to w3.org schema spec., there is this. [tt]quote http://www.w3.org/TR/xmlschema-1/ XML Representation Summary: element Element Information Item <element abstract = boolean : false block = (#all | List of (extension | restriction | substitution)) default = string final = (#all | List of (extension | restriction)) fixed = string form = (qualified | unqualified) id = ID maxOccurs = (nonNegativeInteger | unbounded) : [blue]1[/blue] minOccurs = nonNegativeInteger : [blue]1[/blue] name = NCName nillable = boolean : false ref = QName substitutionGroup = QName type = QName {any attributes with non-schema namespace . . .}> Content: (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)) </element> [/tt] The two "1" are meant for default value. [2] ><foobar /> >is that the equivalent of an occurance of once or no occurance? It counts as once. Upvote 0 Downvote
[1] If I take a quick tour to w3.org schema spec., there is this. [tt]quote http://www.w3.org/TR/xmlschema-1/ XML Representation Summary: element Element Information Item <element abstract = boolean : false block = (#all | List of (extension | restriction | substitution)) default = string final = (#all | List of (extension | restriction)) fixed = string form = (qualified | unqualified) id = ID maxOccurs = (nonNegativeInteger | unbounded) : [blue]1[/blue] minOccurs = nonNegativeInteger : [blue]1[/blue] name = NCName nillable = boolean : false ref = QName substitutionGroup = QName type = QName {any attributes with non-schema namespace . . .}> Content: (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)) </element> [/tt] The two "1" are meant for default value. [2] ><foobar /> >is that the equivalent of an occurance of once or no occurance? It counts as once.