What does the ref attribute on an element in an XSD do?

前端 未结 2 577
旧巷少年郎
旧巷少年郎 2020-12-25 10:01

Documentation seems to say that it references another element in the schema, but how could it be used - I\'ve never seen it in schemas that I have worked with.

Anyon

2条回答
  •  忘掉有多难
    2020-12-25 10:09

    For example if you want to declare element types that can appear deeply nested, but also as top level elements in an instance document.

    The XML Schema Primer has examples for this: http://www.w3.org/TR/xmlschema-0/

提交回复
热议问题