Re: [xml] Schema validity failure for valid document



On Mon, Jan 10, 2005 at 04:47:33PM +0100, Kasimier Buchcik wrote:
Hi,

Daniel Veillard wrote:
On Mon, Jan 10, 2005 at 12:53:09PM +0100, Kasimier Buchcik wrote:

from the xmlregexp.h header soon. But special code to improve the Schemas

error reports would still be needed, Kasimier does this fit your need ?

Cool!
A namespace aware version would be needed as well.
Proposal:
xmlRegExecErrInfo2(xmlRegExecCtxtPtr exec,
  const xmlChar **string,
  const xmlChar **string2, <-- the namespace name
  int *nbval,
  xmlChar **values,
  xmlChar **values2) <-- the array of namespace names

In the case of the XML Schema engine, @string and @string2 would be
already known.


 Well, there is only one string in the regexp automata.
xmlRegExecPushString2() coalesce pairs. I'm not sure duplicating
the API is a good thing, either the info function expand coalesced
sctrings or not, but having 2 function calls sounds a bit messy to me.

OK, so I'll format the local name and the namespace on the schema side.
The problem I saw was that the regex engine formats the local name
and the namespace name, to squeeze it into one string using
xmlAutomataNewTransition2; extracting those values on the schema side
would mean that the format is no longer encapsulated in the regex
code. But if this is OK with you, I'll do it.

   yeah, if needed we can provide a public splitting function. I though
about this a bit more and I think the current API is better because one
doesn't need to make deallocation of object as the result of calling this
function, all string returned are comming directly from the regexp. If
we split one will need to deallocate the chunks produced because they
possibly don't exist in the regexp.

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]