Page 1 of 1

XML Input & OutPut Stages

Posted: Sat Jan 13, 2007 9:47 pm
by seethamsetty
Hi!

This is with regard to XML Meta data import. I have a doubt with regard to metadata import, are columns taken from XML or XSD file?

I am importing metadata from Xsd file , and using the required fields in the job.

I am facing problem wth regard to namespaces.

I have given the following in XML Input Namespace declaration

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:="http://www.cust.org/Contract"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

It gives the following error :
Contract_ranga1..XML_Input_1: Unable to resolve prefix 'defns'.
pattern = '/defns:contracts/defns:contract'(Unknown URI, 12, 87)
Remaining tokens: ('/')

Can any one help me on the above problem.

Posted: Sun Jan 14, 2007 12:00 am
by narasimha
There a few posts with similar issues, like this
If that does not help get back.

Posted: Sun Jan 14, 2007 10:15 am
by eostic
...a few tips to consider along with that other thread.... the error is most likely a result of the xpath that is sitting in the "Description" property for your columns... /defns:<yourcolumnname> is right from the Xpath syntax.

This means that you need a namespace definition for defns. Normally it would come in from the table definition that you imported from the xsd or xml doc..... but it doesn't have to be... you can just go in and edit the namespace "window" and add your own:

xmlns:defns="fred" (or whatever unique qualifying string you want...best if it was the actual one, but anything will likely work fine).

Ernie

Posted: Sun Jan 14, 2007 10:34 am
by chulett
And just out of curiousity, are there actually any namespace declarations in your incoming XML files?

XML Input stage

Posted: Mon Jan 15, 2007 12:11 pm
by seethamsetty
I am using folder statge to retrive the xml file and xml input stage to process the xml document and write onto sequential file.

I am able to send a record to input stage and nothing is written out of outout stage to target.

Job is processed sucessfully, no errors

My input file looks like
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <NAXML-BusDoc xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.naxml.org/Retail-EDI/Vocabul ... oice15.xsd" version="1.5">

But i am importing the metadata for this xml from xml file .
and a prefix of ns1 is taken while importing and also in colums load.

It that correct. Is it some thing to do with name spaces.
Kindly help