Re: Standards checkers for XSLT
My apologies for replying off-list; apparently I need to update my subscription since our email has been "upgraded" (and names changed), since my post to the list was kicked back. But here's my two cents worth on the naming concept:
It depends on the situation. If order and structure are important, using
attributes over elements (yet another permathread) is less than optimal.
I'm dealing with a situation right now where organization is "implied"
by attribute values, and they rely on editorial policy and eyeball QC to
make it work.
It's not working. The error rate (organization/nesting) is very high. I'm catching the errors by converting all the attribute values to elements and validating against a more structured schema. In other words, they cannot adequately parse/QC their own content using attributes, so I'm helping them clean up their data by providing feedback from my conversion process. (note: The conversion is for a specific project, not just for fixing their data problems; that's a side effect).
Frankly, in most (*but not all*) situations I've run across, using attributes to define content this way scares me. You can't define "grouping" this way, except in the most general sense, because attributes cannot enforce element order.
My reply: I assume that QC means "quality control".
So what you are saying is that this is better: <Manufacturers> <Manufacturer>Toyota</Manufacturer> <Manufacterer>Ford</Manufacturer> </Manufacturers>
This also brings up the question when one uses attributes. Is it OK to use attributes for key values?
Kamal Bhatt wrote:
Joe Fawcett wrote:Point taken. My point was more about the grouping of elements rather than naming, but you are right.From: Kamal Bhatt <kbhatt@xxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Standards checkers for XSLT Date: Mon, 27 Nov 2006 08:44:24 +1100
-- Kamal Bhatt
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format