|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Schema reporting tools - XQuery use case?Xia Li xli at galdosinc.comWed Sep 9 11:54:05 PDT 2009
As a typical use case, schema information is frequently used to process
GML(Geography Markup Language) instance data. Mostly, the schema
querying part is done with the help of Xerces-J XML schema processing
library in Java. But I do think it is quite useful to have the same
thing done in XML processing language directly instead of having to call
external functions. Ideally, it is best done in XQuery processors and
XPath 2 spec does provide some functions to retrieve schema information.
However, the problem is it is not widely supported feature, and there
barely open source XPath processors that support such functionalities. I
developed an XSLT function library to query schema information. It
essentially contains functions to retrieve a type definition for a given
element.
http://www.ibm.com/developerworks/library/x-schemanode/
It is a much more intriguing programming experience to do this in XSLT
than in Java and I think it can be equally done in XQuery as well.
Lisa
-----Original Message-----
From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On
Behalf Of Hans-Juergen Rennau
Sent: Tuesday, September 08, 2009 11:15 PM
To: http://x-query.com/mailman/listinfo/talk
Cc: http://x-query.com/mailman/listinfo/talk
Subject: Schema reporting tools - XQuery use case?
Hello People,
XQuery is _the_ language for agile and efficient evaluation of XML
resources (who would contradict me?). But there is another important
technology, of course, XML Schema: though its use is often reduced to
document validation or data binding, schemas offer a great wealth of
static information about (valid) documents. I am sometimes amazed how
merrily this information is ignored, especially in projects that have to
deal with very complex schemas.
Unfortunately, schemas are difficult to read and, worse, difficult to
use as input for further processing, as the schema language allows to
express the (essentially) same information in so many ways, what with
model groups, attribute sets, type derivations, etc. Example: some
configuration contains a data path, and one has the appropriate schema
files available - how can one implement an automatic check of the path
string against that schema?
In consequence, I believe creating "schema reporting" tools may be an
important use case for XQuery.Here, schema reporting is understood as
transforming schema files into a different serialized representation of
all or some information the schema contains. (I am _not_ thinking of
graphical representations as offered by XML IDEs unless they are
accompanied by serialized versions appropriate to serve as input for
further processing.) Some examples were: a tree representation of
document structure, a list of valid data paths, a mapping of element and
attribute names to the governing type, a mapping of type names to data
paths.
Well - would anyone like to comment on the statement about such schema
reporting being an important use case for XQuery?
In this context it is of course important to know what is already
available (commercial or open source). Would anyone like to speak about
available schema reporting tools (in the sense defined above)?
Thank you very much,
with kind regards -
Hans-Juergen Rennau
_______________________________________________
http://x-query.com/mailman/listinfo/talk
http://x-query.com/mailman/listinfo/talk
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






