5.7 XML Compile error – no target namespace

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf 5.7 XML Compile error – no target namespace

  • Creator
    Topic
  • #51922
    Greg Eriksen
    Participant

      A co-worker had been doing some file-compare testing for our migration from 5.4 to 5.7 rev2.  When she tested an HL7-to_xml interface, there was a discrepancy in the output.

      5.4:

      http://www.w3.org/2001/XMLSchema“>

      5.7:

      This is the schema file (cir_labs.xsd):

      http://www.w3.org/2001/XMLSchema“>

       

         

           

             

               

                 

                   

                     

                       

                         

                           

                             

                               

                                 

                                   

                                   

                                   

                                   

                                   

                                 

                               

                             

                             

                             

                             

                             

                             

                             

                             

                           

                         

                       

                       

                       

                       

                     

                   

                 

                 

                 

               

             

           

         

       

      When I try to compile (not recompile) the .xsd file in 5.7, and change the Compile Options / Default Namespace setting from “None” to “Use Namespace” and specify “http://www.w3.org/2001/XMLSchema” (in quotes), it returns a compile error that says:

      “Compile command failed with status 1:

      Default Namespace could not be set because no target namespace was defined in schema cir_labs.xsd”

      So, we’ve got a schema that compiled fine with defaults under 5.4, that now doesn’t produce the same output under 5.7.  And when I try to explicitly define the default namespace, it complains that there is no target namespace.

      This is the only xml interface I had ever developed on cloverleaf, and I didn’t learn that much about xml while doing it, and have forgotten most of that.  Does anyone on the forum have an example of what sort of “target namespace” setting 5.7 seems to require in the schema file?

    Viewing 0 reply threads
    • Author
      Replies
      • #72315
        Greg Eriksen
        Participant

          Well, 28 reads and no replys.  Maybe that’s because it’s actualy a non-issue?

          It bothers me that we get different output in 5.7 vs. 5.4, but I don’t know enough about xml to say that 5.7 is not in fact more correct than 5.4.  There doesn’t seem to be a point to including that namespace declaration in output, when none of the elements in the output message are prefixed with “xs:”.  The person who is receiving the output from this interface says his side doesn’t need (ignores) the namespace declaration, so doesn’t care if it’s missing when sent from 5.7.

          I guess if the schema had defined multiple namespaces, and elements in the message were assigned to different ones, then I’d be concerned if the namespace declarations were missing from output.  But in this case, where everything in the schema belongs to a single namespace, then I guess it doesn’t matter that no namespace is defined in output.

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.