[
Lists Home |
Date Index |
Thread Index
]
- From: ricko <ricko@allette.com.au>
- To: Amit Rekhi <amitr@abinfosys.com>
- Date: Wed, 30 Sep 1998 13:05:24 +0800
Amit Rekhi ¼g¹D¡G
> (Sorry, for having reposted this ques but the first version was displayed
> incomplete on the XML - DEV list.)
>
> Hello,
> I was wondering what would be the best way to be repesenting a
> large table (with 500+ entries) in an external subset of an XML file's DTD
> and selecting a row of the table in the XML file's internal DTD subset.
Here's some thoughts.
You can use any XML table syntax which has rows containing cells
and use XLL. If you have given all the rows IDs, then you can use
something like
www.you.com/code-table.xml#ID(row1)
Check the XLL draft.
Check the Xptr draft for how to use it in an element. Your email
was truncated again, but if you wanted an element for each row,
you could go something like this (ruching this off-attribute names
probably wrong--better than nothing)
<!ELEMENT row1 EMPTY>
<!ATTLIST row1
href CDATA #FIXED "http://www.you.com/code-table.xml#ID(row1)"
behaviour CDATA #FIXED "embed"
action CDATA #FIXED "auto"
...>
You then just use
<row1/>
<row2/>
and so on. You need to have an XLL linker available.
The same thing can be achieved having in the DTD:
<!ENTITY row1 "http://www.you.com/code-table.xml#ID(row1)" >
and then putting in the instance:
&row1;
of course. But again, your parser has to understand XLL.
You can use HTML tables and WIDL to specify a row. I think it looks like
table[1].row[1]
to select the first row from the first table. You would need to specify WIDL
notation was being used and have a WIDL processor available.
The king of location and embedding syntaxes is called HyTime. It lets
you specify an incredible range of things, and brings in a lot of convention
to allow you to use external query syntaxes. It is influencing XLL a lot,
but XLL is definitely more targetted for smaller WWW applications.
Your external table does not need to be in XML. A table of comma seperated
pairs could be specified using a notation:
<!NOTATION cs-pair PUBLIC
"+//IDN ABSYSINFO.COM//NOTATION
Comma Separated Pair//EN"
"text/x-csp">
<!ENTITY code-table "http://www.you.com/code-table.txt#ID(row1)"
NDATA csv>
Again, note that that case, you have to have a special parser which
reads the comma sepearted pairs into an DOM, labels the columns
and rows, and attaches appropriate positional attributes. This could
presumably be done by merely having a little utility to convert it
to XML at the client! But why not just use XML in the first place?
Rick Jelliffe
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|