Repesention of table in an XML-DTD
ricko at allette.com.au
Wed Sep 30 06:58:43 BST 1998
Amit Rekhi ¼g¹D¡G
> (Sorry, for having reposted this ques but the first version was displayed
> incomplete on the XML - DEV list.)
> 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
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>
href CDATA #FIXED "http://www.you.com/code-table.xml#ID(row1)"
behaviour CDATA #FIXED "embed"
action CDATA #FIXED "auto"
You then just use
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:
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
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
Comma Separated Pair//EN"
<!ENTITY code-table "http://www.you.com/code-table.txt#ID(row1)"
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?
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev