Lists Home |
Date Index |
Simon St.Laurent wrote:
> Just flicked through this nice article on XML.com about XQuery:
> And I kept wondering, as cool as this might be, isn't this exactly
> what people consider harmful or bad practice about PHP/ASP? I mean
> the mixing of logical code (conditions, loops and comparisons)
> and markup.
> By separating display and logic you make sites more flexible and easy
> to rebrand should the necessity occur. This way of inline coding in
> the document might be handy, but I consider it rather harmful when it
> comes to coding style.
I wholehearedly agree, though I think there is a difference in there.
One thing that I find unfortunate is that the examples use XHTML to show
how one would get a page from an XQuery. It seems unlikely to me that
one will want to use that approach in real world, probably preferring to
first produce some form of XML document that expresses the semantic
structure of the document, and then transform it to whatever target
format using XSLT.
Of course, that may be me being optimistic...
Robin Berjon <email@example.com>
Research Engineer, Expway
7FC0 6F5F D864 EFB8 08CE 8E74 58E6 D5DB 4889 2488