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

Re: use of xsl:key in cross-referencing

Subject: Re: use of xsl:key in cross-referencing
From: Xiaocun Xu <xiaocunxu@xxxxxxxxx>
Date: Wed, 19 Mar 2003 16:45:34 -0800 (PST)
excel cross referencing
Hi, Peter:

Thanks for the suggestion of using ID/IDREF. 
Unfortunely the source XML is generated via a generic
reader/writer that reads each cell from a Excel
spradsheet and writes to this XML, it does not have
any business logic (which is one of the design goal)
and therefore can not implement ID/IDREF easily.

Xiaocun

> Yes, XML has a built-in cross-reference mechanism
> which uses special 
> attribute types called ID and IDREF. If you modify
> your DTD:
> 
> <!ELEMENT cell (#PCDATA)>
> <!ATTLIST cell column CDATA #REQUIRED
>                 questionnaire ID #IMPLIED
>                 question IDREF #IMPLIED>
> 
> Now you can say:
> 
> <row row="16">
> 	<cell column="1">References Name</cell>
> 	<cell column="2"
> questionnaire="ABC123">References</cell>
> 	<cell column="3">References Description</cell>
> </row>
> ...<rows in between skipped for brevity>...
> <row row="28">
> 	<cell column="1"
> question="ABC123">References</cell>
> 	<cell column="2">text of Question 8<cell>
> </row>
> <row row="29">
> 	<cell column="1"
> question="ABC123">References</cell>
> 	<cell column="2">text of Question 9</cell>
> </row>
> 
> The ID/IDREF mechanism is one-to-many, so if I have
> understood you
> right, this is what you want. The advantage is that
> ID/IDREF checking
> is built into validating parsers, so a validation
> will immediately
> pick up on any IDREF attribute trying to reference a
> non-existent ID
> value (but it's OK to have an ID value which never
> gets referenced).
> The only restriction is that ID/IDREF values must be
> Names (they must
> begin with a letter and may not contain spaces).
> 
> ///Peter
> 
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

 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.