473,320 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

lists in attributes

Can lists be used in attributes? For example, suppose I have an
element like this:

<x tol="-2.0 2.0">

where I am specifying a lower and an upper tolerance on x. Or, for
another example,

<poly coeff="-3.23 4.11 8.32"

where I am giving the coefficients of a polynomial. Are these legal?
Are they a good idea? Thanks.
Jul 20 '05 #1
4 1402
On 12/02/2004, around 09:10, Russ wrote:
R>Are these legal?
Yes.

R> Are they a good idea?
No.

R> Thanks.
You're welcome. 8-)

Seriously, I would do something like

<x>
<lowerTol>-2.0</lowerTol>
<upperTol>-2.0</upperTol>
</x>

and

<poly>
<coeff>-3.23</coeff>
<coeff>4.11</coeff>
<coeff>8.32</coeff>
</poly>

--
Stuart
See headers for PGP Key.
Local Area Network in Australia: the LAN down under.

Jul 20 '05 #2
DFN-CIS NetNews Service <sh******@estatecomputers.com> wrote in message news:<13***********************@estatecomputers.co m>...
On 12/02/2004, around 09:10, Russ wrote:
R>Are these legal?
Yes.

R> Are they a good idea?
No.
Why not?
R> Thanks.
You're welcome. 8-)

Seriously, I would do something like

<x>
<lowerTol>-2.0</lowerTol>
<upperTol>-2.0</upperTol>
</x>

and

<poly>
<coeff>-3.23</coeff>
<coeff>4.11</coeff>
<coeff>8.32</coeff>
</poly>


To my untrained eye, these appear more cluttered to me, without adding
any additional information.
Jul 20 '05 #3
In article <be**************************@posting.google.com >,
Russ <18********@sneakemail.com> wrote:
% DFN-CIS NetNews Service <sh******@estatecomputers.com> wrote in message
% news:<13***********************@estatecomputers.co m>...
% > On 12/02/2004, around 09:10, Russ wrote:
% > R>Are these legal?
% > Yes.
% >
% > R> Are they a good idea?
% > No.
%
% Why not?

The argument usually goes that you should use XML to mark each
individual component of your data, since then your XML parser can give
you each individual component, and you then don't have to parse out the
values you want from your attribute list.

% To my untrained eye, these appear more cluttered to me, without adding
% any additional information.

The argument here goes that it doesn't matter because you would never
look at the XML without some XML-specific tool. It says so right on the
first page of the standard, although not in so many words.

You may balance this against the fact that DTDs and XML Schemas provide
a type (NMTOKENS) which is essentially intended for a white-space
delimited list of numbers, and that XML Schemas goes on to provide
mechanisms for defining your own lists of white-space delimited things,
all of which suggests that somebody who's thought about it a lot thinks
that your approach isn't so bad after all. And your approach surely is
more readable for some purposes.
--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #4
pt**@interlog.com (Patrick TJ McPhee) wrote in
news:c0**********@news.eusc.inter.net:
The argument here goes that it doesn't matter because you would
never look at the XML without some XML-specific tool. It says so
right on the first page of the standard, although not in so many
words.


Okay, I'll bite--where are the words that imply that?

Design goal #6 supports the opposite supposition.

--
a. m. slotnik
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alan Little | last post by:
I need to merge and de-duplicate some lists, and I have some code which works but doesn't seem particularly elegant. I was wondering if somebody could point me at a cleaner way to do it. Here's...
2
by: Stewart Midwinter | last post by:
I would like to link the contents of three OptionMenu lists. When I select an item from the first list (call it continents), the contents of the 2nd list (call it countries) would update. And in...
29
by: Joseph Haig | last post by:
I am trying to use descriptive lists, <DL>, as shown in <http://www.maths.man.ac.uk/~jhaig/tmp/test.html> with a style sheet at <http://www.maths.man.ac.uk/~jhaig/tmp/default-2.css>. With Mozilla...
9
by: Dave H | last post by:
Hello, I have a query regarding definition lists. Is it good practice semantically to use the dt and dd elements to mark up questions and answers in a frequently asked questions list, or FAQ? ...
5
by: Jan Danielsson | last post by:
Hello all, I have written a simple whiteboard application. In my application, I want to be able to set draw attributes. This part works. I have a dictionary object which contains stuff like:...
3
by: Andy Dingley | last post by:
We've all seen this structure many times: <ul> <li><a href="..." >Click here</a></li> <li><a href="..." >Click here</a></li> </ul> Now it's obvious good practice to have sensible link texts,...
12
by: BBands | last post by:
I have a list with some strings in in it, 'one', 'two' 'three' and so on. I would like to add lists to a class with those names. I have no way of knowing what will be in the list or how long the...
5
by: Mizipzor | last post by:
Consider the following snippet of code: ========================== class Stats: def __init__(self, speed, maxHp, armor, strength, attackSpeed, imagePath): self.speed = speed self.maxHp =...
9
by: Paulo da Silva | last post by:
Hi! What is the best way to have something like the bisect_left method on a list of lists being the comparision based on an specified arbitrary i_th element of each list element? Is there,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.