Re: [xml] Constructing Regular Expression in libxml



On Mon, 2006-05-08 at 09:35 +0100, srivatsan s wrote:
[...]
The regx for this will be some thing like this
{ns:book} {
   BEGIN NEW STATE TO PROCESS CHILD ELEMENTS
}
{ns:Math}{ns:Science}
{
may or may not have new states here depending upon the xsd.
}

What you are describing is a finite state automaton, not a
regular expression.  They are related, but not the same.

ultimately this becomes very easy to process the xsd in any native
languages
This all depends on what you want to do with the Schema.

It sounds like you want to write an intermediate form of the schema that
would become used to generate code (e.g. C or C# or Java) that would
take a Schema Document (one or more files) and an XML document (one or
more files) and produce a type-annotated result graph?

Why is this more useful than generic Schema validation?  Is the hope
that you use fewer resources in exchange for less generality and
code that has to be recompiled when the schemas change?

Liam


-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org




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