OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] ANN: Regular Associations

[ Lists Home | Date Index | Thread Index ]

> 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/




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS