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.  Extracting schema structures

    Posted Wed March 10, 2004 01:10 PM

    I have the following question:

    How do I get access to a schema stored in Tamino at run time?

    The scenario is that I want to create a generic method of taking a schema and then creating an XML instance that is a subset of a large XML document by navigating through the smaller schema to identify which values from the big schema are needed for the smaller XML document:

    EG, if the biger schema contained “FirstName”, “Initial”, “LastName”, and there was a schema that contained only “FirstName” and “LastName”.

    If I wanted to dynamically identify the nodes that I need to extract values from in the big XML document, I could do this by navigating through the smaller SCHEMA, and generating an XQuery dynamically as I identify the nodes in the smaller schema.

    Another option is to generate a blank XML instance. How can I do this dynamically at run time?

    How would I do this?

    Stuart King


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: Extracting schema structures

    Posted Wed March 10, 2004 03:05 PM

    you can query on the XML Schemas in Tamino: doctype is “ino:collection”, doctype is “xs:schema”. You can do anything you do with XQuery.

    regards,

    Timm


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: Extracting schema structures

    Posted Thu March 11, 2004 11:44 AM

    sorry, typo!

    you can query on the XML Schemas in Tamino: Collection is “ino:collection”, doctype is “xs:schema”. You can do anything you do with XQuery.

    regards,

    Timm


    #API-Management
    #webMethods
    #Tamino


  • 4.  RE: Extracting schema structures

    Posted Thu March 11, 2004 03:51 PM

    Hi Timm

    We seem to struggle with this. Can you kindly give us an example of how to query a schema from Tamino


    #webMethods
    #API-Management
    #Tamino


  • 5.  RE: Extracting schema structures

    Posted Fri March 12, 2004 09:09 AM

    Hello Frikkie

    Is a Xquery sample which does what you want:

    declare namespace xs=“XML Schema
    for $s in input()/xs:schema[//@name=“”]
    return $s

    You have to execute this XQuery in the “ino:collection” collection

    Best regards,

    Ludovic


    #webMethods
    #Tamino
    #API-Management


  • 6.  RE: Extracting schema structures

    Posted Thu October 13, 2005 01:59 AM

    Hi !
    I’m wrestling with this query

    [color=“green”]

    declare namespace tf = “http://namespaces.softwareag.com/tamino/TaminoFunction
    declare namespace xs=“XML Schema
    declare namespace ino=“http://namespaces.softwareag.com/tamino/response2
    (
    for $s in input()/xs:schema
    where ( ! tf:containsText ( $s/@ino:docname, “ino”) )
    return
    $s
    )
    [position() >= 1 and position() <= 3][/color]

    Doesn’t works :oops: … what I need to display the current schemas with a xquery ? (I mean non-system schemas)
    Regards

    Joe


    #API-Management
    #Tamino
    #webMethods


  • 7.  RE: Extracting schema structures

    Posted Thu October 13, 2005 10:00 AM

    Hi,

    try
    for $i in input()/xs:schema
    where not (starts-with(xs:string(tf:getDocname(root($i))),“ino:”))
    return $i

    Regards

    harald


    #Tamino
    #API-Management
    #webMethods


  • 8.  RE: Extracting schema structures

    Posted Thu October 13, 2005 10:01 AM

    sorry, this was for Tamio 4.4. For earlier versions, you have to declare the namespaces as well


    #API-Management
    #webMethods
    #Tamino