I want to be able to tell Xonomy that the <data> element contains text if @type="name" and that it contains child elements like <day> etc, if @type="date-of-birth".
You can do these things with Xonomy already by giving the various properties of the <data> element specification as functions rather than literal values. But it's complex and messy. It would be easier (for the docspec author) to be able to create two different element specifications for these two XPath expressions:
data[@type="name"]
data[@type="date-of-birth"]
(Originally suggested by Morgan Cundiff of Library of Congress.)
Suppose I have an XML document like this:
I want to be able to tell Xonomy that the
<data>
element contains text if@type="name"
and that it contains child elements like<day>
etc, if@type="date-of-birth"
.You can do these things with Xonomy already by giving the various properties of the
<data>
element specification as functions rather than literal values. But it's complex and messy. It would be easier (for the docspec author) to be able to create two different element specifications for these two XPath expressions:(Originally suggested by Morgan Cundiff of Library of Congress.)