validation - How can I constrain XML content to other content in the XML (as a reference)? -
I want to be valid if and only when there is Valid because each because there is no Invalid because there is not a Ideally, I should also be able to do this, that is, any of the contents of I have seen the w3schools reference for the XML schema, but it seems that there is no list of such capabilities. This is definitely not a complete reference to the imagery, though. Is it possible within the XML schema? @jiraka has provided the following expression which is solved (2) (and (4)) but not (3): $ / / / key return In IMO, XSD 1.0, this is not possible. Of course there are some basic obstacles (xs: unique, xs: key). It is defined using an XPath expression, but this expression is only a subset of the entire XPath language (see Chapter 9.2.5). The most limited fact in this case is that function calls are not allowed and you may need some string manipulation function, because the "call" element is content string. If you can use XSD 1.1, then some other capabilities, to express more complex restrictions, especcialy is "xs: emphasis" in my mind I think the Xpath function is XSD 1.1 Can be said in. id = * from > Method / Key and
{*} in substrings
method / call .
{*} corresponds exactly with
id = * and vice versa.
& lt; Format & gt; & Lt; Phone & gt; / Tags / {1} / top-ask / {2} & lt; / Call & gt; & Lt; Major id = "1" & gt; & Lt; Name & gt; Tag & lt; / Name & gt; For site & lt; Discussion & gt; Tag & lt; / Discussion & gt; & Lt; / Key & gt; & Lt; Major id = "2" & gt; & Lt; Name & gt; Period & lt; / Name & gt; & Lt; / Key & gt; & Lt; / Format & gt; Invalid
id = * no related
{*} .
& lt; Format & gt; & Lt; Phone & gt; / Tags / {1} & lt; / Call & gt; & Lt; Major id = "1" & gt; & Lt; Name & gt; Tag & lt; / Name & gt; For site & lt; Discussion & gt; Tag & lt; / Discussion & gt; & Lt; / Key & gt; & Lt; Major id = "2" & gt; & Lt; Name & gt; Period & lt; / Name & gt; & Lt; / Key & gt; & Lt; / Format & gt;
{*} any
id = * .
& lt; Format & gt; & Lt; Phone & gt; / Tags / {1} / top-ask / {2} & lt; / Call & gt; & Lt; Major id = "1" & gt; & Lt; Name & gt; Tag & lt; / Name & gt; For site & lt; Discussion & gt; Tag & lt; / Discussion & gt; & Lt; / Key & gt; & Lt; / Format & gt;
{*} can be < Code> [^} {] .
& lt; Format & gt; & Lt; Phone & gt; / Tag / {tag} / top-ask / {2} & lt; / Call & gt; & Lt; Major id = "tag" & gt; & Lt; Name & gt; Tag & lt; / Name & gt; For site & lt; Discussion & gt; Tag & lt; / Discussion & gt; & Lt; / Key & gt; & Lt; Major id = "2" & gt; & Lt; Name & gt; Period & lt; / Name & gt; & Lt; / Key & gt; & Lt; / Format & gt;
Update
for matches ($ key /../ call, contact ("\ {", $ key / @ id, "\}" P>
Comments
Post a Comment