I am converting a webservice from a MS COM+ based application to Java.  Out
public interface(s) methods are all defined with an argument of String.
That String is (or should be) a valid XML document.  What I want to do is
load this string into a DOM document (or SAX could be fine) and validate it
against a given Schema document....However my incoming document (string)
does NOT have the xsi:location attribute...What I want to do is decide at
RUN time which Schema to validate this "document" against....load the
schema, load the document and call some method to say "validate this
document against this schema"....Does such a thing exist?


thanks
Doug

example of xml document

<?xml version="1.0" encoding="UTF-8" ?>
<request xmlns="mesapi/schemas/version1.0/getsomedata" server="s" database
="d">
      � <facility_code>BF</facility_code>
      � <id_nbr>32100000999</id_nbr>
  � </request>

  Schema document...

  <?xml version="1.0" ?>
    - <xsd:schema targetNamespace="mesapi/schemas/version1.0/getsomedata"
    elementFormDefault="qualified" xmlns:src="
    mesapi/schemas/version1.0/getsomedata" xmlns:xsd="
    http://www.w3.org/2001/XMLSchema";>
      � <xsd:element name="request" type="src:requesttype" />
      - <xsd:attributeGroup name="connections">
        � <xsd:attribute name="server" type="xsd:string" use="required" />
        � <xsd:attribute name="database" type="xsd:string" use="required"
        />
    � </xsd:attributeGroup>
      - <xsd:complexType name="requesttype">
        - <xsd:sequence>
          - <xsd:element name="facility_code">
            - <xsd:simpleType>
              - <xsd:restriction base="xsd:string">
                � <xsd:maxLength value="8" />
            � </xsd:restriction>
          � </xsd:simpleType>
        � </xsd:element>
          - <xsd:element name="id_nbr">
            - <xsd:simpleType>
              - <xsd:restriction base="xsd:string">
                � <xsd:maxLength value="11" />
            � </xsd:restriction>
          � </xsd:simpleType>
        � </xsd:element>
      � </xsd:sequence>
        � <xsd:attributeGroup ref="src:connections" />
    � </xsd:complexType>
  � </xsd:schema>


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

Reply via email to