Re: [Zope-dev] stacks != easy to explain

2002-05-16 Thread Don Hopkins

From: Steve Alexander [EMAIL PROTECTED]
Subject: Re: [Zope-dev] stacks != easy to explain


  If you're using ordered attributes, then you're not using XML.

 Indeed, and if your indentation is meaningful in your C source-code,
 you're not using C.

 However, that doesn't negate the benefit of a consistent coding style.

Indentation style and the definition of XML are two different things.
The XML spec clearly states that attributes are defined as unordered.
So any XML editors or tool might rightfully reorder those attributes, thus
mangling the meaning of any so-called XML code that depends on attribute
order.
Any so-called XML tool that depends on the order of attributes incorrect,
and has a fundamental design flaw because it deviates from the agreed-upon
standard.
Just as any so-called C compiler that depends on indentation style is
incorrect.

-Don

Reference:

http://www.w3.org/TR/xml-infoset/

XML Information Set
W3C Recommendation 24 October 2001
2. Information Items
2.2. Element Information Items
An element information item has the following properties:
  5. [attributes] An unordered set of attribute information items, one for
each of the attributes (specified or defaulted from the DTD) of this
element. Namespace declarations do not appear in this set. If the element
has no attributes, this set has no members.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] stacks != easy to explain

2002-05-16 Thread Chris Withers

Don Hopkins wrote:
 
 Indentation style and the definition of XML are two different things.
 The XML spec clearly states that attributes are defined as unordered.
 So any XML editors or tool might rightfully reorder those attributes, thus
 mangling the meaning of any so-called XML code that depends on attribute
 order.
 Any so-called XML tool that depends on the order of attributes incorrect,
 and has a fundamental design flaw because it deviates from the agreed-upon
 standard.
 Just as any so-called C compiler that depends on indentation style is
 incorrect.

...which is precisely why the order of attributes in ZPT source code doesn't matter and
why the order of execution of attributes is rigidly defined by ZPT, rather than being 
that
of their order in the source.

Anyone got a spare Dime Bar?

Chris

 Reference:

...no one cares.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] stacks != easy to explain

2002-05-16 Thread Eron Lloyd

I believe what is trying to be explained is that ZPT provides a certain
sequence for attribute *processing*, which begins *after* the template
is parsed (like unordered keyword arguments in Python). How they are
ordered in the source file is irrelevant, but by ordering them in the
precise way they will be processed is recommended to aid in the
understanding of what will happen.

If you do see a concrete example of how and where this occurs that
coincides with a breach from the XML spec, please post this to the list
for us to see, so that the proper avenues of discussion, hacking, and
problem resolution can be made. ZPT is nowhere near complete, and will
surely tighten up with time.

Regards,

Eron

On Thu, 2002-05-16 at 10:32, Don Hopkins wrote:
 From: Steve Alexander [EMAIL PROTECTED]
 Subject: Re: [Zope-dev] stacks != easy to explain
 
 
   If you're using ordered attributes, then you're not using XML.
 
  Indeed, and if your indentation is meaningful in your C source-code,
  you're not using C.
 
  However, that doesn't negate the benefit of a consistent coding style.
 
 Indentation style and the definition of XML are two different things.
 The XML spec clearly states that attributes are defined as unordered.
 So any XML editors or tool might rightfully reorder those attributes, thus
 mangling the meaning of any so-called XML code that depends on attribute
 order.
 Any so-called XML tool that depends on the order of attributes incorrect,
 and has a fundamental design flaw because it deviates from the agreed-upon
 standard.
 Just as any so-called C compiler that depends on indentation style is
 incorrect.
 
 -Don
 
 Reference:
 
 http://www.w3.org/TR/xml-infoset/
 
 XML Information Set
 W3C Recommendation 24 October 2001
 2. Information Items
 2.2. Element Information Items
 An element information item has the following properties:
   5. [attributes] An unordered set of attribute information items, one for
 each of the attributes (specified or defaulted from the DTD) of this
 element. Namespace declarations do not appear in this set. If the element
 has no attributes, this set has no members.
 
 
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 ---
 [This E-mail scanned for viruses by Declude Virus]
 
 


---
[This E-mail scanned for viruses by Declude Virus]



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] stacks != easy to explain

2002-05-16 Thread Nicola Larosa

[Lots of Cc: deleted]


My turn...


 So any XML editors or tool might rightfully reorder those attributes, thus
 mangling the meaning of any so-called XML code that depends on attribute
 order.

The so-called XML code does *not* depend on attribute order.


 Any so-called XML tool that depends on the order of attributes incorrect,
 and has a fundamental design flaw because it deviates from the agreed-upon
 standard.

