Bugs item #27438, was opened at 2009-11-15 22:18
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27438&group_id=494

Category: General
Group: None
Status: Open
>Resolution: Accepted
Priority: 3
Submitted By: Sudhindra K (sudhi312)
>Assigned to: Charlie Savage (cfis)
Summary: libxml-ruby-1.1.3 - Schema validation for schema containing xs:any

Initial Comment:
Hi,

I cannot get the schema validation working for a schema containing <xs:any 
namespace="##other" /> . From the forum I cam to know that this is a known 
limitation, considering that this is so frequently used by schema developers 
can this be fixed?

My question to forum and the reply -- 

---------- Forwarded message ----------
From: Darko Miletic <da...@uvcms.com>
Date: Wed, Nov 11, 2009 at 6:50 PM
Subject: Re: [xml] Regarding LibXML Schema validation
To: Sudhindra Kulkarni <kulkarni.su...@gmail.com>
Cc: x...@gnome.org




Sudhindra Kulkarni wrote:


Hi,

I have a problem validating a xml generated from a schema which contains an 
element having <xs:any namespace="##other" />. When I try to include a element 
from another schema I get an error

"No matching global element declaration available but demanded by the strict 
wildcard"


This is a limitation of libxml. You must have all declarations from all schemas 
in one file. So if your xml file uses 6 schemas in order to validate them in 
libxml you must create new schema that includes all 6 separate schemas and than 
use that xsd for validation. Something like this:

<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns    ="http://dummy.libxml2.validator";
  targetNamespace ="http://dummy.libxml2.validator";
  xmlns:xs        ="http://www.w3.org/2001/XMLSchema";
  xmlns:xsi       ="http://www.w3.org/2001/XMLSchema-instance";
  xmlns:<somenamespace>     ="<namespaceurl>"
  xmlns:<somenamespace2>     ="<namespaceurl2>"
  xmlns:<somenamespace3>     ="<namespaceurl3>"

  version="1.0"
  elementFormDefault  ="qualified"
  attributeFormDefault="unqualified"     >
    <xs:import namespace ="<namespaceurl>" schemaLocation = "<schema location>" 
                    />
  <xs:import namespace ="<namespaceurl2>" schemaLocation = "<schema location2>" 
                    />
  <xs:import namespace ="<namespaceurl3>" schemaLocation = "<schema location3>" 
                    />

</xs:schema>



--------------

Regards,
Sudhindra

----------------------------------------------------------------------

>Comment By: Charlie Savage (cfis)
Date: 2011-04-22 23:50

Message:
Hi Sudhindra,

Do you still want us to look into this issue?

Thanks - Charlie

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27438&group_id=494
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to