I
I. Fuchs
I am having a great deal of difficulty attempting to eliminate the ns1
namespace prefixes that InfoPath applies and I can't seem to find any
documentation that addresses this satisfactorily (I have in front of me the
"Support and Troubleshooting for XML Schemas in InfoPath 2003")
Below is the test schema that I am using. The default xmlns is declared as
"xmlns="http://www.xmlassociates.com/namespacetest" and there is a target
namespace declaration of
targetNamespace="http://www.xmlassociates.com/namespacetest" and
elementFormDefault="qualified">
However when you save a document based on this schema in InfoPath, all of
the elements have the ns1 prefix. I even went into the script editor and
deleted the ns1 prefix in the namespace section but this did not fix the
problem. I would greatly appreciate any assistance with this.
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.xmlassociates.com/namespacetest"
targetNamespace="http://www.xmlassociates.com/namespacetest"
elementFormDefault="qualified">
<xsd:element name="Options">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ProductType" type="ProductTypeType"/>
<xsd:element name="PutCall" type="PutCallType"/>
<xsd:element name="OptionStyle" type="OptionStyleType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="ProductTypeType">
<xsd:sequence>
<xsd:element name="Option">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="O"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PutCallType">
<xsd:choice>
<xsd:element name="Put">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="P"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Call">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="C"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Other">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="M"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Unknown">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="X"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="OptionStyleType">
<xsd:choice>
<xsd:element name="American">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="European">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="E"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution
solutionVersion="1.0.0.7" productVersion="11.0.6357" PIVersion="1.0.0.0"
href="file:///C:\Documents%20and%20Settings\Ira%20Fuchs\Desktop\namespacetest.xsn"
name="urn:schemas-microsoft-com
ffice:infopath:namespacetest:http---www-xmlassociates-com-namespacetest"
language="en-us" ?><?mso-application progid="InfoPath.Document"?><ns1:Options
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="http://www.xmlassociates.com/namespacetest"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
<ns1
roductType>
<ns1:Option>O</ns1:Option>
</ns1
roductType>
<ns1
utCall>
<ns1
ut>P</ns1
ut>
</ns1
utCall>
<ns1:OptionStyle>
<ns1:American>A</ns1:American>
</ns1:OptionStyle>
</ns1:Options>
namespace prefixes that InfoPath applies and I can't seem to find any
documentation that addresses this satisfactorily (I have in front of me the
"Support and Troubleshooting for XML Schemas in InfoPath 2003")
Below is the test schema that I am using. The default xmlns is declared as
"xmlns="http://www.xmlassociates.com/namespacetest" and there is a target
namespace declaration of
targetNamespace="http://www.xmlassociates.com/namespacetest" and
elementFormDefault="qualified">
However when you save a document based on this schema in InfoPath, all of
the elements have the ns1 prefix. I even went into the script editor and
deleted the ns1 prefix in the namespace section but this did not fix the
problem. I would greatly appreciate any assistance with this.
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.xmlassociates.com/namespacetest"
targetNamespace="http://www.xmlassociates.com/namespacetest"
elementFormDefault="qualified">
<xsd:element name="Options">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ProductType" type="ProductTypeType"/>
<xsd:element name="PutCall" type="PutCallType"/>
<xsd:element name="OptionStyle" type="OptionStyleType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="ProductTypeType">
<xsd:sequence>
<xsd:element name="Option">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="O"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PutCallType">
<xsd:choice>
<xsd:element name="Put">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="P"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Call">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="C"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Other">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="M"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Unknown">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="X"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="OptionStyleType">
<xsd:choice>
<xsd:element name="American">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="European">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="E"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution
solutionVersion="1.0.0.7" productVersion="11.0.6357" PIVersion="1.0.0.0"
href="file:///C:\Documents%20and%20Settings\Ira%20Fuchs\Desktop\namespacetest.xsn"
name="urn:schemas-microsoft-com
language="en-us" ?><?mso-application progid="InfoPath.Document"?><ns1:Options
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="http://www.xmlassociates.com/namespacetest"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
<ns1
<ns1:Option>O</ns1:Option>
</ns1
<ns1
<ns1
</ns1
<ns1:OptionStyle>
<ns1:American>A</ns1:American>
</ns1:OptionStyle>
</ns1:Options>