[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: ANN: Regular Associations


laptop schema
> My quick reaction is it looks like you're proposing to validate the 
> entire file to determine what schema to use for the file. Possibly many 
> times. Have I misunderstood?

I am proposing to validate it against a very small schema. Validation against
several schemas can be done concurrently, since the validation against Relax NG
is sequential, streaming process.

In the worst case, that is, with the current implementation, it takes 1 second
of processor time to determine the type of a 5 megabytes XML file that fails
to match three RNG pattern productions. Parsing alone takes 0.5 seconds. 
If parsing is performed once (and it is easy -- will be in
the next version), then it will be 0.3 seconds on a 5 megabytes file to
determine it files. Mine is 500 MHz Pentium II Toshiba laptop. Slow by
today's merits. It will be three times faster on a modern hardware.

Relax NG validation is fast. Validating the same complete XSL FO 5 megabytes
file against the full FO Relax NG schema (1590 lines -- converted from a DTD) takes
4 seconds on my computer.

All stylesheets from DocBook XSL distribution are validated against XSLT schema
in 1.2 seconds, all XSL FO stylesheets - in 0.35 seconds. 

> 
> Again at a glance, it's hard to see why you would descend into the any 
> pattern since it accepts anything. All you care about is the namespace 
> on the start element.
> 

Not exactly. In the posted example, one rule checked for the list of names
of the document element, the other -- for the namespace of it. It was done
to show how this proposal covers the cases listed in the original one.

Another pattern is for xsl stylesheets. It checks for occurence of an element
in the namespace at any place in the document.

!valid {
  default namespace xsl = "http://www.w3.org/1999/XSL/Transform"
  start = element *-xsl:* {not-xsl}
  not-xsl = (element *-xsl:* {not-xsl}|attribute * {text}|text)*
} => xslt


David Tolpin
http://davidashen.net/

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.