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

RE: Using attributes and elements and text

Subject: RE: Using attributes and elements and text
From: JBryant@xxxxxxxxx
Date: Thu, 24 Feb 2005 12:32:13 -0600
book titles reusing
I found this comment (from Michael Sperberg-McQueen's 1992 entry) to be 
the most cogent: "it wasn't such a fateful decision after all, but one you 
could back out of later if you really needed to."

Given that we can write stylesheets to turn <book 
title="something">...</book> into <book><title>something</title>...</book> 
and back again, it's not that big a deal to me.

That said, I have my rules of thumb, as I'm sure we all do. Mine go like 
this:

* If it can't be repeated, is just text, and is fairly short, make it an 
attribute. Thus, I tend to make title into an attribute.

* If it can be repeated, has its own structure (such as a title that has a 
subtitle), or is more than a few words, make it an element.

FWIW

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)





"Michael Kay" <mike@xxxxxxxxxxxx> 
02/24/2005 11:45 AM
Please respond to
xsl-list@xxxxxxxxxxxxxxxxxxxxxx


To
<xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
cc

Subject
RE:  Using attributes and elements and text






> 
> I have never see a conclusive definition on when using attributes
> instead of elements 

The usual reference is

http://xml.coverpages.org/elementsAndAttrs.htm

Michael Kay
http://www.saxonica.com/

Current Thread

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
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.