Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: pattern facet implementations

From: "Shlomo Yona" <S.Yona@--.--->
To: "Michael Kay" <mike@--------.--->, <xmlschema-dev@--.--->
Date: 9/23/2007 2:17:00 PM
Thank you.

I=92ll check it out.

Can you share your experience with the performance of the two/three =
regular expression engines that you listed (JDK1.4, JDK1.5 and .NET) on =
the same set of regular expression given a similar data-set for =
matching/non-matching text?

 

Thanks.

 

Shlomo

 

________________________________

From: Michael Kay [mailto:mike@s...] 
Sent: =E0 23 =F1=F4=E8=EE=E1=F8 2007 20:56
To: Shlomo Yona; xmlschema-dev@w...
Subject: RE: pattern facet implementations

 

Saxon has an internal API that you could use to test patterns against =
strings without creating complete schemas and instance documents.

 

Essentially:

 

import net.sf.saxon.java.JRegularExpression;

 

JRegularExpression regex = new JRegularExpression("[A-Z]", false, 0);

if (regex.matches("A")) ...

 

Internally Saxon is translating the schema-syntax regex into either JDK =
1.4 or JDK 1.5 regex syntax, and then using the JDK regex engine =
underneath. The translators are derived from code written and published =
by James Clark, fairly substantially modified. The 1.4 and 1.5 versions =
differ because JDK 1.5 changed "." to match a surrogate pair rather than =
matching each half of a surrogate pair.

 

This should work in Saxon-B, there's no need to install the schema-aware =
product. (That's because the same code is also used to support XPath 2.0 =
regular expression handling).

 

It's probably also possible, but not quite so easy, to access the =
corresponding methods on Saxon's .NET product, which use the Microsoft =
.NET regular expression engine as the target. 

 

It's possible that other schema processors are using the combination of =
James Clark's translation routines with the JDK regex engine; but there =
are still going to be significant differences between the =
implementations.

 

Michael Kay

	 

=09
________________________________


	From: xmlschema-dev-request@w... =
[mailto:xmlschema-dev-request@w...] On Behalf Of Shlomo Yona
	Sent: 23 September 2007 19:15
	To: xmlschema-dev@w...
	Subject: pattern facet implementations

	Hello,

	 

	Are there implementations of xsd:pattern facet available as stand-alone =
or as a modular component that can be integrated into a test environment =
or a schema processor?

	 

	I=92d like to run tests on a pattern facet implementation and cross =
reference the results with other implementations of this schema feature =
for functionality and performance.

	 

	Also, are there XML Schema processors that use the same =93engines=94 =
for patterns? I=92d rather test against different implementations rather =
than the same one.

	 

	Thanks.

	 

	Shlomo.



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent