Reputation: 821
im doing a XML exercise and i got an error. I did this XML(based on the google image above):
<google>
<result id = "">
<title>....</title>
<description>.....</description>
<link>.......</link>
</result>
<totalResults>About 718.000 results</totalResults>
</google>
Then my XSD:
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="google">
<xs:complexType>
<xs:sequence>
<xs:element name="result" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="title"/>
<xs:element type="xs:string" name="description"/>
<xs:element type="xs:string" name="link"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="id"/>
</xs:complexType>
</xs:element>
<xs:element type="xs:string" name="totalResults"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
My doubt is, in XSD i can define this -> <xs:element name="result" maxOccurs="unbounded">
if the results are "About 718.000 results".
My doubt its because 718.000 is a big number so i guess i can define "unbounded", and i saw this in some examples on my search. But unbounded means like "infinte" so im a bit confuse if its is appropriate or not use in this case "unbounded".
What do you think?
Upvotes: 1
Views: 3797
Reputation: 31760
In any case, XSD does not offer any other way of modelling "a sequence of things of unknown and potentially infinite length".
So you're stuck with it. Not sure if this is what you are getting at.
Upvotes: 1