Topic
  • 4 replies
  • Latest Post - ‏2014-03-02T23:54:32Z by RayWurlod(ZenithSolutions)
SystemAdmin
SystemAdmin
7754 Posts

Pinned topic Datastage XML Best Practices document

‏2007-05-16T17:38:51Z |
Hi Group,
I am a newbie to datastage and am working on XML stages. I came across a best practices document "BestPracices.doc" by Hernando Borda in the net at Duke's site http://www.duke-consulting.com/Downloads/XmlPackBestPractices.zip. (Last update Apr-23-2003)
I was wondering if there might be a recent version of the same here.
Also, In the section related to validation of the XML output, 3.4.1.2,
the following statement is found.
"The two possibilities are using the parser interface to provide
the schema location prior to parsing the document".
How exactly does one provide the schema location to the parser
interface prior to parsing the document?

If this is not the place to look for, my apologies and i would greatly appreciate it if you could point me in the right direction/group.

Many thanks in advance for your time,
~V
Updated on 2007-07-04T06:34:27Z at 2007-07-04T06:34:27Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    7754 Posts

    Re: Datastage XML Best Practices document

    ‏2007-05-17T03:37:45Z  
    That's the latest version that I had squirreled away and which Kim hosted for me. Never stumbled across anything more recent.

    From the online help: 'To reference a schema in your XML document, use the [b]schemaLocation[/b] attribute within the root element tag.'

    -craig
  • SystemAdmin
    SystemAdmin
    7754 Posts

    Re: Datastage XML Best Practices document

    ‏2007-05-17T16:56:37Z  
    That's the latest version that I had squirreled away and which Kim hosted for me. Never stumbled across anything more recent.

    From the online help: 'To reference a schema in your XML document, use the [b]schemaLocation[/b] attribute within the root element tag.'

    -craig
    Hi Craig,
    Thanks for the followup. Appreciate it much.
    I did follow that instruction and it works perfectly. The concern i had was that the schemaLocation becomes part of the output file that i generate from the XML output stage.
    When i read the BestPractices document, I was curious to know what that statement ("[i]using the parser interface to provide the schema location prior to parsing the document[/i]") meant.
    Wondering if there might be another (simpler) way to validate the xml content without making the schemaLocation a part of the output file.
    The DS Job reads from a database, applies minimal XForms and passes to an XML Output stage which writes to a file. The XML output stage uses an imported XSD table defn to generate the output file.
    I will try on DSXchange as well.

    thanks,
    ~V
  • SystemAdmin
    SystemAdmin
    7754 Posts

    Re: Datastage XML Best Practices document

    ‏2007-07-04T06:34:27Z  
    Hi Craig,
    Thanks for the followup. Appreciate it much.
    I did follow that instruction and it works perfectly. The concern i had was that the schemaLocation becomes part of the output file that i generate from the XML output stage.
    When i read the BestPractices document, I was curious to know what that statement ("[i]using the parser interface to provide the schema location prior to parsing the document[/i]") meant.
    Wondering if there might be another (simpler) way to validate the xml content without making the schemaLocation a part of the output file.
    The DS Job reads from a database, applies minimal XForms and passes to an XML Output stage which writes to a file. The XML output stage uses an imported XSD table defn to generate the output file.
    I will try on DSXchange as well.

    thanks,
    ~V
    The only way I have successfully defined the schema for DataStage XML schema valdiation was using the schemaLocation tag in the XML string.

    If you wish to remove the schemaLocation tag from the output, or perform any other sort of xml transformation, then you can use XSLT with an XML Transformer stage.
  • RayWurlod(ZenithSolutions)
    5 Posts

    Re: Datastage XML Best Practices document

    ‏2014-03-02T23:54:32Z  
    That's the latest version that I had squirreled away and which Kim hosted for me. Never stumbled across anything more recent.

    From the online help: 'To reference a schema in your XML document, use the [b]schemaLocation[/b] attribute within the root element tag.'

    -craig

    Kim has taken his site down.  The document (dated 2003) is now hosted at http://www.raywurlod.com

    You should also visit Ernie Ostic's blog site (for example http://.wordpress.com%2F2013%2F03%2F18%2Fbest-practices-and-techniques-for-the-new-xml-stage) for information about the new XML stage.

     

    Updated on 2014-03-02T23:56:34Z at 2014-03-02T23:56:34Z by RayWurlod(ZenithSolutions)