IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  validating a XML file:

    Posted 07/30/08 02:09 PM

    Originally posted by: raj1


    what is meant by validating the xml file? is it by creating a type tree for the xsd and checking whether the xml file fits into it or not? or are there any other functions to be used?
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: validating a XML file:

    Posted 07/30/08 02:25 PM

    Originally posted by: Ravikt


    Validation means checking for the below conditions
    1. The XML instance(document) is well-formed.
    2. The XML instance satisfies all the rules of the XSD or DTD (Both DTD & XSD can be used, the advanced one is XSD using which strict rules can be imposed to validate structure as well as data)
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: validating a XML file:

    Posted 07/31/08 10:23 AM

    Originally posted by: raj1


    Awesome!ravikt,But i would like to know how we can acheive this in WTX? i mean, i would like to know how we do the validation for XML date in wtx?
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 4.  Re: validating a XML file:

    Posted 07/31/08 10:27 AM

    Originally posted by: janhess


    Import the xsd into type designer and use the resultant type tree in the input card. This will validate the xml.
    Alternatively use the VALIDATE function to validate parts or all of the xml
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 5.  Re: validating a XML file:

    Posted 08/06/08 12:19 PM

    Originally posted by: SystemAdmin


    Can't you also validate against the XSD by specifying it in the Doc properties? It appears that the standard validation takes place followed by the XSD validation by the external parser. Here's an example of what followed the standard (and successful) validation trace:
    
    External Parser returned Error:
    TYPE X '0003' (Error line: 23 column: 47
    Datatype error: Type:InvalidDatatypeValueException, Message:Value '040-404-0404' does not match regular expression facet '(\+ ^\-+{1,25}-)?( ^\-+{1,25}-)?( ^\-+{1,25})(\+ ^\-+{1,25})?'.

    Error line: 53 column: 48
    Datatype error: Type:InvalidDatatypeValueException, Message:Value '913-422-9303' does not match regular expression facet '(\+ ^\-+{1,25}-)?( ^\-+{1,25}-)?( ^\-+{1,25})(\+ ^\-+{1,25})?'.

    Error line: 70 column: 47
    Datatype error: Type:InvalidDatatypeValueExcep).

    (Level 0: Offset 0, len 2921, comp 1 of 0, #1, DI 000000A9:)
    Data at offset 0 ( '<?xml version="1') was found to be of TYPE
    X '0002' (DocGroup XSD).

    INPUT 1 was valid, but it contained invalid objects.

    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 6.  Re: validating a XML file:

    Posted 08/01/08 03:25 AM

    Originally posted by: Ravikt


    U can also directly use XSD in the input card as TypeTree in WTX8.2 to validate the xml file.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender