Loading ...
Sorry, an error occurred while loading the content.

RE: [soapbuilders] Use of xml:lang attribute in SOAP messages

Expand Messages
  • Michael Brennan
    Interesting suggestion. I ll explore that. Thanks! ... From: Jacek Kopecky [mailto:jacek@idoox.com] Sent: Wednesday, July 18, 2001 3:05 PM To:
    Message 1 of 7 , Jul 18, 2001
    • 0 Attachment
      Interesting suggestion. I'll explore that. Thanks!
      -----Original Message-----
      From: Jacek Kopecky [mailto:jacek@...]
      Sent: Wednesday, July 18, 2001 3:05 PM
      To: 'soapbuilders@yahoogroups.com'
      Subject: RE: [soapbuilders] Use of xml:lang attribute in SOAP messages

      Michael,
      just a quick suggestion - instead of

      <title_container>
        <en>The Lord of the Rings</en>
        <cz>Pan Prstenu</cz>
      </title_container>

      you can model it as a map (maps seem to be supported quite well)

      <title_container>
        <item><key>en</key><value>The Lord of the Rings</value></item>
        <item><key>cz</key><value>Pan Prstenu</value></item>
      </title_container>

      This is not as terse but it might be easier on the developers of
      the applications. This is because the set of languages is not
      set, it is dynamic instead, if only because you have chinese
      translations to some but not all of the titles (an example). It
      would seem to be an overkill to define structures like

      <element name="title_container">
        ... schema stuff here so that it works ...
          <element name="en" nillable="true" type="string"/>
          <element name="cz" nillable="true" type="string"/>
          <element name="sk" nillable="true" type="string"/>
          <element name="de" nillable="true" type="string"/>
          <element name="sl" nillable="true" type="string"/>
          <element name="ru" nillable="true" type="string"/>
          <element name="es" nillable="true" type="string"/>
          <element name="fr" nillable="true" type="string"/>
          <element name="po" nillable="true" type="string"/>
          ... and add swahili as well ...
        ... /stuff ...
      </element>

      Kind regards,

                                  Jacek Kopecky

                                  Idoox
                                  http://www.idoox.com/




      On Wed, 18 Jul 2001, Michael Brennan wrote:

      > Yes, I meant using it as you've describe below. The current plan is not to
      > wrap them in any container, but to use it as you've described. One nice
      > advantage is that it can even be generalized. One could do something like:
      >   <library xml:lang="en">
      >      <book>
      >         <title>The Lord of the Rings</title>
      >      </book>
      >    </library>
      >
      > Thus, an integration that only cares about one language can tag the whole
      > structure and have the locale of relevant elements inferred from the larger
      > context.
      >
      > As the responses I have received all point out, I can use document style and
      > then this is supported. Currently, we support document style and much of our
      > integration API can only be invoked in this fashion. However, I'm trying to
      > adapt our APIs to conform as much as possible to SOAP Encoding so that users
      > can use available SOAP toolkits and leverage the databinding they support so
      > they don't have to contend with DOM APIs. We just want to give programmers
      > choice and make it easy for them.
      >
      > I'm thinking that what we will do is support the "xml:lang" approach for
      > those who are comfortable with XML APIs and using document style. But we
      > will have a variant that conforms to SOAP Encoding so that those who prefer
      > not dealing with DOM APIs can use SOAP toolkits and leverage the
      > databinding. For the latter, we'll wrap the values in a container and have
      > accessors named after the locale (e.g. "en" or "en_US", etc). I'll
      > investigate this further and experiment with some of the toolkits to test
      > compatibility.
      >
      > To all those who responded, thanks for the feedback.
      >
      > -----Original Message-----
      > From: Jacek Kopecky [mailto:jacek@...]
      > Sent: Wednesday, July 18, 2001 8:44 AM
      > To: soapbuilders@yahoogroups.com
      > Subject: Re: [soapbuilders] Use of xml:lang attribute in SOAP messages
      >
      >
      > Hello. 8-)
      > Is it needed to wrap the multivalued elements into any
      > container? I also thought that xml:lang would be used as follows:
      > <library>
      >   <book>
      >     <title xml:lang="en">The Lord of the Rings</title>
      >     <title xml:lang="cz">Pan Prstenu</title>
      >     <author>John Ronald Reuel Tolkien</author>
      >   </book>
      >   <!-- ... -->
      > </library>
      >
      > I.e. you don't add containers, you just copy the element.
      > Anyway, is this directly representable in Schemata? I mean that
      > there can be any number of <title> elements as long as their
      > languages differ? But this is not very much about SOAP.
      >
      > As for SOAP, IMHO you can't easily mix my notion of usage of
      > xml:lang (see above) with SOAP section 5 encoding. The solution
      > could be to put the titles into an array, but this results in
      > ugly documents. On the other hand, for pretty document we have
      > document style, so why not allow ugly documents if we want
      > section 5 encoding? 8-)
      >
      > Regards,
      >
      >                             Jacek Kopecky
      >
      >                             Idoox
      >                             http://www.idoox.com/ <http://www.idoox.com/>
      >
      >
      >
      >
      >
      > On Wed, 18 Jul 2001, Rich Salz wrote:
      >
      > > Well Sec5 certainly frowns on using XML attributes to convey data.
      > > As someone else mentioned, if you use "document" style, then it's okay,
      > > but that doesn't seem like what you want.
      > >
      > > > This is significant for us because our software supports the notion of
      > > > "Multivalued" fields, which are text fields that have alternate
      > > > representations for different locales (kind of like the <Alt>
      > >
      > > Do you actually convey multiple values at once?  If so, then you've
      > > already gone to the trouble of wrapping all your strings in an array or
      > > other container, so separating the language into another subfield isn't
      > > unreasonable.
      > >
      > >       /r$
      > >
      > >
      >
      >
      >
      >
      > -----------------------------------------------------------------
      > This group is a forum for builders of SOAP implementations to discuss
      > implementation and interoperability issues.  Please stay on-topic.
      >
      > To unsubscribe from this group, send an email to:
      > soapbuilders-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
      > <http://docs.yahoo.com/info/terms/> .
      >
      >
      >


      -----------------------------------------------------------------
      This group is a forum for builders of SOAP implementations to discuss implementation and interoperability issues.  Please stay on-topic.

      To unsubscribe from this group, send an email to:
      soapbuilders-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
    Your message has been successfully submitted and would be delivered to recipients shortly.