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

Saxon and ZWNJ

Subject: Saxon and ZWNJ
From: Mohsen Saboorian <mohsens@xxxxxxxxx>
Date: Mon, 10 Jun 2013 02:12:20 +0430
 Saxon and ZWNJ
Hi,
I'm trying to evaluate an XPATH expression with saxon-9.1.0.8 using
the following code snippet:

  Configuration conf = new Configuration();
  conf.setValidation(false);
  Processor p = new Processor(false);
  DocumentBuilder documentBuilder = p.newDocumentBuilder();
  XPathCompiler xpathCompiler = p.newXPathCompiler();

  XPathExecutable xpe = xpathCompiler.compile(expression);
  XPathSelector xpath = xpe.load();
  xpath.setContextItem(documentBuilder.build(new
DOMSource(cleanHtml.document)));

  XdmItem result = xpath.evaluateSingle();

The HTML is in Persian script (whose cleaned DOM is passed as
cleanHtml.document in the above code) which has ZWNJ (U+200C) not
escaped.

The matched XdmItem has ZWNJ (U+200C) (non-escaped) but when obtaining
result.getStringValue(), the result has escaped ZWNJ as (&zwnj;) which
doesn't seem to be correct because I'm getting node 'string' value.

Is this a bug, or is there any flag to disable escaping special
Unicode characters in saxon?

Regards,
Mohsen

Current Thread

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