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

Re: XSL-optimized DTDs (Was: Re: Mixed content: selecting cu

Subject: Re: XSL-optimized DTDs (Was: Re: Mixed content: selecting current context w/out child)
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Sun, 14 Mar 1999 19:41:01 -0500
animal genders
At 09:43 AM 3/15/99 +1100, Marcus Carr wrote:
>John E. Simpson wrote:
>
>> Yah. In FlixML ver. 3.0 (not yet available on-line), I've done pretty much
>> just that (ATTLISTs omitted for brevity):
>>   <!ELEMENT cast        (leadcast, othercast?) >
>>   <!ELEMENT leadcast    ((male | female | animal)*) >
>>   <!ELEMENT othercast   ((male | female | animal)*) >
>>   <!ELEMENT male        (castmember, role)* >
>>   <!ELEMENT female      (castmember, role)* >
>>   <!ELEMENT animal      (castmember, role, species)* >
>>   <!ELEMENT castmember  (#PCDATA) >
>>   <!ELEMENT role        (#PCDATA) >
>>   <!ELEMENT species     (#PCDATA) >
>
>Just out of interest, what do you do if a castmember has multiple roles
and/or
>crosses gender and/or is genderless? 

Well, I thought about some of that. One possibility (e.g. Alec Guiness in
"Kind Hearts and Coronets") would be just as you said -- one castmember
playing multiple roles. So subordinating <role> to <castmember>, rather
than making them siblings, would be a more fully normalized solution. As it
is now, yeah, the castmember would have to be repeated for each of the roles:
	<castmember>Alec Guiness</castmember><role>Ascoyne d'Ascoyne</role>
	<castmember>Alec Guiness</castmember><role>Henry d'Ascoyne</role>
	<castmember>Alec Guiness</castmember><role>Canon d'Ascoyne</role>
				(etc.)

The crossing-gender and genderless (like, hmm, robots? the title characters
in "Gremlins"?) problems hadn't occurred to me, although I did recognize
that there's no provision for animal genders.... But as I mention at one
point in the building-a-FlixML-document tutorial (at
http://www.flixml.org/flixml_build.html), "Yeah, all right, I could have
broken the animal element up into male and female as well. I had to draw
the line somewhere -- I was just trying to teach XML, not cover the
fraction of a percent of movies with animal cast members of both genders!" :)

>It would seem that the following would be
>legal:
>
><othercast>
>   <male>Bill Bob</male>
>   <male>Phil Bob</male>
>   <male>Tim Bob</male>
></othercast>
>
><othercast>
>   <male>Rob Bob</male>
></othercast>
>
><othercast>
></othercast>

Maybe I'm misreading something (always a possibility), but I think the
first and second example would be illegal because <male> doesn't have
PCDATA content. You're right about the third, though, and I need to plug
that gap (also the possibility that <male>, <female>, and <animal> can be
legally empty). Thanks for the catch.

I love finding out about these kinds of bugs in the DTD (and there are
others, known as well as yet unknown). OTOH I'm reluctant to make it *too*
rigorous; it is, after all, basically just a demonstrator rather than a
"real" application, and to the extent that it incorporates a variety of
structures -- even "slack" ones -- I'll be able to use it to demonstrate a
corresponding variety of circumstances. And on yet another hand, I don't
want to be embarrassed about it. :)

Thanks again, Marcus!

John


==========================================================
John E. Simpson            | The secret of eternal youth
simpson@xxxxxxxxxxx        | is arrested development.
http://www.flixml.org      |  -- Alice Roosevelt Longworth


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.