|
[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
At 05:02 AM 3/15/99 +0800, James Tauber wrote:
>In data-oriented markup, you often want to ask questions about (or style on
>the basis of) both entities (in the non-SGML/XML sense) and relationships.
>So it often makes sense to markup both. In your actor role example, you
>could have (where I'm calling the mapping of actor to character a role):
>
><Role>
> <Actor>
> <Name>Candace Hilligoss</Name>
> </Actor>
> <Character>
> <Name>Mary Henry</Name>
> </Character>
></Role>
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) >
So the above example would be represented:
<cast>
<leadcast>
<female>
<castmember>Candace Hilligoss</castmember>
<role>Mary Henry</role>
</female>
</leadcast>
</cast>
At first glance -- well, in fact :) -- much harder to mark up by hand. But
as you point out, this seeming anal-retentiveness can pay much higher
dividends when it comes time actually to *do* something with the data.
"Show me all female leads; show me all female roles; show me all roles" and
so on.
==========================================================
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








