At 2009-01-26 13:01 +0000, nico_debeissat wrote: >It is always a problem : you have to trim the text, test if it is >empty, it is a lot verbose... I think that when you expect a value in >a XML file, it should always be inside an attribute. >If that is a text content of a web page, an article, I understand >that, but for the rest, I think the main problem of XML specifications >in general is that they use too many text nodes. >For tomcat configuration of users, it is better done : > ><user name="admin" password="pwd" roles="admin"/> > >Some of the XML expert people should publish a guide of good habits in >order to specify XML, I did not find any when I was trying to make >schemas.
Did you see: http://xml.coverpages.org/elementsAndAttrs.html >What do you think about that ? Personally, I coerce my content models to ensure that users put prose (human-oriented content) in text nodes and strings (machine-oriented content) in attributes. Not least because I can perform spell-check on my text nodes and skip all characters in markup as not being spell-checked. This rule of thumb has served me well since the SGML days. There was a time when some prose text characters required markup (though I haven't seen this lately), and markup is allowed in element content but not attribute content. I hope this helps. . . . . . . . . . . . Ken -- Upcoming XSLT/XSL-FO, UBL and code list hands-on training classes: : Sydney, AU 2009-01/02; Brussels, BE 2009-03; Prague, CZ 2009-03 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:[email protected] Crane Softwrights Ltd. http://www.CraneSoftwrights.com/r/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/r/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
