1
0
-1

Hi All,

Analyzing a Uniface struct, obtained from an xml, I have found this construct:

[theStruct]
   [$tags]
      [nametag] = value_nametag
      [typetag] = value_typetag
      [reference] = value_reference
   [name] = "value_name"
      [$tags on scalar member]
         [namescalartag] = value_namescalartag
      [$tags]
         2ndnametag = "2ndnametag_value"

Being my first time to focus on [$tags on scalar member] I was wondering which could be the correct syntax to refer to them. I've found the obvious:
a) pointing to [$tags on scalar member] collection:
    name->$scalar->$tags
         or
    *{1}->$scalar->$tags
b) to get [$tags on scalar member] collection size:
    name->$scalar→$tags->$collSize
         or
    *{1}->$scalar->$tags->$collSize
c) to point to a specific [$tags on scalar member] name:
    name->$scalar->$tags->namescalartag->$name
         or
    *{1}->$scalar→$tags->*{1}->$name
d) to point to a specific [$tags on scalar member] value:
    name->$scalar->$tags->namescalartag->$scalar
         or
    *{1}->$scalar->$tags->*{1}->$scalar

I am writing this post because I did NOT find any reference to this possible $tags level into current Uniface documentation. But..., as always, I could be wrong! So, please point me to an available docu reference if available.

I suppose also a complete set of examples referring to [$tags on scalar member] could be an help for all Unifacers.

Thanks in advance for any reply. (smile)

Regards,
Gianni

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Ingo,

      Here where I find the situation I've described:


      The field with light blue background is just showing myStruct→$dbgstring.

      References to reach that scalar tag are:
      html->head->script->$scalar->$tags->*{1}->$name is giving back "xmlClass"
      html->head->script->$scalar->$tags->*{1}->$scalar is giving back "CDATA"
      References to reach "standard" tags on the whole member are
      html->head->script->$tags->*{1}->$name is giving back "xmlClass"
      html->head->script->$tags->*{1}->$scalar is giving back "element"
      html->head->script->$tags->*{2}->$name is giving back "xmlNamespaceURI"
      html->head->script->$tags->*{2}->$scalar is giving back "http://www.w3.org/1999/xhtml"

      I did NOT built the struct! It was generated via an xmltostruct instruction.

      IMHO [$tags on scalar member] could be recognized as "attributes" of the scalar part of the member they are referring to.

      Gianni

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Gianni

        A $scalar does not have any inner structur, as "scalar" say (smile)
        But what about
        name->$tags
        The node "name" does have a scalar context and attributes ($tags)

        Ingo

          CommentAdd your comment...