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.

 View Only
Expand all | Collapse all

Problem with Schema declaration

  • 1.  Problem with Schema declaration

    Posted Mon May 09, 2005 12:12 PM

    I have a problem in defining a schema for my content type “taxonomy”, and precisely with the tag.

    can contain free XML as follows (example1)

    New Item mysimplecontent

    but it can contain also a simple string as (example2)

    New Item my simple content

    and it can also contain a mixed content such as (example3)

    New Item my simple content

    I have tried declaring as a xs:string but it goes crazy when
    it receives some unescaped < or > char,

    I have also tried declaring as a subtype named “textareaType” which has the following schema

    <xs:complexType name = “textareaType”>
    <xs:sequence minOccurs = “0” maxOccurs = “unbounded”>
    <xs:any processContents = “skip”></xs:any>
    </xs:sequence>
    <xs:anyAttribute processContents = “skip”></xs:anyAttribute>
    </xs:complexType>

    but again, it fails accepting contents that are not XML such as
    example2 or example3

    Is there any way to tell Tamino to accept anything under a certain tag?

    Thank you in advance of your answers


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: Problem with Schema declaration

    Posted Tue May 10, 2005 10:34 AM

    Hi Valentina

    there are different ways to solve this

    (1) do not define a type for the element at all - like
    <xs:element name=“keywords”/>
    This is effectively equivalent to type=“xs:anyType”
    (2) you may declare it as mixed content:
    <xs:element name=“keywords”>
    <xs:complexType mixed=“true”>
    xs:sequence…</xs:sequence>
    </xs:complexType>
    </xs:element>
    (3) Use open content - possibly non-desired side-effect: additional child
    elements / attributes will be allowed for all other complex typed elements

    Best regards
    Uli


    #Tamino
    #API-Management
    #webMethods