I have an XSD with a field called "customer" that is minOccurs=0 and maxOccurs=unbounded. Is there a way to attach a sequence number to that customer entry automatically?
Ideally the generated XML would look like:
<customerupdate>
<customer record="1">
<fname>albert</fname>
</customer>
<customer record="2">
<fname>david</fname>
</customer>
</customerupdate>
you cannot do what you want.
You can only define a default or fixed value for attributes, but only static values can be assigned to default/fixed
You can't generate these values with an XSD processor, that's not its job. But it's very easy to do with XSLT.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.