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

Re: Repesention of table in an XML-DTD

  • From: ricko <ricko@a...>
  • To: Amit Rekhi <amitr@a...>
  • Date: Wed, 30 Sep 1998 13:05:24 +0800

table xml


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@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.