I understand your point, but in my case, the DOM tree is already built with XML Beans. Also, my application apply a lot of xsl in a single xml source. I'm using xsl to write rules which performs validations in a given XML and each XSL represents a single validation rule. If I do not use the DOM I would have to parse the XML for each rule.

In that case, do you still think that it is better to use the SAX approach?

Thanks,
Gustavo

On Wed, Dec 2, 2009 at 6:07 PM, Michael Kay <mike@saxonica.com> wrote:
Line numbers aren't available in the DOM: any information about the original source file is lost long before it gets to Saxon. You will only get line numbers when you build a Saxon tree using a SAX parser. You also need to enable line numbering using the -l option on the command line, or the equivalent in the API.
 
Incidentally, you should also be aware that using a DOMSource is very inefficient, perhaps 5-10 times slower than using a native Saxon tree.

From: Gustavo de Sá Carvalho Honorato [mailto:gustavohonorato@gmail.com]
Sent: 02 December 2009 18:07

To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] Difficulties using saxon:line-number

Hi Michael,

I'm using Saxon-B as you suggested. But the returned line number by saxon:line-number was -1. I think it is because I'm using DOMSource created by XML Beans as source of XML document. There is any issue regarding this?

Thanks again,
Gustavo Honorato

On Tue, Dec 1, 2009 at 9:43 PM, Michael Kay <mike@saxonica.com> wrote:

 
Thanks again, but reimplement an already existent functionality will cost too much time for me :(. This project is part of my Master's degree and I just have a couple months to finish all this stuff and write my thesis. Is there any older version of Saxon which fits my needs without this time/money cost?

Thank you very much,
Gustavo Honorato

 
Yes, you're welcome to stick with Saxon-B 9.1 if it meets your needs. I'll stop fixing bugs in it at some stage but it will still be around.
 
Michael Kay
Saxonica 

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/saxon-help