OpenSimulator:Xml Serialization

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Opensimulator Xml Serialization Format 3)
(Draft speculation)
Line 9: Line 9:
 
===Draft speculation===
 
===Draft speculation===
 
* Since almost all fields have three distinct flavours ("SL GUI values", "LSL PrimitiveParams values" and "Protocol values") we should be able to specify values with units. The default unit should be "Protocol values".
 
* Since almost all fields have three distinct flavours ("SL GUI values", "LSL PrimitiveParams values" and "Protocol values") we should be able to specify values with units. The default unit should be "Protocol values".
   Example:
+
What the unit monikers should be is up for anyone to suggest.
   <... taperX="200" ...> means protocol value 200
+
 
   <... taperX="1.0" ...> could mean LSL value 1.0 (which is protocol 200)
+
  Alternative 1:
   <... taperX="100%" ...> could mean SL gui value 1.0, although this is actually not strictly what is displayed (somebody come up with a good idea of how to mark lsl vs ui values)
+
  <Taper><X>200</X></Taper> means protocol value 200
 +
  <Taper><X unit="pp">2.0</X></Taper> means LSL value 2.0
 +
  <Taper><X unit="ui">-1.0</X></Taper> means SL gui value -1.0
 +
 
 +
   Alternative 2:
 +
   <... taperX="200" ...> protocol 200
 +
   <... taperX="2.0pp" ...> LSL 2.0
 +
   <... taperX="-1.0ui" ...> GUI -1.0
 +
 
 +
The former is more verbose ('more XML'), the latter terser ('more HTML'). Please do add your opinion.
  
 
* The fields that are enumerated should be encoded as either element types, attribute strings or attribute numbers. The default should be attribute numbers.
 
* The fields that are enumerated should be encoded as either element types, attribute strings or attribute numbers. The default should be attribute numbers.

Revision as of 12:51, 23 January 2008

Opensimulator Xml Serialization Format 3

Goals

  • Attributes and elements should map 1-to-1 with normalized object structure and hence protocol fields
  • Xml should be as terse as possible whilst generating intuitive results
  • The xml format should weigh human readability against the cost of parsing and re-calculation
  • The format should never introduce unintuitive constructs or cases


Draft speculation

  • Since almost all fields have three distinct flavours ("SL GUI values", "LSL PrimitiveParams values" and "Protocol values") we should be able to specify values with units. The default unit should be "Protocol values".

What the unit monikers should be is up for anyone to suggest.

  Alternative 1:
  <Taper><X>200</X></Taper> means protocol value 200
  <Taper><X unit="pp">2.0</X></Taper> means LSL value 2.0
  <Taper><X unit="ui">-1.0</X></Taper> means SL gui value -1.0
  
  Alternative 2:
  <... taperX="200" ...> protocol 200
  <... taperX="2.0pp" ...> LSL 2.0
  <... taperX="-1.0ui" ...> GUI -1.0

The former is more verbose ('more XML'), the latter terser ('more HTML'). Please do add your opinion.

  • The fields that are enumerated should be encoded as either element types, attribute strings or attribute numbers. The default should be attribute numbers.
  Example:
  <Object ...> means PCode 9 (Primitive)
  <Tree ...> means PCode x (Tree)
  <Avatar ...> means PCode z (Avatar)
  
  Example:
  <... extrusion="straight" ...> means protocol value 0 (PathCurve.Straight)
  <... extrusion="1" ...> means protocol value 1 (PathCurve.xxx)
Personal tools
General
About This Wiki