Hi all,

I tried to submit an example of a schema where XMLSpy would validate the
document but Xerces declared all the keyref elements out of scope.  I think
a filter at our site took out my attachments, so I'll try again with some
schema sections.  Is there something we're doing wrong with this?  Or, if
keyrefs simply won't work for us, does anyone have suggestions on how we
can accomplish the same thing another way?

Here's a section where we are using keyrefs:

                                   <xsd:element name="VaporComposition"
type="VaporCompositionType" minOccurs="0" maxOccurs="unbounded"/>
                                   <xsd:element name="LiquidComposition"
type="LiquidCompositionType" minOccurs="0" maxOccurs="unbounded"/>
                                   <xsd:element name="CompositeComposition"
type="CompositeCompositionType" minOccurs="0" maxOccurs="unbounded"/>
                                </xsd:sequence>
                                <xsd:attribute name="stepNumber" type="
xsd:positiveInteger"/>
                              </xsd:complexType>
                              <xsd:keyref name="cceVaporPhaseComponentRef"
refer="componentName">
                                <xsd:selector xpath="./VaporComposition"/>
                                <xsd:field xpath="@componentName"/>
                              </xsd:keyref>
                              <xsd:keyref name="cceLiquidPhaseComponentRef"
refer="componentName">
                                <xsd:selector xpath="./LiquidComposition"/>
                                <xsd:field xpath="@componentName"/>
                              </xsd:keyref>
                              <xsd:keyref name="
cceCompositePhaseComponentRef" refer="componentName">
                                <xsd:selector xpath="./CompositeComposition
"/>
                                <xsd:field xpath="@componentName"/>
                              </xsd:keyref>


And here's where we have the types referenced above defined:

  <xsd:complexType name="VaporCompositionType">
     <xsd:sequence>
       <xsd:element name="weightPercent" type="percentageType" minOccurs="0
"/>
       <xsd:element name="molePercent" type="percentageType" minOccurs="0
"/>
     </xsd:sequence>
     <xsd:attribute name="componentName" use="required">
       <xsd:simpleType>
          <xsd:restriction base="xsd:string">
            <xsd:maxLength value="40"/>
          </xsd:restriction>
       </xsd:simpleType>
     </xsd:attribute>
  </xsd:complexType>
  <xsd:complexType name="LiquidCompositionType">
     <xsd:sequence>
       <xsd:element name="weightPercent" type="percentageType" minOccurs="0
"/>
       <xsd:element name="molePercent" type="percentageType" minOccurs="0
"/>
     </xsd:sequence>
     <xsd:attribute name="componentName" use="required">
       <xsd:simpleType>
          <xsd:restriction base="xsd:string">
            <xsd:maxLength value="40"/>
          </xsd:restriction>
       </xsd:simpleType>
     </xsd:attribute>
  </xsd:complexType>
  <xsd:complexType name="CompositeCompositionType">
     <xsd:sequence>
       <xsd:element name="weightPercent" type="percentageType" minOccurs="0
"/>
       <xsd:element name="molePercent" type="percentageType" minOccurs="0
"/>
       <xsd:element name="kValue" type="xsd:float" minOccurs="0"/>
     </xsd:sequence>
     <xsd:attribute name="componentName" use="required">
       <xsd:simpleType>
          <xsd:restriction base="xsd:string">
            <xsd:maxLength value="40"/>
          </xsd:restriction>
       </xsd:simpleType>
     </xsd:attribute>
  </xsd:complexType>


Thanks very much,

David Shontz
ExxonMobil Exploration UTC
Application Support/Application and Data Integration
CORP-RR-603
281-654-7214
Email: David Shontz/U-Houston/ExxonMobil
Internet Email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to