Setting xsi in Excel XML output...

J

Jacky

Hi,

I've created a spreadsheet inclusive of XML mapping and macro for selecting
and checking the required records. However, the XML output has missing
information on the required xsi url and the namespace.

I do have both the XML and the XSD schema files (from the customer).
However, (1) using just the XML file for mapping (using excel created schema)
and (2) using XML with the original schema will give me 2 different list of
XML source. Running through the XSD file in notepad, it was realised that
there were more elements than what was in the XML file.

The original XML file (shortened on the element portion) is as below:
<?xml version="1.0" encoding="UTF-8" ?>
<PROCESS_CHEMICALShipment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="QV-MT00641_1_Stella.xsd" PartID="2ERCH-0424D"
Supplier="Stella Chemifa" MaterialDesc="BHFLL20:1" SupplierMfgSite="STELLA
SINGAPORE" LotID="3783102" LotSize="880" MfgDate="2007-08-31"
ExpireDate="2008-08-30">
<Lot>
<Aluminum VALUE="0.05"><RAW VALUE="0.05" /> </Aluminum>
<Antimony VALUE="0.01"> </Antimony>
<Arsenic VALUE="0.05"> </Arsenic>
</Lot>
</PROCESS_CHEMICALShipment>

Mapping all elements from method (1) would provide me with the following
output (shortened on the element portion):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PROCESS_CHEMICALShipment PartID="2ERCH-0424D" Supplier="Stella Chemifa"
MaterialDesc="BHFLL20:1" SupplierMfgSite="STELLA SINGAPORE" LotID="3783102"
LotSize="880" MfgDate="2007-08-31" ExpireDate="2008-08-30">
<Lot>
<Aluminum VALUE="0.05"><RAW VALUE="0.05"/> </Aluminum>
<Antimony VALUE="0.01"/>
<Arsenic VALUE="0.05"/>
</Lot>
</PROCESS_CHEMICALShipment>

From the above, it can be noticed that the
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="QV-MT00641_1_Stella.xsd" is missing.

I did try to use method (2) for the creation of mapping, however, the
limitation of excel or error is prompted "Cannot save or export XML data. The
XML maps in this workbook are not exportable." After verifying the map for
export, it was highlighted the map is not exportable as it contains "List of
lists".

I did read up on the other thread "Subject: RE: Smart Documents - XSD and
Namespace", but pardon me that i do not understand it. Not really understand
how to edit the XSD file, since it contains so many other elements that are
not in used for the output XML.

Is there way to insert the xsi url and namespace into the schema (using
method (1))? I do see the "Root" and "Namespace property columns under the
"XML Maps", but these are non-editable.

Hope to receive a help soon. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top