[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML schema: require a descendant?

Subject: Re: XML schema: require a descendant?
From: "Wolfgang Laun wolfgang.laun@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 2 Jul 2017 09:04:54 -0000
Re:  XML schema: require a descendant?
XML Schema 1.1 has XPath evaluation and validation. Your constraint can be
easily expressed as the existence of at least one <sense> with at least one
child element for an <entry>.

-W

On 2 July 2017 at 10:01, Charles Muller acmuller@xxxxxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> I guess this might be a bit off-topic for an XSLT list, but in any case
> it's related to XPath.
>
> In my data (simplified here):
>
> <entry>
>   <sense>
>   <sense>
>   <sense>
> </entry>
>
> I want at least *one* of the <sense> nodes to contain <term>, <persName>,
> or <title>. But it only needs to be in one of them, thus <entry> needs at
> least one descendant from the above three tags.
>
> Is there a way of writing this into a DTD or schema?
>
> Chuck
>
>
> ---------------------------
> A. Charles Muller
>
> Graduate School of Humanities and Sociology
> Faculty of Letters
> University of Tokyo
> 7-3-1 HongE
, BunkyE
-ku
> Tokyo 113-8654, Japan
>
> Office Phone: 03-5841-3735
>
> Web Site: Resources for East Asian Language and Thought
> http://www.acmuller.net
>
> Twitter: @H_Buddhism

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.