The so-called XML code does *not* depend on attribute order.

The so-called XML code evaluates attributes in a prespecified order, 
whatever the attribute order in the so-called XML code itself.


 Just as any so-called C compiler that depends on indentation style is
 incorrect.

That's why it's so-called Python. ;^)


-- 
Two witches watch two watches. Which witch watched which watch?

Nicola Larosa - [EMAIL PROTECTED]



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] stacks != easy to explain

2002-05-15 Thread Adrian Hungate

Whereas XML attributes, order indeterminisim, slots, METAL and templates
are?

Adrian...

- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: Marc Lindahl [EMAIL PROTECTED]
Cc: zope-dev [EMAIL PROTECTED]
Sent: Monday, May 13, 2002 8:15 PM
Subject: [Zope-dev] stacks != easy to explain


 Marc Lindahl wrote:
 
  Still I think the concept of TAL having some kind of 'stack' for
condition
  results makes sense and is worth exploring...  Could yield better
logical
  constructs, and things like case statements.

 Sorry, but I don't see a 'stack' of any sort being easy to explain to a
newbie
 or not programmer.

 cheers,

 Chris


 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] stacks != easy to explain

2002-05-15 Thread Chris Withers

Adrian Hungate wrote:
 
 Whereas XML attributes, order indeterminisim, 

...Solved by making it absolutely clear what order stuff executes in. If I was training
people, I'd tell them to write it in that order too...

 slots, METAL and templates
 are?

This is all METAL. METAL is not as simple or robust as it could be, but you don't have 
to
use it ;-)

Still, once explained, most people seem to get it pretty quickly...

cheers,

Chris


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] stacks != easy to explain

2002-05-15 Thread Don Hopkins

From: Chris Withers [EMAIL PROTECTED]
To: Adrian Hungate [EMAIL PROTECTED]
Cc: Marc Lindahl [EMAIL PROTECTED]; zope-dev [EMAIL PROTECTED]
Sent: Wednesday, May 15, 2002 1:32 AM
Subject: Re: [Zope-dev] stacks != easy to explain


 Adrian Hungate wrote:
 
  Whereas XML attributes, order indeterminisim,

 ...Solved by making it absolutely clear what order stuff executes in. If I
was training
 people, I'd tell them to write it in that order too...

You can't make the order of XML attribute execution clear, because they are
defined as unordered.

If you're using ordered attributes, then you're not using XML.

-Don




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] stacks != easy to explain

2002-05-15 Thread Chris Withers

whatever...

Don Hopkins wrote:
 
 From: Chris Withers [EMAIL PROTECTED]
 To: Adrian Hungate [EMAIL PROTECTED]
 Cc: Marc Lindahl [EMAIL PROTECTED]; zope-dev [EMAIL PROTECTED]
 Sent: Wednesday, May 15, 2002 1:32 AM
 Subject: Re: [Zope-dev] stacks != easy to explain
 
  Adrian Hungate wrote:
  
   Whereas XML attributes, order indeterminisim,
 
  ...Solved by making it absolutely clear what order stuff executes in. If I
 was training
  people, I'd tell them to write it in that order too...
 
 You can't make the order of XML attribute execution clear, because they are
 defined as unordered.
 
 If you're using ordered attributes, then you're not using XML.
 
 -Don


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] stacks != easy to explain

2002-05-15 Thread Steve Alexander


Adrian Hungate wrote:

Whereas XML attributes, order indeterminisim,


Chris Withers wrote:
 
...Solved by making it absolutely clear what order stuff executes in. If I
 was training people, I'd tell them to write it in that order too...

Don Hopkins wrote:
 You can't make the order of XML attribute execution clear, because they are
 defined as unordered.
 
 If you're using ordered attributes, then you're not using XML.

Indeed, and if your indentation is meaningful in your C source-code, 
you're not using C.

However, that doesn't negate the benefit of a consistent coding style.

--
Steve Alexander




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] stacks != easy to explain

2002-05-15 Thread Florent Guillaume

Don Hopkins [EMAIL PROTECTED] wrote:
 Chris Withers [EMAIL PROTECTED] wrote:
  ...Solved by making it absolutely clear what order stuff executes in.
  If I was training
  people, I'd tell them to write it in that order too...
 
 You can't make the order of XML attribute execution clear, because they are
 defined as unordered.
 
 If you're using ordered attributes, then you're not using XML.

What Chris means (and it's specified in the TAL documentation) is that
for instance define attributes are executed before repeat
attributes.

Of course we all know that XML attributes can be reorganized by any
parser or whatever. This is not what is meant here.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:[EMAIL PROTECTED]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )