logo       


RE: Locator info for a net.sf.saxon.trans.DynamicError: msg#00149

Subject: RE: Locator info for a net.sf.saxon.trans.DynamicError
> I'm using Saxon 8.4.
> 
> Processing one of my documents throws this:
> 
> net.sf.saxon.trans.DynamicError: A sequence of more than one 
> item is not
> allowed as the first argument of fn:substring()
> 
> Is there any way to retrieve locator information from this 
> Error (wrapped
> as a SAXException), e.g. the line of the instruction in my XSLT that
> causes this?

DynamicError is derived from the JAXP class TransformerException, which
offers a getLocator() method providing location information. Your error
handler needs to cater for the possibility that there won't be any location
information, but this is unusual.

> 
> I'm quite sure that I have correctly attached an ErrorListener to a
> net.sf.saxon.TransformerFactoryImpl(), and ErrorHandler objects to the
> XMLReader objects I use.
> 

The important thing is to attach an ErrorListener to the JAXP Transformer
object. The ErrorListener nomintated to the TransformerFactory is used only
at compile time, and the ErrorHandler nominated to the XMLReader is used
only by the XML parser, not by the XSLT processor. (However, an XSLT
exception will often find its way to the parser's ErrorHandler, wrapped up
inside a SAXException).

Michael Kay
http://www.saxonica.com/




-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe