IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
  • 1.  Problem with attribute's type: xs:language

    Posted Wed May 05, 2004 05:58 PM

    Hello everyone!

    I was wondering if anyone has an answer to this. I searched the NS and found no answers nowehere to this.

    Perhaps I’m doing osmething wrong or I am not understanding things properly, but if one defines an attribute in a schema, gives it a type from the combobox (not using facets, which override the type), then the schema should enforce that type upon insertaion of doc instances.

    However, when I use the xs:language type, and I insert instances where the attrib has values such as “en=ca”, “en ca”, “whatever even” it inserts the doc instance.


    Thank you,

    Peter


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: Problem with attribute's type: xs:language

    Posted Thu May 06, 2004 11:56 AM

    Peter,

    you write

    but if one defines an attribute in a schema, gives it a type from the combobox (not using facets, which override the type), then the schema should enforce that type upon insertaion of doc instances.

    Yes, in principle you are right. But, for xs:language, things are not that easy. XML Schema (Errata merged in) says:

    [Definition:] language represents natural language identifiers as defined by [RFC 3066]. The


    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: Problem with attribute's type: xs:language

    Posted Thu May 06, 2004 01:32 PM

    Hi

    this topic has been discussed extensively in the past:
    (1) the set of valid values for xs:lang is a moving target
    (2) the errata for the XML schema spec give a regular expression which is not very restrictive
    and contains a syntactical error

    For these reasons, we have not (yet) built these restrictions for xs:lang into Tamino.
    It is treated like xs:string.

    Best regards
    Uli


    #Tamino
    #webMethods
    #API-Management


  • 4.  RE: Problem with attribute's type: xs:language

    Posted Thu May 06, 2004 05:57 PM

    Thank you everyone for consice and helpful information.

    I have read W3C’s info on the topic, but it is often very hard to red and understand, unless you like that kind of technical stuff. However, reading W3C’s info didn’t quite tell me how Tamino was dealing with the issue.

    I still find it a bit misleading that Tamino even offers xs:language as a type when it really behaves like xs:string. What is the rationale behind it? Is it so that the schemas will be portable in future, when xs:language is finalized ?

    Also, I am sure this topic have been discussed in the past, but I searched the NS and didn’t find anything at all. And such searches are simple (xs:language).

    Even before posting this I thought of using a facet with an expression. You have confirmed that this is the best way to go for now.

    I appreciate your time for responding to my question.

    Sincerely,

    Peter Endisch

    ---------------------------------------
    I’m a Zen Garden Maintenance Engineer
    ---------------------------------------


    #Tamino
    #webMethods
    #API-Management


  • 5.  RE: Problem with attribute's type: xs:language

    Posted Mon May 10, 2004 09:35 AM

    Peter,

    thank you. You wonder why “Tamino even offers xs:language as a type when it really behaves like xs:string”.
    As you guess, this is for compatibility reasons. We are striving for 100% XML Schema compliance, so we have to support all types. As Uli wrote, the only thing that can be done at all is to add a pattern to restrict the type a little bit more. We will do so in the future.

    Regards

    Harald


    #webMethods
    #API-Management
    #Tamino