Re: [xml] Schema validity failure for valid document



On Wed, Jan 12, 2005 at 03:13:00PM +0100, Kasimier Buchcik wrote:
  nb = 3
  nbneg = 1
  values[0] = "b|http://FOO";
  values[1] = "*|*"
  values[2] = "c|http://FOO";
  values[3] = "*|http://FOO";
  
 I think such an API would allow complete analysis and report without
needing to provide extra implementation details or new strings in the 
regexp format.

Cool, adding a nbneg sounds simpler than anything else.

  okay, it's in CVS already :-)

But there is still a problem: the negated namespace wildcard is build
using two transitions: "*|http://FOO"; leading to the sink state, and
"*|*" passing all other elements through. The "*|*" would not be
distinguishable from a <any namespace="##any"/> wildcard. Maby the
build of the automaton can be changed somehow to avoid this. Hmm,
is it possible to extend the sink state detection to handle this,
i.e. to surpress the report of such a "only-way-out-of-sink" transition?

  I'm not 100% sure what you would like to be reported.

      ------ *|* -------> S1
     /
  S0
     \
      -- *|http://FOO --> S2

  S2 is the sink state. When the error is raised on S0 because 
  {http://FOO}a  is pushed you currently get
  nb = 1, nbneg = 1
  values[0] = "*|*"
  values[1] = "*|http://FOO";

What do you want instead ? 
  nb = 0
  nbneg = 1
  values[0] = "*|http://FOO";

I'm not sure the low level xmlregexp code is better at interpreting
why that construct was used, since it is specific to XMLSchemas.
Seems to me that this reduction is better done at the level which 
can make an interpretation of the transition values.

Daniel
-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]