Can't import XML schema with ref to external namespace

In TopLink 10.1.3 Dev Preview 3 (build 041116), I have 2 simple schema files. One defines an element as a ref to an element in the other schema, so the ref points to an element in an external namespace. TopLink won't import this schema.
First schema, imports fine:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   targetNamespace="http://www.oracle.com/employee"
   xmlns="http://www.oracle.com/employee"
   elementFormDefault="qualified"
   attributeFormDefault="unqualified">
     <xs:element name="employee">
       <xs:complexType>
         <xs:sequence>
                <xs:element name="name" type="xs:string"/>
         </xs:sequence>
       </xs:complexType>
     </xs:element>
</xs:schema>
Second schema, fails import with "ERROR: null. Please check to ensure the document conforms to the XML Schema specification and try again":
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   targetNamespace="http://www.oracle.com/department"
   xmlns="http://www.oracle.com/department"
   xmlns:employee="http://www.oracle.com/employee"
   elementFormDefault="qualified"
   attributeFormDefault="unqualified">
   <xs:import
     namespace="http://www.oracle.com/employee"
         schemaLocation="employee.xsd"/>
   <xs:element name="department">
     <xs:complexType>
       <xs:sequence>
         <xs:element ref="employee:employee"         maxOccurs="unbounded"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
</xs:schema>
Both schemas are valid according to the W3C schema validation checker at http://www.w3.org/2001/03/webdata/xsv.
I can work around the issue by putting the employee definitions into the department schema file so that all elements are in the same namespace. But I would like the schemas to be in separate files for better modularity and maintainability.
Am I doing something wrong? I would really like to be able to use references to external namespaces in my element definitions.
Thanks,
Dave

Hello David,
Apologies, but this is a bug in DP3 with respect to references to elements in imported namespaces. This has been fixed in current code, but until you get that, there are a couple ways to work around it:
==========================================================
1) Use an include rather than an import.
department.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
    targetNamespace="http://www.oracle.com/department"
    xmlns="http://www.oracle.com/department"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">
   <xs:include schemaLocation="employee.xsd"/>
   <xs:element name="department">
      <xs:complexType>
         <xs:sequence>
            <xs:element ref="employee" maxOccurs="unbounded"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
</xs:schema>employee.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oracle.com/department"
    xmlns="http://www.oracle.com/department"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">
   <xs:element name="employee">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="name" type="xs:string"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
</xs:schema>You should only have to import the parent schema (i.e. department.xsd), as the included document will automatically be built in. Note that this works for imports as well, provided that there aren't nasty bugs blocking the process.
==========================================================
2. Build everything into the same document
department.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
    targetNamespace="http://www.oracle.com/department"
    xmlns="http://www.oracle.com/department"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">
   <xs:element name="department">
      <xs:complexType>
         <xs:sequence>
            <xs:element ref="employee" maxOccurs="unbounded"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
   <xs:element name="employee">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="name" type="xs:string"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
</xs:schema>Obviously, this one won't work quite as well in some cases.
==========================================================
Until you can get to the latest code, I hope this helps some.
- Paul

