niemopen / ntac-admin

The NTAC is a NIEMOpen Technical Steering Committee, responsible for the NIEM technical architecture. This repo contains its meeting minutes and discussion papers.
Other
3 stars 4 forks source link

Minimize attributes #24

Closed cdmgtri closed 1 year ago

cdmgtri commented 1 year ago

Migrated from NIEM/NTAC#56

Change all the attributes containing semantic data into elements, leaving just the infrastructure support stuff.

Christina: Some attributes, like text string stuff would require text elements to have a inner element.

Dr. Scott: Choices

cdmgtri commented 1 year ago

I think it's going to be important to consider who this will affect.

NIEM XML is our biggest user base by far. This would not be popular:

<my:Message>
  <nc:PersonGivenName>
    <nc:PersonGivenNameLiteral>John</nc:PersonGivenNameLiteral>
    <xml:lang>en-US</xml:lang>
  </nc:PersonGivenName>
  <nc:PersonSurName>
    <nc:PersonSurNameLiteral>Smith</nc:PersonSurNameLiteral>
    <xml:lang>en-US</xml:lang>
  </nc:PersonSurName>
</my:Message>

when the following is easily available:

<my:Message>
  <nc:PersonGivenName xml:lang="en-US">John</nc:PersonGivenName>
  <nc:PersonSurName xml:lang="en-US">Smith</nc:PersonSurName>
</my:Message>

Currently, NIEM JSON has a much smaller user base, and representing NIEM attributes as a new rdf:value or a named literal property only when needed seems to be a good compromise.

There are even fewer users right now for NIEM RDF. I'd be very reluctant to make a big breaking change in NIEM 6 for XML in order to make the RDF cleaner.

Also, RDF-star and JSON-LD-star indicate that others have found it useful for being about to make statements about statements (annotate objects and literals) in a consistent manner.

iamdrscott commented 1 year ago

We can't take the attributes out of NIEM XML messages. That was a crazy-Dr-Scott idea from a while back. I'd still like to gently discourage semantic attributes, but if folks want them, they get them. I suggest we close this issue.

Things like nc:PersonGivenNameLiteral do show up in CMF. I think we need them in NIEM RDF, probably in NIEM JSON.

BTW, the xml:lang attribute needs special handling. Take a look at the last section in CMF and RDF representation in NIEM 6.

cdmgtri commented 1 year ago

BTW, the xml:lang attribute needs special handling. Take a look at the last section in CMF and RDF representation in NIEM 6.

Updated link.