DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17314>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17314 XMLGrammarPool operation Summary: XMLGrammarPool operation Product: Xerces2-J Version: 2.0.2 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Blocker Priority: Other Component: XNI AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I'm attempting to write an implementation of XMLGrammarPool, code attached. The implementation uses the XSDDescription.getLocationHints[0] as a key to the pool. Under some conditions, the retrieveGrammar method is passed an XSDDescription with locationHints an array of length zero. In these cases, there seems to be little else of use in the XSDDEscription. See Stack Trace 1. If I code around the absent locationHint so that retrieveGrammar returns null, then I get an ArrayIndexOutOfBoundsException in XMLSchemaValidator. See Stack Trace 2. I've also included the instance document that I'm attempting to parse and relevant schemas. Note that this document parses if there is no grammarPool registered to the parser. ********* Stack Trace 1 **************** java.lang.ArrayIndexOutOfBoundsException: 0 at au.com.mqis.xmltools.ToolsGrammarPool.getKey (ToolsGrammarPool.java:112) at au.com.mqis.xmltools.ToolsGrammarPool.retrieveGrammar (ToolsGrammarPool.java:73) at org.apache.xerces.impl.xs.XMLSchemaValidator.getSchemaGrammarFromAppl (XMLSchemaValidator.java:2220) at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar (XMLSchemaValidator.java:2175) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement (XMLSchemaValidator.java:1724) at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement (XMLSchemaValidator.java:588) at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement (XMLNamespaceBinder.java:829) at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement (XMLNamespaceBinder.java:590) at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement (XMLDTDValidator.java:817) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement (XMLDocumentFragmentScannerImpl.java:748) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher. dispatch(XMLDocumentFragmentScannerImpl.java:1454) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (XMLDocumentFragmentScannerImpl.java:333) at org.apache.xerces.parsers.StandardParserConfiguration.parse (StandardParserConfiguration.java:529) at org.apache.xerces.parsers.StandardParserConfiguration.parse (StandardParserConfiguration.java:585) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147) at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:221) . **************** Stack Trace 2 ********************* java.lang.ArrayIndexOutOfBoundsException: 0 at org.apache.xerces.impl.xs.XMLSchemaValidator$LocationArray.getFirstLocation (XMLSchemaValidator.java:2121) at org.apache.xerces.impl.xs.XMLSchemaValidator.parseSchema (XMLSchemaValidator.java:2245) at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar (XMLSchemaValidator.java:2178) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement (XMLSchemaValidator.java:1724) at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement (XMLSchemaValidator.java:588) at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement (XMLNamespaceBinder.java:829) at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement (XMLNamespaceBinder.java:590) at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement (XMLDTDValidator.java:817) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement (XMLDocumentFragmentScannerImpl.java:748) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher. dispatch(XMLDocumentFragmentScannerImpl.java:1454) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (XMLDocumentFragmentScannerImpl.java:333) at org.apache.xerces.parsers.StandardParserConfiguration.parse (StandardParserConfiguration.java:529) at org.apache.xerces.parsers.StandardParserConfiguration.parse (StandardParserConfiguration.java:585) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147) at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:221) ******************** ToolGrammarPool.java ************************** package au.com.mqis.xmltools; import java.util.Hashtable; import java.util.Iterator; import java.util.Set; import org.apache.xerces.impl.xs.XSDDescription; import org.apache.xerces.xni.QName; import org.apache.xerces.xni.XMLAttributes; import org.apache.xerces.xni.grammars.Grammar; import org.apache.xerces.xni.grammars.XMLGrammarDescription; import org.apache.xerces.xni.grammars.XMLGrammarPool; /** * The implementation works for schemas only. * This implementation operates on drip feed. * It relies on the parser to return pre-parsed grammers via * the cacheGrammars method. */ public class ToolsGrammarPool implements XMLGrammarPool { // private boolean locked; private Hashtable grammarCache; // /** * Constructor for ToolsGrammarPool */ public ToolsGrammarPool(XMLCatalog catalog) { super(); clear(); } /** * @see XMLGrammarPool#retrieveInitialGrammarSet(String) */ public Grammar[] retrieveInitialGrammarSet(String grammarType) { // Grammar[] grammarArray = new Grammar[grammarCache.size()]; Set grammarSet = grammarCache.keySet(); String grammarKey; Iterator iter = grammarSet.iterator(); for (int i = 0; iter.hasNext(); i++) { grammarKey = (String) (iter.next()); grammarArray[i] = (Grammar) grammarCache.get (grammarKey); } System.out.println("retrieveInitialGrammarSet:" + grammarCache.size()); return grammarArray; } /** * @see XMLGrammarPool#cacheGrammars(String, Grammar[]) */ public void cacheGrammars(String grammarType, Grammar[] grammarArray) { // if (locked) { return; } String grammarKey; String longKey; for (int i = 0; i < grammarArray.length; i++) { grammarKey = getKey((XSDDescription) grammarArray [i].getGrammarDescription()); System.out.println("cacheGrammars:" + grammarKey); grammarCache.put(grammarKey, grammarArray[i]); System.out.println("cacheGrammars:" + grammarKey + " added to cache:" + grammarCache.size()); } } /** * @see XMLGrammarPool#retrieveGrammar(XMLGrammarDescription) */ public Grammar retrieveGrammar(XMLGrammarDescription grammarDescription) { // String grammarKey = getKey((XSDDescription) grammarDescription); if ( grammarKey == null ) { return null; } Grammar grammar = (Grammar) (grammarCache.get(grammarKey)); if (grammar != null) { System.out.println("retrieveGrammar:" + grammarKey + " from cache"); } else { System.out.println("retrieveGrammar:" + grammarKey + " not found in cache:" + grammarCache.size()); } return grammar; } /** * @see XMLGrammarPool#lockPool() */ public void lockPool() { locked = true; } /** * @see XMLGrammarPool#unlockPool() */ public void unlockPool() { locked = false; } /** * @see XMLGrammarPool#clear() */ public void clear() { grammarCache = new Hashtable(); locked = false; } // private String getKey(XSDDescription description) { // // This is the same technique used in the XMLCatalog entity resolver String[] hints = description.getLocationHints(); String longKey = hints[0]; int start = longKey.replace('\\', '/').lastIndexOf("/") + 1; String hint = longKey.substring(start); return hint; } } ************ Instance Document ************************ <?xml version="1.0"?> <mrr:SydneyWaterMessage xmlns:mrr="http://www.sydneywater.com.au/EKAMS/Internal/MeasurementRepor tRequest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sydneywater.com.au/EKAMS/Internal/Measure mentReportRequest EKAMSMeasurementReportRequest.xsd"> <SydneyWaterHeader> <WorkFlowID></WorkFlowID> <SourceApplication>EKAMS</SourceApplication> <SourceFunction>FindTransmissionPage.SubmitMessage</SourceFunction> <SourceDateTime>2002-03-14T11:43:56</SourceDateTime> <UserID>t99</UserID> <TraceLevel>0</TraceLevel> <PerformanceStamp> <PerformanceComponent>A</PerformanceComponent> <PerformanceEvent>entry</PerformanceEvent> <PerformanceDateTime>2002-03-14T11:43:57.283</PerformanceDateTime> </PerformanceStamp> <PerformanceStamp> <PerformanceComponent>A</PerformanceComponent> <PerformanceEvent>exit</PerformanceEvent> <PerformanceDateTime>2002-03-14T11:43:58</PerformanceDateTime> </PerformanceStamp> </SydneyWaterHeader> <EKAMSIN> <MeasurementReportRequest> <ProgrammeCode>EPAL</ProgrammeCode> <ProgrammeCode>BEAC</ProgrammeCode> <STPCode>BE</STPCode> <STPCode>BH</STPCode> <STPCode>BN</STPCode> <AnalyteCode>AMM</AnalyteCode> <AnalyteCode>LI</AnalyteCode> <AnalyteCode>TKN</AnalyteCode> <AnalyteCode>CBOD</AnalyteCode> <IncludeGeometricMean>true</IncludeGeometricMean> <SamplingDateFirst>2002-06-01</SamplingDateFirst> <SamplingDateLast>2002-06-30</SamplingDateLast> </MeasurementReportRequest> </EKAMSIN> </mrr:SydneyWaterMessage> ************** Schema EKAMSMeasurementReportRequest.xsd ****************** <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" version="1" xmlns:swc="http://www.sydneywater.com.au" xmlns:ekamsin="http://www.sydneywater.com.au/EKAMS/Internal" xmlns:this="http://www.sydneywater.com.au/EKAMS/Internal/MeasurementRepo rtRequest" targetNamespace="http://www.sydneywater.com.au/EKAMS/Internal/Measuremen tReportRequest"> <!--include schemaLocation="EKAMSInternal.xsd"/--> <import namespace="http://www.sydneywater.com.au" schemaLocation="SydneyWaterHeader.xsd"/> <import namespace="http://www.sydneywater.com.au/EKAMS/Internal" schemaLocation="EKAMSInternal.xsd"/> <element name="SydneyWaterMessage"> <complexType> <sequence> <element name="SydneyWaterHeader" type="swc:SydneyWaterHeader"/> <element name="EKAMSIN"> <complexType> <sequence> <element name="MeasurementReportRequest" type="ekamsin:MeasurementReportRequest"/> </sequence> </complexType> </element> </sequence> </complexType> </element> </schema> *************** Schema SydneyWaterHeader.xsd ******************* <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" version="1" xmlns:swc="http://www.sydneywater.com.au" targetNamespace="http://www.sydneywater.com.au"> <complexType name="SydneyWaterHeader"> <sequence> <element name="WorkFlowID" type="swc:WorkFlowID"/> <element name="SourceApplication" type="swc:SourceApplication"/> <element name="SourceFunction" type="swc:SourceFunction"/> <element name="SourceDateTime" type="dateTime"/> <element name="UserID" type="swc:UserID"/> <element name="TraceLevel" type="integer"/> <group ref="swc:Exception" minOccurs="0" maxOccurs="unbounded"/> <element name="DocumentID" type="string" minOccurs="0"/> <element name="PerformanceStamp" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="PerformanceComponent" type="swc:PerformanceComponent"/> <element name="PerformanceEvent" type="swc:PerformanceEvent"/> <element name="PerformanceDateTime" type="dateTime"/> </sequence> </complexType> </element> </sequence> </complexType> <group name="Exception"> <choice> <element name="DOMException" type="swc:DOMException"/> <element name="eGateException" type="swc:eGateException"/> <element name="MQSeriesException" type="swc:MQSeriesException"/> <element name="OracleException" type="swc:OracleException"/> <element name="WebSphereException" type="swc:WebSphereException"/> </choice> </group> <simpleType name="DOMException"> <restriction base="string"></restriction> </simpleType> <simpleType name="eGateException"> <restriction base="string"></restriction> </simpleType> <simpleType name="MQSeriesException"> <restriction base="string"></restriction> </simpleType> <simpleType name="OracleException"> <restriction base="string"></restriction> </simpleType> <simpleType name="PerformanceComponent"> <restriction base="string"> <maxLength value="32"/> </restriction> </simpleType> <simpleType name="PerformanceEvent"> <restriction base="string"> <maxLength value="16"/> </restriction> </simpleType> <simpleType name="SourceApplication"> <restriction base="string"> <maxLength value="8"/> </restriction> </simpleType> <simpleType name="SourceFunction"> <restriction base="string"> <maxLength value="64"/> </restriction> </simpleType> <simpleType name="UserID"> <restriction base="string"> <maxLength value="8"/> </restriction> </simpleType> <simpleType name="WebSphereException"> <restriction base="string"></restriction> </simpleType> <simpleType name="WorkFlowID"> <restriction base="string"> <maxLength value="32"/> </restriction> </simpleType> </schema> ************* Schema EKAMSInternal.xsd ***************** <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" version="1" xmlns:ekamsin="http://www.sydneywater.com.au/EKAMS/Internal" targetNamespace="http://www.sydneywater.com.au/EKAMS/Internal" xmlns:ekamscom="http://www.sydneywater.com.au/EKAMS/Common"> <!-- Define only types here. Do not define elements --> <import schemaLocation="EKAMSCommon.xsd" namespace="http://www.sydneywater.com.au/EKAMS/Common"/> <complexType name="EKAMSIN"> <choice> <element name="MeasurementReportRequest" type="ekamsin:MeasurementReportRequest"/> <element name="MeasurementReportResponse" type="ekamsin:MeasurementReportResponse"/> <element name="RecordAndValidateTransmission" type="ekamsin:RecordAndValidateTransmission"/> <element name="RetrieveTransmissionListRequest" type="ekamsin:RetrieveTransmissionListRequest"/> <element name="RetrieveTransmissionListResponse" type="ekamsin:RetrieveTransmissionListResponse"/> <element name="RetrieveTransmissionRequest" type="ekamsin:RetrieveTransmissionRequest"/> <element name="RetrieveTransmissionResponse" type="ekamsin:RetrieveTransmissionResponse"/> <element name="UpdateTransmissionStatusRequest" type="ekamsin:UpdateTransmissionStatusRequest"/> <element name="UpdateTransmissionStatusResponse" type="ekamsin:UpdateTransmissionStatusResponse"/> <!-- Place additional messages here --> </choice> </complexType> <complexType name="MeasurementReportRequest"> <sequence> <element name="ProgrammeCode" type="ekamscom:ProgrammeCode" maxOccurs="unbounded"/> <element name="STPCode" type="ekamscom:STPCode" maxOccurs="unbounded"/> <element name="AnalyteCode" type="ekamscom:AnalyteCode" maxOccurs="unbounded"/> <element name="IncludeGeometricMean" type="ekamscom:IncludeGeometricMean" minOccurs="0"/> <element name="SamplingDateFirst" type="ekamscom:SamplingDate"/> <element name="SamplingDateLast" type="ekamscom:SamplingDate"/> </sequence> </complexType> <simpleType name="MeasurementReportResponse"> <!-- Comma Separated Variable --> <restriction base="ekamscom:CSV"/> </simpleType> <complexType name="RecordAndValidateTransmission"> <sequence> <element name="TransmissionHeader"> <complexType> <sequence> <element name="ServiceProviderCode" type="ekamscom:ServiceProviderCode"/> <element name="ProgrammeCode" type="ekamscom:ProgrammeCode" minOccurs="0"/> <element name="ExternalReference" type="ekamscom:ExternalReference"/> <element name="ReplacesExternalReference" type="ekamscom:ExternalReference" minOccurs="0"/> <element name="LaboratoryComments" type="ekamscom:LaboratoryComments" minOccurs="0"/> <element name="FileName" type="ekamscom:FileName"/> <element name="ReceivedDate" type="ekamscom:ReceivedDate"/> </sequence> </complexType> </element> <element name="SamplingPoint" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="SamplingPointID" type="ekamscom:SamplingPointID"/> <element name="Sample" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="LIMSNumber" type="ekamscom:LIMSNumber" minOccurs="0"/> <element name="ScheduledSamplingDate" type="ekamscom:SamplingDate" minOccurs="0"/> <element name="SamplingDate" type="ekamscom:SamplingDate"/> <element name="SamplingTime" type="ekamscom:SamplingTime" minOccurs="0"/> <element name="UnscheduledSamplingReason" type="ekamscom:UnscheduledSamplingReason" minOccurs="0"/> <element name="SamplingMethodCode" type="ekamscom:SamplingMethodCode"/> <element name="SamplingPurposeCode" type="ekamscom:SamplingPurposeCode"/> <element name="SampleDay" type="ekamscom:SampleDay" minOccurs="0"/> <element name="Measurement" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="AnalyteName" type="ekamscom:AnalyteName"/> <element name="LaboratoryMethod" type="ekamscom:LaboratoryMethod" minOccurs="0"/> <element name="ResultValue" type="ekamscom:ResultValue"/> <element name="DetectionLimit" type="ekamscom:DetectionLimit" minOccurs="0"/> <element name="MeasurementUnit" type="ekamscom:MeasurementUnit"/> <element name="Confirmed" type="ekamscom:Confirmed" minOccurs="0" default="false"/> <element name="LessThanDetectionLimit" type="ekamscom:LessThanDetectionLimit" minOccurs="0" default="false"/> <element name="MeasurementComments" type="ekamscom:MeasurementComments" minOccurs="0"/> </sequence> </complexType> </element> </sequence> </complexType> </element> </sequence> </complexType> </element> </sequence> </complexType> <complexType name="RetrieveTransmissionListRequest"> <sequence> <element name="ProgrammeCode" type="ekamscom:ProgrammeCode"/> <element name="ServiceProviderCode" type="ekamscom:ServiceProviderCode"/> <element name="Region" type="ekamscom:Region"/> <element name="TransmissionStatus" type="ekamscom:TransmissionStatus"/> <element name="ReceivedDateFirst" type="ekamscom:ReceivedDate"/> <element name="ReceivedDateLast" type="ekamscom:ReceivedDate"/> <element name="FirstEntry" type="ekamscom:Iterator"/> <element name="LastEntry" type="ekamscom:Iterator"/> </sequence> </complexType> <complexType name="RetrieveTransmissionListResponse"> <sequence> <element name="ProgrammeCode" type="ekamscom:ProgrammeCode"/> <element name="ServiceProviderCode" type="ekamscom:ServiceProviderCode"/> <element name="Region" type="ekamscom:Region"/> <element name="TransmissionStatus" type="ekamscom:TransmissionStatus"/> <element name="ReceivedDateFirst" type="ekamscom:ReceivedDate"/> <element name="ReceivedDateLast" type="ekamscom:ReceivedDate"/> <element name="FirstEntry" type="ekamscom:Iterator"/> <element name="LastEntry" type="ekamscom:Iterator"/> <element name="TransmissionSummary" type="ekamscom:TransmissionSummary" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <complexType name="RetrieveTransmissionRequest"> <sequence> <element name="TransmissionSeq" type="ekamscom:TransmissionSeq"/> </sequence> </complexType> <complexType name="RetrieveTransmissionResponse"> <sequence> <element name="TransmissionHeader"> <complexType> <sequence> <element name="TransmissionSeq" type="ekamscom:TransmissionSeq"/> <element name="ReceivedDate" type="ekamscom:ReceivedDate" minOccurs="0"/> <element name="ServiceProviderCode" type="ekamscom:ServiceProviderCode" minOccurs="0"/> <element name="ProgrammeCode" type="ekamscom:ProgrammeCode" minOccurs="0"/> <element name="Region" type="ekamscom:Region" minOccurs="0"/> <element name="ExternalReference" type="ekamscom:ExternalReference" minOccurs="0"/> <element name="ReplacesExternalReference" type="ekamscom:ExternalReference" minOccurs="0"/> <element name="LaboratoryComments" type="ekamscom:LaboratoryComments" minOccurs="0"/> <element name="FileName" type="ekamscom:FileName" minOccurs="0"/> <element name="TransmissionStatus" type="ekamscom:TransmissionStatus" minOccurs="0"/> <element name="CreatedUserId" type="ekamscom:UserId" minOccurs="0"/> <element name="CreatedDateTime" type="ekamscom:AuditDateTime" minOccurs="0"/> <element name="ModifiedUserId" type="ekamscom:UserId" minOccurs="0"/> <element name="ModifiedDateTime" type="ekamscom:AuditDateTime" minOccurs="0"/> <element name="TransmissionException" type="ekamscom:TransmissionException" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element> <element name="SamplingPoint" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="SamplingPointID" type="ekamscom:SamplingPointID"/> <element name="STPName" type="ekamscom:STPName" minOccurs="0"/> <element name="Sample" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="LIMSNumber" type="ekamscom:LIMSNumber" minOccurs="0"/> <element name="ScheduledSamplingDate" type="ekamscom:SamplingDate" minOccurs="0"/> <element name="SamplingDate" type="ekamscom:SamplingDate"/> <element name="SamplingTime" type="ekamscom:SamplingTime" minOccurs="0"/> <element name="UnscheduledSamplingReason" type="ekamscom:UnscheduledSamplingReason" minOccurs="0"/> <element name="SamplingMethodCode" type="ekamscom:SamplingMethodCode" minOccurs="0"/> <element name="SamplingPurposeCode" type="ekamscom:SamplingPurposeCode" minOccurs="0"/> <element name="SampleDay" type="ekamscom:SampleDay" minOccurs="0"/> <element name="SampleException" type="ekamscom:TransmissionException" minOccurs="0" maxOccurs="unbounded"/> <element name="Measurement" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="AnalyteName" type="ekamscom:AnalyteName"/> <element name="AnalyteCode" type="ekamscom:AnalyteCode" minOccurs="0"/> <element name="LaboratoryMethod" type="ekamscom:LaboratoryMethod" minOccurs="0"/> <element name="ReportedResultValue" type="ekamscom:ResultValue"/> <element name="ReportedDetectionLimit" type="ekamscom:DetectionLimit" minOccurs="0"/> <element name="ReportedMeasurementUnit" type="ekamscom:MeasurementUnit" minOccurs="0"/> <element name="ConvertedResultValue" type="ekamscom:ResultValue" minOccurs="0"/> <element name="ConvertedDetectionLimit" type="ekamscom:DetectionLimit" minOccurs="0"/> <element name="ConvertedMeasurementUnit" type="ekamscom:MeasurementUnit" minOccurs="0"/> <element name="Confirmed" type="ekamscom:Confirmed" minOccurs="0" default="false"/> <element name="LessThanDetectionLimit" type="ekamscom:LessThanDetectionLimit" minOccurs="0" default="false"/> <element name="MeasurementComments" type="ekamscom:MeasurementComments" minOccurs="0"/> <element name="MeasurementException" type="ekamscom:TransmissionException" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element> </sequence> </complexType> </element> </sequence> </complexType> </element> </sequence> </complexType> <complexType name="UpdateTransmissionStatusRequest"> <sequence> <element name="TransmissionSeq" type="ekamscom:TransmissionSeq"/> <element name="TransmissionStatus" type="ekamscom:TransmissionStatus"/> <element name="RejectionReason" type="ekamscom:TransmissionException" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <complexType name="UpdateTransmissionStatusResponse"> <sequence> <element name="TransmissionSeq" type="ekamscom:TransmissionSeq"/> <element name="TransmissionStatus" type="ekamscom:TransmissionStatus"/> </sequence> </complexType> </schema> ***************** Schema EKAMSCommon.xsd ********************** <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ekamscom="http://www.sydneywater.com.au/EKAMS/Common" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="1" targetNamespace="http://www.sydneywater.com.au/EKAMS/Common" > <!-- Define only types here. Do not define elemements --> <simpleType name="AnalyteCode"> <restriction base="string"> <minLength value="1"/> <maxLength value="6"/> </restriction> </simpleType> <simpleType name="AnalyteName"> <restriction base="string"> <minLength value="1"/> <maxLength value="80"/> </restriction> </simpleType> <simpleType name="AnalyteTypeCode"> <restriction base="integer"></restriction> </simpleType> <simpleType name="AnalyteTypeCodeSearch"> <union memberTypes="ekamscom:AnalyteTypeCode ekamscom:WildCard"/> </simpleType> <simpleType name="AnalyteTypeDesc"> <restriction base="string"> <minLength value="1"/> <maxLength value="40"/> </restriction> </simpleType> <simpleType name="AuditDateTime"> <restriction base="dateTime"></restriction> </simpleType> <simpleType name="Confirmed"> <restriction base="ekamscom:JavaBoolean"/> </simpleType> <simpleType name="CSV"> <!-- Comma Separated Variable --> <restriction base="string"/> </simpleType> <simpleType name="DetectionLimit"> <restriction base="decimal"> <totalDigits value="18"/> <fractionDigits value="6"/> </restriction> </simpleType> <simpleType name="ExceptionCode"> <restriction base="integer"></restriction> </simpleType> <simpleType name="ExceptionDesc"> <restriction base="string"> <minLength value="1"/> <maxLength value="400"/> </restriction> </simpleType> <simpleType name="ExceptionSeverity"> <restriction base="string"> <minLength value="1"/> <maxLength value="1"/> </restriction> </simpleType> <simpleType name="ExternalReference"> <restriction base="string"> <minLength value="1"/> <maxLength value="20"/> </restriction> </simpleType> <simpleType name="FileName"> <restriction base="string"> <minLength value="1"/> <maxLength value="80"/> </restriction> </simpleType> <simpleType name="Function"> <restriction base="string"> <minLength value="1"/> <maxLength value="8"/> </restriction> </simpleType> <simpleType name="IncludeGeometricMean"> <restriction base="ekamscom:JavaBoolean"/> </simpleType> <simpleType name="Iterator"> <restriction base="integer"></restriction> </simpleType> <simpleType name="JavaBoolean"> <!-- This type implemented to avoid mismatch between XML and JAVA boolean types. XML boolean has valid values 'true', 'false', 0, 1 Java boolean has valid values 'true', 'false' --> <restriction base="boolean"> <pattern value="true|false"/> </restriction> </simpleType> <simpleType name="LaboratoryComments"> <restriction base="string"> <minLength value="1"/> <maxLength value="200"/> <whiteSpace value="preserve"></whiteSpace> </restriction> </simpleType> <simpleType name="LaboratoryMethod"> <restriction base="string"> <minLength value="1"/> <maxLength value="8"/> </restriction> </simpleType> <simpleType name="LessThanDetectionLimit"> <restriction base="ekamscom:JavaBoolean"/> </simpleType> <simpleType name="LIMSNumber"> <restriction base="string"> <minLength value="1"/> <maxLength value="20"/> </restriction> </simpleType> <simpleType name="MeasurementComments"> <restriction base="string"> <minLength value="1"/> <maxLength value="200"/> <whiteSpace value="preserve"></whiteSpace> </restriction> </simpleType> <simpleType name="MeasurementSeq"> <restriction base="integer"></restriction> </simpleType> <simpleType name="MeasurementUnit"> <restriction base="string"> <minLength value="1"/> <maxLength value="15"/> </restriction> </simpleType> <simpleType name="ProgrammeCode"> <restriction base="string"> <minLength value="1"/> <maxLength value="6"/> </restriction> </simpleType> <simpleType name="ProgrammeName"> <restriction base="string"> <minLength value="1"/> <maxLength value="80"/> </restriction> </simpleType> <simpleType name="ReceivedDate"> <restriction base="date"></restriction> </simpleType> <simpleType name="Region"> <restriction base="string"> <minLength value="1"/> <maxLength value="2"/> </restriction> </simpleType> <simpleType name="ReportingDate"> <restriction base="date"></restriction> </simpleType> <simpleType name="ReportingTime"> <restriction base="time"></restriction> </simpleType> <simpleType name="ResultValue"> <restriction base="decimal"> <totalDigits value="18"/> <fractionDigits value="6"/> </restriction> </simpleType> <simpleType name="ReturnCode"> <restriction base="integer"></restriction> </simpleType> <simpleType name="SampleDay"> <restriction base="integer"> </restriction> </simpleType> <simpleType name="SampleSeq"> <restriction base="integer"></restriction> </simpleType> <simpleType name="SamplingDate"> <restriction base="date"></restriction> </simpleType> <simpleType name="SamplingDateTime"> <restriction base="dateTime"></restriction> </simpleType> <simpleType name="SamplingPurposeCode"> <restriction base="string"> <minLength value="1"/> <maxLength value="2"/> </restriction> </simpleType> <simpleType name="SamplingMethodCode"> <restriction base="string"> <minLength value="1"/> <maxLength value="2"/> </restriction> </simpleType> <simpleType name="SamplingPointID"> <restriction base="string"> <minLength value="1"/> <maxLength value="6"/> </restriction> </simpleType> <simpleType name="SamplingTime"> <restriction base="time"></restriction> </simpleType> <simpleType name="ServiceProviderCode"> <restriction base="string"> <minLength value="1"/> <maxLength value="6"/> </restriction> </simpleType> <simpleType name="STPCode"> <restriction base="string"> <minLength value="1"/> <maxLength value="6"/> </restriction> </simpleType> <simpleType name="STPName"> <restriction base="string"> <minLength value="1"/> <maxLength value="60"/> </restriction> </simpleType> <simpleType name="TransmissionCount"> <restriction base="integer"></restriction> </simpleType> <complexType name="TransmissionException"> <sequence> <element name="ExceptionCode" type="ekamscom:ExceptionCode" /> <element name="ExceptionSeverity" type="ekamscom:ExceptionSeverity" /> <element name="ExceptionDesc" type="ekamscom:ExceptionDesc" /> </sequence> </complexType> <simpleType name="TransmissionSeq"> <restriction base="integer"></restriction> </simpleType> <simpleType name="TransmissionStatus"> <restriction base="string"> <minLength value="1"/> <maxLength value="2"/> </restriction> </simpleType> <complexType name="TransmissionSummary"> <sequence> <element name="TransmissionSeq" type="ekamscom:TransmissionSeq" /> <element name="ReceivedDate" type="ekamscom:ReceivedDate" /> <element name="FileName" type="ekamscom:FileName" /> <element name="TransmissionStatus" type="ekamscom:TransmissionStatus" /> </sequence> </complexType> <simpleType name="UnscheduledSamplingReason" > <restriction base="string"> <minLength value="1"/> <maxLength value="200"/> <whiteSpace value="preserve"></whiteSpace> </restriction> </simpleType> <simpleType name="UserId"> <restriction base="string"> <minLength value="1"/> <maxLength value="8"/> </restriction> </simpleType> <simpleType name="WildCard"> <restriction base="string"><!-- Wild Card --> <enumeration value="*"/> </restriction> </simpleType> </schema> ************************ End of Description ************************* --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
