I'm reviewing the XML for the UPS Shipping API, and the XSD contains this block:
<xsd:complexType name="PackageType">
<xsd:sequence>
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
<xsd:element name="PackagingType" type="PackagingTypeType" minOccurs="0"/>
<xsd:element name="Dimensions" type="DimensionsType" minOccurs="0"/>
<xsd:element name="DimWeight" type="PackageWeightType" minOccurs="0"/>
<xsd:element name="PackageWeight" type="PackageWeightType" minOccurs="0"/>
<xsd:element name="LargePackageIndicator" type="xsd:string" minOccurs="0"/>
...
I'd like to see what the possible values for PackageWeightType
are, but I can't figure out how to backtrack. The top of the XSD is
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns:ups="http://www.ups.com/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="201707">
<xsd:include schemaLocation="IF.xsd"/>
but there's nothing in IF.xsd that I can see that would help me in my quest.
What are my next steps?
The same XSD that houses PackageType
( ShipConfirmRequest.xsd , version 201707) also contains PackageWeightType
:
<xsd:complexType name="PackageWeightType">
<xsd:sequence>
<xsd:element name="UnitOfMeasurement" type="UnitOfMeasurementType"/>
<xsd:element name="Weight" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
and UnitOfMeasurementType
as well:
<xsd:complexType name="UnitOfMeasurementType">
<xsd:sequence>
<xsd:element name="Code" type="xsd:string"/>
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
Generally, to find a declaration:
If the component is in the same namespace, you need only look in the original XSD and the transitive closure of the included XSDs. If the component is in a different namespace, you can typically find the XSD based upon the referenced namespace.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.