Similar Messages

  • Problem with XML import MDM 7.1 - Can't generate Xml Schema

    Hi All,
    When I try to open an XML file using Import manager, I'm getting some errors, as detailed below. I mention that I'm using MDM 7.1.
    The first error I received was the following:
    "Can't open C:/Program files/SAP MDM 7.1/Import Manager/XSD.exe". I copied the file xsd.exe in the Import Manager folder, as suggest here:
    Re: Import Manager Error.
    Afterwards, I received a new error:
    "Can't generate Xml Schema for: C:/Program files/SAP MDM 7.1/Import Manager/filename.xml"
    If anyone has faced the same problem - and solved it -, could you please help me find the reason for this behaviour?
    Regards,
    Laura

    Hi Laura,
    The error message "Can't generate Xml Schema"  might be related to DTD. the XML file has a directive for loading DTD.
    MDM doesnot support DTDs.
    Remove the DTD line and make sure there is only one root element in the XML file and try again.
    Hope this helps,
    Bes t Regards,
    Silpa Chillakuru

  • RuleAuthor : error importing XML Schemas into Data Model

    Hi,
    I have problems during import XML Schema in my Data Model.
    I'm following these steps:
    1) Click Definitions tab;
    2) Click XMLFact;
    3) Click Create
    4) I enter the path for the schema and the directory to store JAXB-generated classes. In this directory every user has all permission (777).
    In the next step when I click on "Add Shemas" I have this error:
    java.io.IOException: Not enough space at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:53) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:451) at java.lang.Runtime.exec(Runtime.java:591) at java.lang.Runtime.exec(Runtime.java:429) at java.lang.Runtime.exec(Runtime.java:326) at oracle.rules.sdk.datamodel.impl.DataModelUtil.compileJavaFile(DataModelUtil.java:479) at oracle.rules.sdk.datamodel.DataModelManager.addXMLSchemaPath(DataModelManager.java:984) at oracle.rules.sdk.mapper.RuleObjectHelper.addSchemapath(RuleObjectHelper.java:2759) at oracle.rules.ra.uix.mvc.SchemaSelectorEH.addSchema(SchemaSelectorEH.java:138) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at oracle.rules.ra.uix.mvc.BeanEH.genericHandleEvent(BeanEH.java:869) at oracle.rules.ra.uix.mvc.BeanEH.handleEvent(BeanEH.java:838) at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source) at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source) at oracle.cabo.servlet.event.BasePageFlowEngine.handleRequest(Unknown Source) at oracle.cabo.servlet.AbstractPageBroker.handleRequest(Unknown Source) at oracle.cabo.servlet.ui.BaseUIPageBroker.handleRequest(Unknown Source) at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source) at oracle.cabo.servlet.UIXServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
    I cannot find the solution!
    Can someone help me?
    Thanks.

    Do you still have enough disk space available on your file system to store the different xml-facts the RuleAuthor will create for you?

  • Explain about xml schema with example

    Hi,
    Kindly anybody explain about xml schema with example?
    With Regards,
    L.rajesh

    Maybe this is what you are looking for ??? If not give us more info...
    Re: How it work?

  • Can a contract be created with ref to PO,bid inv and bid

    hi friends
    we know that po can refer to a contract , can a contract be created with ref to po, bid inv and bid
    Regards
    Vinny

    Vinny,
    PO can be created with reference to a bid (Response of a Bid Invitation). Even contracts is also possible here.
    Then ragarding can a contract be created with ref to po -> No.....
    Regards
    Kathirvel

  • I am having problems importing some CDs into iTunes on a laptop with Windows 8. Most CDs import without problem. The ones I can't import can be imported into iTunes with Windows 7. Does anybody know why this problem is occurring?

    I am having problems importing some CDs into iTunes on a laptop with Windows 8. Most CDs import without problem. The ones I can't import can be imported into iTunes with Windows 7. Does anybody know why this problem is occurring?

    First-off, this seems to be a general problem with 10.4 (across all the operating systems of which I am aware).  Unfortunately, I cannot provide a permanent solution but, if you need a quick fix, this will (hopefully) work for you.
    For some inexplicable reason, iTunes no longer recognises standard Windows paths.  For example:
    Y:\Music\Buddy Holly\Buddy Holly - Rave On.mp3
    The end result is that it will import a playlist with no content. 
    It will, however, recognise the equivalent Apple paths which look like this:
    file://localhost/Y:/Buddy Holly/Buddy Holly - Rave On.mp3
    It is possible to convert your existing playlists using a few basic replace commands in something like Notepad.  In my case, I made some code changes in my music manager and now generate two sets of playslists (one standard and one to accommodate iTunes).
    Forgive me foir stating the obvious but please remember to make sure that the disk / path containing your music is accessible when doing the import otherwise you will probably get a blank result.  Note that you can do a bulk import by selecting all the (revised) playlists and dragging them onto the iTunes sidebar.
    I am sorry that this is not a "clean" solution but it will work if you are in a bind.  The only alternative of which I am aware is to wait for Apple to fix the problem.

  • How can I import my music CD from an external drive (other PC) via LAN?

    How can I import my music CD from an external drive (other PC) via LAN?
    I have tried by "add..." but without success.

    Hello DIRP,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iTunes: About the Add to Library, Import, and Convert functions
    http://support.apple.com/kb/ht1347
    Best of luck,
    Mario

  • Good morning to all of you I have A mac and I did the mistake of upgrading my Lightroom 5.4 to 5.6 Now I can't import anything it says "Could not find namespace: AgCreativeCloudUtils" Could anyone help me resolve this problem?  Should I uninstall the prog

    Good morning to all of you
    I have A mac and I did the mistake of upgrading my Lightroom 5.4 to 5.6 Now I can't import anything it says "Could not find namespace: AgCreativeCloudUtils"
    Could anyone help me resolve this problem?
    Should I uninstall the program and reinstall it
    Thank you so much

    I asked because an awful lot of people have recently been confused between downloading the Cloud and the perpetual versions of Lr - although I'm not automatically assuming your'e guilty of this - and can't understand why their serial no won't unlock their new software.
    If the wrong version has been installed, then it must be uninstalled and the right one downloaded.

  • V18 : can't import multiple articles with sidecar.xml ?

    Hello,
    I have successfully upgraged to v18 (tools and folio panel).
    Now, I can't import multiple articles if there's a sidecar.xml file.
    If I remove the sidecar, it works.
    Do you experiment this problem ?
    Thanks

    Here's an example of a faulty sidecar.xml
    <?xml version="1.0" encoding="UTF-8" standalone="true" ?>
    <sidecar>
              <!--
    sidecar.xml generator by Johannes Henseler
    http://projects.nordsueddesign.de/sidecarxml
    -->
              <!-- article #0 -->
              <entry>
                        <folderName>couv</folderName>
                        <articleTitle>Couverture</articleTitle>
                        <author></author>
                        <kicker></kicker>
                        <description></description>
                        <tags></tags>
                        <isAd>false</isAd>
                        <smoothScrolling>never</smoothScrolling>
                        <isFlattenedStack>false</isFlattenedStack>
              </entry>
              <!-- article #1 -->
              <entry>
                        <folderName>intro</folderName>
                        <articleTitle>Introduction</articleTitle>
                        <author></author>
                        <kicker></kicker>
                        <description></description>
                        <tags></tags>
                        <isAd>false</isAd>
                        <smoothScrolling>never</smoothScrolling>
                        <isFlattenedStack>false</isFlattenedStack>
              </entry>
              <!-- article #2 -->
              <entry>
                        <folderName>sommaire</folderName>
                        <articleTitle>Sommaire</articleTitle>
                        <author></author>
                        <kicker></kicker>
                        <description></description>
                        <tags></tags>
                        <isAd>false</isAd>
                        <smoothScrolling>never</smoothScrolling>
                        <isFlattenedStack>false</isFlattenedStack>
              </entry>
              <!-- article #3 -->
              <entry>
                        <folderName>pubTV</folderName>
                        <articleTitle>Pub:TV</articleTitle>
                        <author></author>
                        <kicker></kicker>
                        <description></description>
                        <tags></tags>
                        <isAd>false</isAd>
                        <smoothScrolling>never</smoothScrolling>
                        <isFlattenedStack>false</isFlattenedStack>
              </entry>
    </sidecar>

  • Does Oracle support "imported" XML schemas

    Hi,
    Does Oracle support XML schemas that import other XML schemas. If so, are there any known problems ?
    Thanks
    John

    I have the same problem:
    A huge and complex .xsd-schema with several include and import statements can't be registered (all referenced documents exist in the repository):
    DBMS_XMLSCHEMA.REGISTERSCHEMA(
    schemaURL => 'http://www.toxinfo.org/namespaces/2004/05/Rosetta#ProtocolEmil',
    schemaDoc => xdbURIType('/ProtocolEmil.xsd').getClob(),
    local => TRUE,
    genTypes => TRUE,
    genBean => FALSE,
    genTables => TRUE
    causes an Error at the first import:
    ERROR at line 1:
    ORA-31000: Resource 'RosettaSimpleTypeCollection.xsd' is not an XDB schema
    document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 17
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at line 2
    Editing the schema is not an option for me. Any ideas?
    Thanks!
    Tillmann Cordes

  • Can I use a schema with no targetnamespace with the file adapter?

    I am loading a file using a file adapter configured to use an xsd from a third party, the third party controls the xsd and incoming xml and does not have a targetnamespace defined in the xsd or xml.
    When I define a file adapter for it the wizard indicates that I need to fix the xsd by adding a namespace. I dont have control over the xsd or xml as they are an external party.
    I think I can hand edit the wsdl and change the import statement that requires a namespace to an include statement with no namespace.
    Have you run into this before? Will that work?
    Thanks,
    John

    Hi John,
    Did we get any solution for this ?
    Even in our case, the third party controls the xsd & incoming xml message. Both does not have a targetnamespace defined. The file adapter wizard indicates that we need to fix the xsd by adding a namespace. As a workaround, we manually added the target namespace to xsd and created file adapater. Now the question is how do we automatically add the name space in xml message as well, so that it can be parsed by BPEL process
    thanks
    Yj

  • Can't import XML data into my databse-connected PDF form

    Hi  All
    Excellent forum, and thanks for all the revealing insights so far viewed, however one question.I'm using a PDF form to collect info via email in the format of XML datafiles. I also have an identical PDF which has database connectivity and that works fine. It was suggested on this forum that I could then import the XML data into my Database via the DB-connected PDF, in effect a user form and one with DB connectivity. Now, I've checked the data types and they all match, but when I import XML file, it creates a blank record in the database and none of the information is carried through. Please could someone offer guidance on what I'm doing wrong, I've been trying to figure this out for a week now?
    Thanks
    Steppe

    Maybe it's because I'm replying by email, so I'll try the forums directly;
    </script>
                </event>
                <assist>
                   <toolTip>Click to delete the current record fromthe database</toolTip>
                   <speak priority="toolTip"/>
                </assist>
             </field>
             <field name="Decam_Done" y="44.45mm" x="165.1mm" w="28.575mm" h="13.707mm">
                <ui>
                   <textEdit>
                      <border>
                         <?templateDesigner StyleID aped3?>
                         <edge stroke="lowered"/>
                      </border>
                      <margin/>
                   </textEdit>
                </ui>
                <font typeface="Myriad Pro"/>
                <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
                <para vAlign="middle"/>
                <caption reserve="4.2353mm" placement="top">
                   <font typeface="Myriad Pro"/>
                   <para vAlign="middle"/>
                   <value>
                      <text>Decam_ Done</text>
                   </value>
                </caption>
                <border>
                   <edge/>
                   <corner thickness="0.175mm" join="round" radius="2mm"/>
                </border>
                <bind match="dataRef" ref="$.Decam_Done"/>
                <validate nullTest="error"/>
             </field>
             <?templateDesigner expand 1?></subform>
          <proto/>
          <desc>
             <text name="version">8.2.1.3144.1.471865.466429</text>
          </desc>
          <?templateDesigner expand 1?></subform>
       <?templateDesigner DefaultLanguage FormCalc?>
       <?templateDesigner DefaultRunAt client?>
       <?acrobat JavaScript strictScoping?>
       <?templateDesigner Grid show:0, snap:1, units:0, color:ff8080, origin:(0,0), interval:(125000,125000)?>
       <?templateDesigner FormTargetVersion 26?>
       <?templateDesigner Zoom 75?>
       <?templateDesigner Rulers horizontal:1, vertical:1, guidelines:1, crosshairs:0?>
       <?templateDesigner SaveTaggedPDF 1?>
       <?templateDesigner SavePDFWithEmbedded

  • Can't import XML from Premiere CS6 to Final Cut Pro X?

    Hi,
    I've been using Premier CS6 but I have downloaded the trail of FCPX and wan't to give that a try on my mac. I have edited the video in Premiere CS6 and exported it with the "Final cut pro xml" feature in AP CS6. I've exported the map containing the videofiles, the XML actually everything!
    But the FCPX won't let me select the XML when I try to use the import "XML". What am I doing wrong? Don't get any error messages since I can't even select the XML file.
    Thank you very much in advance, looking forward to try the FCPX!

    Nothing the XML export from Premiere is for legacy versions of FCP not for FCPX.

  • How to load an XML schema with Data Integrator ?

    Post Author: Kris Van Belle
    CA Forum: Data Integration
    Is someone having experience with loading data from a regular table into an XML schema ?
    What are exactly the steps to undertake ? The DI user manual does not provide that much information...

    Post Author: bhofmans
    CA Forum: Data Integration
    Hi Kris,
    In the Designer.pdf there is a chapter called 'nested data' with more information, but you can also check this website with some detailed instructions and examples on how to build a nested relational data model (NRDM).
    http://www.consulting-accounting.com/time/servlet/ShowPage?COMPANYID=43&ELEMENTID=161
    (Thanks to Werner Daehn for putting this together).

  • Resolve xml namespace while importing xml schema

    Hi All,
    I am using ALSB 2.6 on windows platform. I have created a xml schema resource in a project folder. XML schema resource location is "/ANUP/TEST/SCHEMA". The target namespace for this schema is "http://test/schema/audit/properties.xsd". The XML schema file name is Properties.xsd.
    I want to import this schema structure into an xquery which is the in project folder "/ANUP/TEST". My statement in xquery is:
    xquery version "1.0";
    import schema namespace ns6="http://test/schema/audit/properties.xsd" at "/ANUP/TEST/SCHEMA/Properties.xsd";
    declare function getCustomer() as element(ns6:dummyParent){
    let $anup := "anup"
    return <ns6:dummyParent>
    <ns6:dummy1>anup</ns6:dummy1>
    <ns6:dummy2>tripathi</ns6:dummy2 >
    <ns6:dummy3>anup</ns6:dummy3>
    </ns6:dummyParent>
    getCustomer()
    When I try to save this xquery, I get the error ::
    An error occurred compiling the XQuery resource: line ##, column ##: {err}FODC0002: Error retrieving resource "/ANUP/TEST/SCHEMA/Properties.xsd": {1}.
    I tried to change the values instead of "/ANUP/TEST/SCHEMA/Properties.xsd" in import schema namespace statement and found out that if I put Properties.xsd in "C:\ANUP\TEST\SCHEMA", it works.
    Can somebody tell me how can I change this clause after "at" keyword so that I can browse to the XMl schema which has been imported into ALSB and part of project folder?
    Thanks:
    Anup

    I have the same is issue in Oracle OSB 11g. Does anyone have any idea how to import an xml-schema inside an XQuery, when the schema is present in the OSB-project (and not on filesystem or hosted on some URL).
    import schema namespace ns="http://someNamespace.com" at "/path/to/schema/in/OSB/schema.xsd";
    The above format gives the error "An error occurred compiling the XQuery resource: line ##, column ##: {err}FODC0002: Error retrieving resource"

Maybe you are looking for

  • How do I install bootcamp drivers windows 8 (mainly trackpad)

    I installed windows 8 conumer preview using bootcamp.  I download the drivers to my flash drive, but when i try to install them it says I need a computer running windows 7.  I tried running in compatibility mode the way many people say to for install

  • InDesign CC slow

    Why is InDesign CC working so slow? The slowest version ever. I have worked with InDesign since the

  • Resizing a photo for printing

    I am trying to resize a photo for printing to a 8x10 as it still crops off the top and bottom when printing. I took this with my D3100. How can I do this? I have tried printing several times.

  • Unit of Messure issue

    Hi, All, I have a question on Unit Messure. What happened if Unit of Messure in General View is different the Unit of Messure in Purchasing View in Material Master Data? Can I change Unit of Messure in Purchase Order? Then do a goods receipt in diffe

  • RE: Forte Versus PowerBuilder

    Hi, Though I didn't have the experience, I would like to add to this issue that, Forte and Powerbuilder are two very different softwares. Forte, in particular, is both your IDE and Production Management System. Powerbuilder is just an IDE. Forte is t