Menu

Bad association

Cedric
2004-12-21
2013-05-01
  • Cedric

    Cedric - 2004-12-21

    I have two types of xml file which have to be validated by a XML Schema (one XML Schema dedicated to one XML file type).

    The problem is they have the  same root element and I can't change it. As  the method chercherConfig() use this root element to identify which config file must be associated with an XML file given, Jaxe is not able to match the XML file with the correct config file. The result is not really what I could expect.

    Any idea to fix it?

     
    • Damien Guillaume

      I was hoping nobody would run into this problem. As you have stated, the root element is used to find the config file, and this doesn't work in your case. I'm not sure how to fix the problem, though:
      - we could use namespaces to choose the right config file, but some XML languages don't use namespaces. Are there two different namespaces in your case ?
      - we could also add a processing instruction in the XML files, with the config file used to create them, but this is not very pretty and would not work for files that have not been created with Jaxe.

      Of course, there is always the option of asking the user, but that could be a real hassle in most cases...

       

Log in to post a comment.