Click here to Skip to main content
14,573,882 members
   

XML / XSL

 
QuestionShould I ask for better XML? Pin
chriselst18-Jul-11 0:02
Memberchriselst18-Jul-11 0:02 
AnswerRe: Should I ask for better XML? Pin
dasblinkenlight18-Jul-11 3:10
Memberdasblinkenlight18-Jul-11 3:10 
GeneralRe: Should I ask for better XML? Pin
chriselst18-Jul-11 3:23
Memberchriselst18-Jul-11 3:23 
GeneralRe: Should I ask for better XML? Pin
dasblinkenlight18-Jul-11 3:38
Memberdasblinkenlight18-Jul-11 3:38 
GeneralRe: Should I ask for better XML? Pin
jschell25-Jul-11 10:58
Memberjschell25-Jul-11 10:58 
GeneralRe: Should I ask for better XML? Pin
dasblinkenlight25-Jul-11 19:08
Memberdasblinkenlight25-Jul-11 19:08 
GeneralRe: Should I ask for better XML? Pin
jschell26-Jul-11 9:38
Memberjschell26-Jul-11 9:38 
GeneralRe: Should I ask for better XML? Pin
dasblinkenlight26-Jul-11 10:37
Memberdasblinkenlight26-Jul-11 10:37 
Notice as well that the text itself is a element value.

A text that does not represent a value of an enumeration should always be in an element, because of the mandatory attribute normalization in XML.

So exactly how would you structure the data of the OP such that an element value has attributes which are properties?

Like this:
Personally, I would prefer the markup below as more consistent, but the one above is perfectly OK.

<pre lang="xml">
<meter ref="00895289">
    <reading date="14/12/10" value="2"/>
    <reading date="28/09/10" value="0"/>
    <reading date="23/08/10" value="0"/>
    <reading date="02/03/10" value="9"/>
</meter>
<meter ref="00895298">
    <reading date="02/12/10" value="275"/>
    <reading date="22/09/10" value="274"/>
    <reading date="02/06/10" value="274"/>
    <reading date="02/03/10" value="274"/>
</meter>


in my experience attributes also suffer from a lack of easy display and no way to comment values (xml comments.)

I tend to disregard display concerns, as XML is not specifically a presentation-oriented language. As far as inability to comment attributes goes, I think that humans should not be exposed to reading and writing XML so much as to need comments. There was an excellent post on the subject[^] ten years ago, which I think is even more applicable today.
GeneralRe: Should I ask for better XML? Pin
jschell27-Jul-11 12:04
Memberjschell27-Jul-11 12:04 
AnswerRe: Should I ask for better XML? Pin
jschell25-Jul-11 11:00
Memberjschell25-Jul-11 11:00 
QuestionCan anybody tell me whats wrong with this xslt Pin
Haim Nachum26-Jun-11 13:00
MemberHaim Nachum26-Jun-11 13:00 
AnswerRe: Can anybody tell me whats wrong with this xslt Pin
Nagaraj Muthuchamy26-Jun-11 23:33
professionalNagaraj Muthuchamy26-Jun-11 23:33 
QuestionLoop over chars in a string Pin
KenBonny1-Jun-11 1:58
MemberKenBonny1-Jun-11 1:58 
AnswerRe: Loop over chars in a string [modified] Pin
George L. Jackson7-Jun-11 10:27
MemberGeorge L. Jackson7-Jun-11 10:27 
QuestionGetting XML content Pin
stevenykl31-May-11 19:43
Memberstevenykl31-May-11 19:43 
AnswerRe: Getting XML content Pin
Erik Molenaar31-May-11 22:30
MemberErik Molenaar31-May-11 22:30 
GeneralRe: Getting XML content Pin
stevenykl1-Jun-11 0:21
Memberstevenykl1-Jun-11 0:21 
QuestionHelp to write Xquery Pin
Neno9930-Apr-11 3:37
MemberNeno9930-Apr-11 3:37 
AnswerRe: Help to write Xquery Pin
jschell30-Apr-11 12:57
Memberjschell30-Apr-11 12:57 
GeneralRe: Help to write Xquery Pin
Neno993-May-11 16:07
MemberNeno993-May-11 16:07 
GeneralRe: Help to write Xquery Pin
Richard MacCutchan3-May-11 21:58
mveRichard MacCutchan3-May-11 21:58 
GeneralRe: Help to write Xquery Pin
jschell4-May-11 8:47
Memberjschell4-May-11 8:47 
QuestionHow to bind the data into a class object from a list. Pin
Rocky2329-Apr-11 0:57
MemberRocky2329-Apr-11 0:57 
AnswerRe: How to bind the data into a class object from a list. Pin
jschell29-Apr-11 9:47
Memberjschell29-Apr-11 9:47 
QuestionXML Search Pin
DJ24526-Apr-11 20:49
MemberDJ24526-Apr-11 20:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.