|
| How do you specificy another namespace for a specific element? I have this
XML schema file (made using Biztalk 2002 - all not-related info removed for
clarity):
<?xml version="1.0"?>
<!-- Generated by using BizTalk Editor on Fri, Nov 12 2004 12:43:00 PM -->
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<Schema name="IdealXML" b:BizTalkServerEditorTool_Version="1.5"
b:root_reference="IdealXML" b:version="1.0" b:standard="XML"
b:target_namespace="Request" xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:b="urn:schemas-microsoft-com:BizTalkServer"
xmlns:d="urn:schemas-microsoft-com:datatypes"
xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<b:SelectionFields/>
<ElementType name="Request" content="eltOnly" order="seq" model="open">
<b:RecordInfo/>
<AttributeType name="command" d:type="string" d:maxLength="10">
<b:FieldInfo/></AttributeType>
<attribute type="command" required="no" default="commit"/>
<element type="CurrentOrder" maxOccurs="1" minOccurs="0"/>
</ElementType><ElementType name="IdealXML" content="eltOnly" order="seq"
model="closed">
<b:RecordInfo/>
<AttributeType name="version" d:type="string">
<b:FieldInfo/></AttributeType>
<AttributeType name="requestid" d:type="string">
<b:FieldInfo/></AttributeType>
<attribute type="version" required="no" default="1.0"/>
<attribute type="requestid" required="no" default="Unique number 123"/>
<element type="Request" maxOccurs="1" minOccurs="0"/>
</ElementType><ElementType name="CurrentOrder" content="empty" model="closed">
<b:RecordInfo/>
<AttributeType name="CompanyID" d:type="string" d:maxLength="10">
<b:FieldInfo/></AttributeType>
<attribute type="CompanyID" required="no" default="22494"/>
</ElementType></Schema>
Here's the XML output:
<IdealXML xmlns="Request" version="version_1" requestid="requestid_1">
<Request command="command_1">
<CurrentOrder CompanyID="CompanyID_"></CurrentOrder>
</Request>
</IdealXML>
Note the <CurrentOrder> element. How do I modify my schema (and where) to
get this XML output instead:
<IdealXML xmlns="Request" version="version_1" requestid="requestid_1">
<Request command="command_1">
<CurrentOrder xmlns="aaa" CompanyID="CompanyID_"></CurrentOrder>
</Request>
</IdealXML>
the difference being that <CurrentOrder> now has xmlns="aaa" specified?
|
|