• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what is the proper term for attributes inside the <XML> tag

 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suppose I have some XML that looks like


This is well formed, and trivial to process.

Now, supposed that there is extra stuff in the initial tag "inventor" something like





What is the proper term to describe the data fields: sequence="001" app-type="applicant-inventor" designation="us-only"
 
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[0] I am not sure what are the, possibly subtle, concerns to trigger the question.

"what is the proper term for attributes (a list of individual attribute) inside the <XML> tag"


They are called attributes, would they not?

[1] In xml recommendation, attributes can appear only within the start-tags or those self-closing empty tag. These are the productions in this regard:

ref http://www.w3.org/TR/REC-xml/#NT-AttlistDecl

[40] STag ::= '<' Name (S Attribute)* S? '>' [WFC: Unique Att Spec]
[41] Attribute ::= Name Eq AttValue [VC: Attribute Value Type] [WFC: No External Entity References] [WFC: No < in Attribute Values]
[42] ETag ::= '</' Name S? '>'


[1.1] An attribute is characterized by its name and value and value type. They should all the same satisfy some well-defined formation rules. And, for a non-validating xml parser, the value types are considered as CDATA. For any xml parser, before values are passed on to application, they should further be normalized with well-defined rules. Things can be slightly more complicated in detail as the recommendation is conceived to satisfy all sorts of concerns from different interested parties at the time as you certainly know.

[2] There isn't anywhere else in an xml instance document the notion of attribute can appear.
 
Pat Farrell
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

g tsuji wrote: I am not sure what are the concerns to trigger the question.



Its simple, I'm writing code to parse them, and I want to use a real term rather than calling it 'extra junk in the tag'

Code is written to be read by humans, not the compiler
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Attributes is the correct term Pat. See section 3.3 of this cure for insomnia
 
Where does a nanny get ground to air missles? Protect this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic