xsl-list
[Top] [All Lists]

Referencing Multiple Schemas via a Single Schema

2002-12-28 17:49:45
I would appreciate any advice available on the following problem I am trying to solve. I have an XSLT style sheet and have been successful transforming the source xml message to the required output format. I also validated the instance document against the schemas and the document is valid as defined below. My problem is that I have an instance document pointing to multiple Schemas and have to reference each schema in the instance document. Is there anyway I can wrap the contents of multiple schemas into once schema and reference that schema which would then import the required schemas? These schemas are all defined in their own namespaces. I find the schemaLocation attribute in my instance document a bit messy. I

aOrder.xsd --> defines the message content and imports xmlsi_common.xsd & bOrder.xsd

xmlsi_base.xsd --> defines the root, header and msg body and imports xmlsi_common.xsd & xmlsi_header.xsd

Sample of the instance document:

<?xml version="1.0"?>
<bs:AMsg xmlns:mpo="file:///c:/xerces-2_0_1/data/msg/aOrder"
        xmlns:eqo="file:///c:/xerces-2_0_1/data/msg/bOrder"
        xmlns:bs="file:///c:/xerces-2_0_1/data/msg/base"
        xmlns:com="file:///c:/xerces-2_0_1/data/msg/common"
   xmlns:hdr="file:///c:/xerces-2_0_1/data/msg/header"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

        xsi:schemaLocation="file:///c:/xerces-2_0_1/data/msg/aOrder
                                                
file:///c:/xerces-2_0_1/data/msg/aOrder/aOrder.xsd
                                                
file:///c:/xerces-2_0_1/data/msg/base
                                                
file:///c:/xerces-2_0_1/data/msg/base/xmlsi_base.xsd
                                                
file:///c:/xerces-2_0_1/data/msg/header
                                                
file:///c:/xerces-2_0_1/data/msg/header/xmlsi_header.xsd
                                                
file:///c:/xerces-2_0_1/data/msg/common
                                                
file:///c:/xerces-2_0_1/data/msg/common/xmlsi_common.xsd
                                                
file:///c:/xerces-2_0_1/data/msg/bOrder
                                                
file:///c:/xerces-2_0_1/data/msg/bOrder/bOrder.xsd">

  <bs:AHdrReq>
   <hdr:appName>SYSTEM</hdr:appName>
        <hdr:clientDt>12/06/2002</hdr:clientDt>
        <hdr:serviceName>ORDP</hdr:serviceName>
        <hdr:ReqID>123456789</hdr:ReqID>
        <hdr:proprietaryIdentification>999</hdr:proprietaryIdentification>
  </bs:AHdrReq>
  <bs:ABodyReq>
   <mpo:EQOrderReq>
         <com:processingReference>MP12345</com:processingReference>
         <com:symbol>LAK</com:symbol>
         <com:reference>SYS</com:reference>
         <com:domesticAccount>3351234520</com:domesticAccount>
         <eqo:side>Buy</eqo:side>
         <eqo:orderFunction>ORD</eqo:orderFunction>
         <eqo:userIdentifier>JDOE</eqo:userIdentifier>
        </mpo:EQOrderReq>
  </bs:ABodyReq>
</bs:AMsg>


Again, I would gladly appreciate any insight into this problem. If more info is required, please don't hesitate to ask.


Thanks
Garvin

email: garvin_franco(_at_)hotmail(_dot_)com



_________________________________________________________________
MSN 8 limited-time offer: Join now and get 3 months FREE*. http://join.msn.com/?page=dept/dialup&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_newmsn8ishere_3mf


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>