Reputation: 2251
Not sure this is possible with XSD, but still the question is here.
So I have the following code in my xml:
<formats>
<format name="TableText">
<item name="halign">left</item>
</format>
</formats>
<styles>
<style name="Style">
<item name="format">TableText</item>
</style>
</styles>
What I want to achieve is that when the user starts typing content of a format (<item name="format">TableText</item>
), he would only be able to enter what he had in a name attribute of a format tag (<format name="TableText">
)
Upvotes: 0
Views: 52
Reputation: 163322
It's possible to define a constraint (using key/keyref) that the value of style/item
must be a value that's present in format/item
, but whether any XML editing tool is able to use such a constraint to drive syntax-directed editing is another question.
Upvotes: 1