Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(103) |
Aug
(139) |
Sep
(120) |
Oct
(108) |
Nov
(83) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(124) |
Feb
(94) |
Mar
(66) |
Apr
(71) |
May
(94) |
Jun
(71) |
Jul
(155) |
Aug
(96) |
Sep
(64) |
Oct
(73) |
Nov
(79) |
Dec
(53) |
2003 |
Jan
(82) |
Feb
(76) |
Mar
(98) |
Apr
(142) |
May
(133) |
Jun
(120) |
Jul
(72) |
Aug
(136) |
Sep
(169) |
Oct
(113) |
Nov
(149) |
Dec
(76) |
2004 |
Jan
(120) |
Feb
(195) |
Mar
(215) |
Apr
(171) |
May
(189) |
Jun
(221) |
Jul
(107) |
Aug
(107) |
Sep
(94) |
Oct
(145) |
Nov
(116) |
Dec
(198) |
2005 |
Jan
(153) |
Feb
(163) |
Mar
(164) |
Apr
(157) |
May
(134) |
Jun
(173) |
Jul
(63) |
Aug
(175) |
Sep
(136) |
Oct
(150) |
Nov
(192) |
Dec
(99) |
2006 |
Jan
(94) |
Feb
(109) |
Mar
(191) |
Apr
(146) |
May
(184) |
Jun
(160) |
Jul
(128) |
Aug
(206) |
Sep
(123) |
Oct
(133) |
Nov
(204) |
Dec
(103) |
2007 |
Jan
(304) |
Feb
(191) |
Mar
(281) |
Apr
(127) |
May
(102) |
Jun
(147) |
Jul
(153) |
Aug
(156) |
Sep
(52) |
Oct
(119) |
Nov
(138) |
Dec
(128) |
2008 |
Jan
(214) |
Feb
(151) |
Mar
(221) |
Apr
(146) |
May
(192) |
Jun
(93) |
Jul
(270) |
Aug
(127) |
Sep
(161) |
Oct
(110) |
Nov
(189) |
Dec
(142) |
2009 |
Jan
(123) |
Feb
(136) |
Mar
(139) |
Apr
(138) |
May
(90) |
Jun
(74) |
Jul
(77) |
Aug
(159) |
Sep
(95) |
Oct
(154) |
Nov
(131) |
Dec
(120) |
2010 |
Jan
(118) |
Feb
(148) |
Mar
(208) |
Apr
(100) |
May
(99) |
Jun
(129) |
Jul
(115) |
Aug
(72) |
Sep
(124) |
Oct
(133) |
Nov
(64) |
Dec
(101) |
2011 |
Jan
(104) |
Feb
(125) |
Mar
(107) |
Apr
(59) |
May
(56) |
Jun
(115) |
Jul
(86) |
Aug
(126) |
Sep
(100) |
Oct
(98) |
Nov
(112) |
Dec
(129) |
2012 |
Jan
(110) |
Feb
(124) |
Mar
(150) |
Apr
(96) |
May
(80) |
Jun
(103) |
Jul
(35) |
Aug
(89) |
Sep
(97) |
Oct
(54) |
Nov
(58) |
Dec
(95) |
2013 |
Jan
(106) |
Feb
(108) |
Mar
(81) |
Apr
(100) |
May
(122) |
Jun
(93) |
Jul
(77) |
Aug
(73) |
Sep
(166) |
Oct
(88) |
Nov
(61) |
Dec
(142) |
2014 |
Jan
(110) |
Feb
(98) |
Mar
(63) |
Apr
(47) |
May
(73) |
Jun
(103) |
Jul
(81) |
Aug
(30) |
Sep
(65) |
Oct
(92) |
Nov
(47) |
Dec
(69) |
2015 |
Jan
(63) |
Feb
(48) |
Mar
(31) |
Apr
(42) |
May
(30) |
Jun
(80) |
Jul
(38) |
Aug
(3) |
Sep
(43) |
Oct
(56) |
Nov
(43) |
Dec
(51) |
2016 |
Jan
(33) |
Feb
(27) |
Mar
(22) |
Apr
(63) |
May
(16) |
Jun
(19) |
Jul
(28) |
Aug
(66) |
Sep
(58) |
Oct
(61) |
Nov
(80) |
Dec
(33) |
2017 |
Jan
(8) |
Feb
(41) |
Mar
(36) |
Apr
(26) |
May
(22) |
Jun
(28) |
Jul
(21) |
Aug
(34) |
Sep
(19) |
Oct
(23) |
Nov
(18) |
Dec
(3) |
2018 |
Jan
(25) |
Feb
(36) |
Mar
(36) |
Apr
(21) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
(5) |
3
|
4
(4) |
5
(13) |
6
(4) |
7
(4) |
8
(11) |
9
(13) |
10
|
11
(1) |
12
(6) |
13
(5) |
14
(11) |
15
(4) |
16
|
17
(5) |
18
(5) |
19
(7) |
20
|
21
(2) |
22
|
23
|
24
|
25
(10) |
26
(8) |
27
(2) |
28
(3) |
29
(2) |
30
|
31
(2) |
|
|
|
|
|
|
From: Michael Kay <mike@sa...> - 2008-08-31 22:05:14
|
I strongly suspect this is caused by this known bug: http://sourceforge.net/tracker/index.php?func=detail&aid=2024143&group_id=29 872&atid=397617 Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: saxon-help-bounces@... > [mailto:saxon-help-bounces@...] On Behalf > Of Ed Davies > Sent: 31 August 2008 22:28 > To: saxon-help@... > Subject: [saxon] Unexpected XTTE0570: Required item type of value > > When I run this stylesheet: > > <?xml version="1.0" encoding="utf-8"?> > > <xsl:stylesheet > version="2.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:template name="some-template"> > <blah/> > </xsl:template> > > <xsl:template name="start"> > > <xsl:variable name="xxx"> > <some-element/> > </xsl:variable> > > <xsl:variable name="var" as="element(blah)*"> > <xsl:call-template name="some-template"/> > </xsl:variable> > > <blib> > <xsl:sequence select="$var"/> > </blib> > > <xsl:text>X</xsl:text> > > </xsl:template> > > </xsl:stylesheet> > > originally with SaxonB Java 8.9.0.2 but now with 9.1.0.1: > > $ saxon -it:start ts.xsl > > I get the error message: > > > Error on line 25 of ts.xsl: > > XTTE0570: Required item type of value of variable $var is > element(blah, xs:anyType); > > supplied value has item type text() > > Transformation failed: Run-time errors were reported > > Line 25 is the <xsl:text>X</xsl:text> element. > > I'd assume I'd made some sort of stupid XSLT error except > that when I change the select attribute's value in the > xsl:sequence element to be <count($var)> instead of just > <$var> I get output <<blib>1</blib>X> (with an XML > declaration) as expected and, more interestingly, if I > instead change the OccurrenceIndicator in the 'as' attribute > of $var's declaration to <+> or <?> or omit it completely the > stylesheet works and produces an XML declaration followed by > <<blib><blah/></blib>X>, again as expected. > > Adding the <-explain> switch to the command line produces > output which appears to me to be sensible. In all the cases > which work there's a checkCardinality wrapped around treat > element containing the callTemplate though this is, > not-unreasonably, not present with the <*> Occurrence- Indicator. > > This is, of course, a very cut-down version of the original > failing stylesheet. In particular, the original has an > <xsl:output ... indent="yes"> and the final text element > generated a new-line so as to not have the final close tag of > the result left with the command prompt straight after it in > the case where output is sent to the console. > (Enhancement request on this might follow soon ;-) > > Sorry if this is a general XSLT question (i.e., my mistake) > but from where I'm looking it seems like more than 50% likely > it's a Saxon problem. > > Ed. > > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge Build the coolest Linux based > applications with Moblin SDK & win great prizes Grand prize > is a trip for two to an Open Source event anywhere in the > world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at > http://saxon.markmail.org/ saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Ed Davies <saxh.dh.200703@ed...> - 2008-08-31 21:27:49
|
When I run this stylesheet: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template name="some-template"> <blah/> </xsl:template> <xsl:template name="start"> <xsl:variable name="xxx"> <some-element/> </xsl:variable> <xsl:variable name="var" as="element(blah)*"> <xsl:call-template name="some-template"/> </xsl:variable> <blib> <xsl:sequence select="$var"/> </blib> <xsl:text>X</xsl:text> </xsl:template> </xsl:stylesheet> originally with SaxonB Java 8.9.0.2 but now with 9.1.0.1: $ saxon -it:start ts.xsl I get the error message: > Error on line 25 of ts.xsl: > XTTE0570: Required item type of value of variable $var is element(blah, xs:anyType); > supplied value has item type text() > Transformation failed: Run-time errors were reported Line 25 is the <xsl:text>X</xsl:text> element. I'd assume I'd made some sort of stupid XSLT error except that when I change the select attribute's value in the xsl:sequence element to be «count($var)» instead of just «$var» I get output «<blib>1</blib>X» (with an XML declaration) as expected and, more interestingly, if I instead change the OccurrenceIndicator in the 'as' attribute of $var's declaration to «+» or «?» or omit it completely the stylesheet works and produces an XML declaration followed by «<blib><blah/></blib>X», again as expected. Adding the «-explain» switch to the command line produces output which appears to me to be sensible. In all the cases which work there's a checkCardinality wrapped around treat element containing the callTemplate though this is, not-unreasonably, not present with the «*» Occurrence- Indicator. This is, of course, a very cut-down version of the original failing stylesheet. In particular, the original has an <xsl:output ... indent="yes"> and the final text element generated a new-line so as to not have the final close tag of the result left with the command prompt straight after it in the case where output is sent to the console. (Enhancement request on this might follow soon ;-) Sorry if this is a general XSLT question (i.e., my mistake) but from where I'm looking it seems like more than 50% likely it's a Saxon problem. Ed. |
From: Andrew Welch <andrew.j.welch@gm...> - 2008-08-29 16:03:16
|
> When I used the sample code I get a > error message "net.sf.saxon.trans.XPathException: whitespace required" Do you have an error code to go with it? Try running the transformation from the command line (or using Kernow!) to see if the problem is with the xml/xslt... you should also get a more complete error message. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ |
From: David H. Trang <davidhtrang@gm...> - 2008-08-29 14:35:45
|
Hi guys, I really need some help with this. I'm new to PHP and XSLT Parsers and I am trying to get this working. I was looking at php.net to find a parser for PHP5 and came across Saxon and found some sample code there also (below). When I installed Java Bridge and Saxon I started to play around with the parser, parsing the books.xml and books.xsl through the command line and it worked fine. What I needed was to have something working in PHP5 so I could do it through a website. When I used the sample code I get a error message "net.sf.saxon.trans.XPathException: whitespace required" which I don't understand what that means but I have localized it to this line "$oTransFormer->transform($oXmlSource, $oResultStream);" is there a way to get better error messages or does anyone know why this is happening? Any help would be much appreciated. Thanks! Directory where the jar files are located define("SAXON_DIR", $_SERVER['DOCUMENT_ROOT']."/saxonb8.9.0/"); include the jars java_require(SAXON_DIR." saxon8.jar;".SAXON_DIR."saxon8-dom.jar"); $sXslFile = $_SERVER['DOCUMENT_ROOT']."/myfirst.xsl"; The xsl file $sXmlFile = $_SERVER['DOCUMENT_ROOT']."/myfirst.xml"; The xml file try { $oXslSource = new java("javax.xml.transform.stream.StreamSource", "file:".$sXslFile); $oXmlSource = new java("javax.xml.transform.stream.StreamSource", "file:".$sXmlFile); $oFeatureKeys = new JavaClass("net.sf.saxon.FeatureKeys"); Create the Factory $oTransformerFactory = new java("net.sf.saxon.TransformerFactoryImpl"); Disable source document validation $oTransformerFactory->setAttribute($oFeatureKeys->SCHEMA_VALIDATION, 4); Create a new Transformer $oTransFormer = $oTransformerFactory->newTransformer($oXslSource); Create a StreamResult to store the output $oResultStringWriter = new java("java.io.StringWriter"); $oResultStream = new java("javax.xml.transform.stream.StreamResult", $oResultStringWriter); Transform $oTransFormer->transform($oXmlSource, $oResultStream); Echo the output from the transformation echo java_cast($oResultStringWriter->toString(), "string"); } catch(JavaException $e){ echo java_cast($e->getCause()->toString(), "string"); exit; } |
From: Vallone, Philip Mr CTR USA AMC <Philip.Vallone@us...> - 2008-08-28 15:33:36
|
Thanks Michael, I will use the s9api - much better :) Phil -----Original Message----- From: saxon-help-bounces@... [mailto:saxon-help-bounces@...] On Behalf Of Michael Kay Sent: Thursday, August 28, 2008 10:36 AM To: 'Mailing list for the SAXON XSLT and XQuery processor' Subject: Re: [saxon] Help with Java Error Listener In JAXP, compile-time errors are notified to the ErrorListener associated with the TransformerFactory. Only run-time errors go to the Transformer's ErrorListener (because the Transformer only comes into being when compilation is complete). This has drawbacks if the TransformerFactory is used to do many compilations. If you use s9api, you can collect the errors for each compilation separately. Michael Kay http://www.saxonica.com/ > -----Original Messagde----- > From: saxon-help-bounces@... > [mailto:saxon-help-bounces@...] On Behalf Of > Vallone, Philip Mr CTR USA AMC > Sent: 28 August 2008 15:29 > To: Mailing list for the SAXON XSLT and XQuery processor > Subject: [saxon] Help with Java Error Listener > > Hi, > > I am using Saxon 9.1.0.1, in a swing app. I created a method to > transform an xml file, but having trouble gathering any errors with an > ErrorListener. The following code returns any stylesheet compiling > errors to system.out, but I want to return the errors in an ArrayList. > What am I missing? > > public class xsltFunctions { > > public static ArrayList simpleTransformer(String XML, String > outputFile, String XSLT) { > final ArrayList errorList = new ArrayList(); > try { > // Set transformer to SAXON > > System.setProperty("javax.xml.transform.TransformerFactory", > "net.sf.saxon.TransformerFactoryImpl"); > // Set up input documents > Source inputXML = new StreamSource(new File(XML)); > Source inputXSL = new StreamSource(new File(XSLT)); > > // Set up output sink > StreamResult outputXHTML = new StreamResult(new > File(outputFile)); > > // Setup a factory for transforms > TransformerFactory factory = > TransformerFactory.newInstance(); > > // Precompile the XSL into a Templates object > Templates templates = factory.newTemplates(inputXSL); > > // Get a Transformer from the Templates > Transformer transformer = templates.newTransformer(); > ErrorListener listener = new ErrorListener() { > > public void error(TransformerException > exception) throws TransformerException { > errorList.add(exception); > } > > public void fatalError(TransformerException > exception) throws TransformerException { > errorList.add(exception); > throw exception; > } > > public void warning(TransformerException > exception) throws TransformerException { > errorList.add(exception); > } > }; > System.out.println("There were " + errorList.size() + " > errors."); > transformer.setErrorListener(listener); > > // Perform the transformation > transformer.transform(inputXML, outputXHTML); > > return errorList; > > } catch (TransformerConfigurationException e) { > > errorList.add("The underlying XSL processor " + > "does not support the requested features.\n" + > e.getMessage()); > > return errorList; > > } catch (TransformerException e) { > > errorList.add("Error occurred obtaining " + > "XSL processor.\n" + e.getMessage()); > > return errorList; > > } finally { > > return errorList; > } > } > > Phil > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge Build the coolest Linux based applications with Moblin SDK & > win great prizes Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at > http://saxon.markmail.org/ saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Michael Kay <mike@sa...> - 2008-08-28 14:35:48
|
In JAXP, compile-time errors are notified to the ErrorListener associated with the TransformerFactory. Only run-time errors go to the Transformer's ErrorListener (because the Transformer only comes into being when compilation is complete). This has drawbacks if the TransformerFactory is used to do many compilations. If you use s9api, you can collect the errors for each compilation separately. Michael Kay http://www.saxonica.com/ > -----Original Messagde----- > From: saxon-help-bounces@... > [mailto:saxon-help-bounces@...] On Behalf > Of Vallone, Philip Mr CTR USA AMC > Sent: 28 August 2008 15:29 > To: Mailing list for the SAXON XSLT and XQuery processor > Subject: [saxon] Help with Java Error Listener > > Hi, > > I am using Saxon 9.1.0.1, in a swing app. I created a method > to transform an xml file, but having trouble gathering any > errors with an ErrorListener. The following code returns any > stylesheet compiling errors to system.out, but I want to > return the errors in an ArrayList. > What am I missing? > > public class xsltFunctions { > > public static ArrayList simpleTransformer(String XML, > String outputFile, String XSLT) { > final ArrayList errorList = new ArrayList(); > try { > // Set transformer to SAXON > > System.setProperty("javax.xml.transform.TransformerFactory", > "net.sf.saxon.TransformerFactoryImpl"); > // Set up input documents > Source inputXML = new StreamSource(new File(XML)); > Source inputXSL = new StreamSource(new File(XSLT)); > > // Set up output sink > StreamResult outputXHTML = new StreamResult(new > File(outputFile)); > > // Setup a factory for transforms > TransformerFactory factory = > TransformerFactory.newInstance(); > > // Precompile the XSL into a Templates object > Templates templates = factory.newTemplates(inputXSL); > > // Get a Transformer from the Templates > Transformer transformer = templates.newTransformer(); > ErrorListener listener = new ErrorListener() { > > public void error(TransformerException > exception) throws TransformerException { > errorList.add(exception); > } > > public void fatalError(TransformerException > exception) throws TransformerException { > errorList.add(exception); > throw exception; > } > > public void warning(TransformerException > exception) throws TransformerException { > errorList.add(exception); > } > }; > System.out.println("There were " + errorList.size() + " > errors."); > transformer.setErrorListener(listener); > > // Perform the transformation > transformer.transform(inputXML, outputXHTML); > > return errorList; > > } catch (TransformerConfigurationException e) { > > errorList.add("The underlying XSL processor " + > "does not support the requested > features.\n" + e.getMessage()); > > return errorList; > > } catch (TransformerException e) { > > errorList.add("Error occurred obtaining " + > "XSL processor.\n" + e.getMessage()); > > return errorList; > > } finally { > > return errorList; > } > } > > Phil > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge Build the coolest Linux based > applications with Moblin SDK & win great prizes Grand prize > is a trip for two to an Open Source event anywhere in the > world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at > http://saxon.markmail.org/ saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Vallone, Philip Mr CTR USA AMC <Philip.Vallone@us...> - 2008-08-28 14:30:45
|
Hi, I am using Saxon 9.1.0.1, in a swing app. I created a method to transform an xml file, but having trouble gathering any errors with an ErrorListener. The following code returns any stylesheet compiling errors to system.out, but I want to return the errors in an ArrayList. What am I missing? public class xsltFunctions { public static ArrayList simpleTransformer(String XML, String outputFile, String XSLT) { final ArrayList errorList = new ArrayList(); try { // Set transformer to SAXON System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl"); // Set up input documents Source inputXML = new StreamSource(new File(XML)); Source inputXSL = new StreamSource(new File(XSLT)); // Set up output sink StreamResult outputXHTML = new StreamResult(new File(outputFile)); // Setup a factory for transforms TransformerFactory factory = TransformerFactory.newInstance(); // Precompile the XSL into a Templates object Templates templates = factory.newTemplates(inputXSL); // Get a Transformer from the Templates Transformer transformer = templates.newTransformer(); ErrorListener listener = new ErrorListener() { public void error(TransformerException exception) throws TransformerException { errorList.add(exception); } public void fatalError(TransformerException exception) throws TransformerException { errorList.add(exception); throw exception; } public void warning(TransformerException exception) throws TransformerException { errorList.add(exception); } }; System.out.println("There were " + errorList.size() + " errors."); transformer.setErrorListener(listener); // Perform the transformation transformer.transform(inputXML, outputXHTML); return errorList; } catch (TransformerConfigurationException e) { errorList.add("The underlying XSL processor " + "does not support the requested features.\n" + e.getMessage()); return errorList; } catch (TransformerException e) { errorList.add("Error occurred obtaining " + "XSL processor.\n" + e.getMessage()); return errorList; } finally { return errorList; } } Phil |
From: Florent Georges <lists@fg...> - 2008-08-27 08:26:40
|
Michael Kay wrote: > This does indeed fail in 9.0.0.1, but it succeeds in 9.0.0.7 and > in 9.1.0.1, so it's clearly a bug that's been fixed. Please > upgrade! > Sorry for the delay in responding, I'm now dealing with the > backlog of things that built up during my vacation. No problem, we've figured that out with Andrew. My fault to not have checked I run the very last version before reporting. Welcome back to work! Regards, --drkm _____________________________________________________________________________ Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr |
From: <matsuhashi@qu...> - 2008-08-27 07:29:34
|
Yes, I will look at this in a few days. MATSUHASHI,kazuaki from Japn "Michael Kay" <mike@... 宛先 ica.com> "'Mailing list for the SAXON XSLT and 送信者: XQuery processor'" saxon-help- <saxon-help@...> bounces@... cc ts.sourcefo rge.net 件名 [saxon] Kanji numbering - request for help 2008/08/27 05:36 Mailing list for the SAXON XSLT and XQuery processor <saxon-help @lists.sour ceforge.net > へ 返信してく ださい Over on the Saxon forum (apologies to those of you who will have seen it there) a user has reported that Saxon is getting numbering using Kanji digits wrong - see https://sourceforge.net/forum/message.php?msg_id=5197982 I'm very reluctant to make changes in this kind of area without advice from a native user of the numbering scheme in question; I'm all too aware of the amount of out-of-date information that non-local "experts" have sometimes picked up from 19th century reference books. Any volunteers please? Michael Kay http://www.saxonica.com/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Michael Kay <mike@sa...> - 2008-08-26 20:53:24
|
This does indeed fail in 9.0.0.1, but it succeeds in 9.0.0.7 and in 9.1.0.1, so it's clearly a bug that's been fixed. Please upgrade! Sorry for the delay in responding, I'm now dealing with the backlog of things that built up during my vacation. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: saxon-help-bounces@... > [mailto:saxon-help-bounces@...] On Behalf > Of Florent Georges > Sent: 12 August 2008 21:42 > To: Saxon Help SF list > Subject: [saxon] Tunnel parameter not passing through next-match? > > Hi, > > I found something strange regarding tunnel parameters. It > seems like a bug at first glance. Here is a test case (to > apply to itself): > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; > xmlns:xs="http://www.w3.org/2001/XMLSchema"; > version="2.0"> > > <xsl:template match="/"> > <xsl:apply-templates select="*"> > <xsl:with-param name="t" select="'v" tunnel="yes"/> > </xsl:apply-templates> > </xsl:template> > > <xsl:template match="xsl:stylesheet"> > <xsl:apply-templates select="*"> > <xsl:with-param name="p" select="'value'"/> > </xsl:apply-templates> > </xsl:template> > > <xsl:template match="xsl:template" priority="10"> > <xsl:param name="p" as="xs:string"/> > <xsl:next-match> > <xsl:with-param name="p" select="$p"/> > </xsl:next-match> > </xsl:template> > > <xsl:template match="xsl:template"> > <xsl:param name="p" as="xs:string"/> > <xsl:param name="t" as="xs:string" tunnel="yes"/> > </xsl:template> > > </xsl:stylesheet> > > When running with 9.0.0.1J, I get the following error: > > Error at xsl:param on line 25 of tunnel.xsl: > XTDE0610: A value must be supplied for the parameter > because the default value is not a valid instance of > the required type > In evaluation of variable gg:gg23191477 at line 26 > of tunnel.xsl > In template at line 24 in tunnel.xsl > In template at line 17 in tunnel.xsl > Applied from line 12 of tunnel.xsl > In template at line 11 in tunnel.xsl > Applied from line 6 of tunnel.xsl > In template at line 5 in tunnel.xsl > Called from external application > Transformation failed: Run-time errors were reported > > It seems to be related to the presence of an intermediary > template rule passing additional (not tunnel) parameter, to > another intermediary template rule forwarding this parameter > via a next-match. > > It seems then that the last template rule accepting both > parameters (regular and tunnel) doesn't see the tunnel > parameter passed by the initial apply-templates. > > Did I miss something obvious? > > Regards, > > --drkm > > > > > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________ > _______________ > Envoyez avec Yahoo! Mail. Une boite mail plus intelligente > http://mail.yahoo.fr > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge Build the coolest Linux based > applications with Moblin SDK & win great prizes Grand prize > is a trip for two to an Open Source event anywhere in the > world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at > http://saxon.markmail.org/ saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Michael Kay <mike@sa...> - 2008-08-26 20:36:42
|
Over on the Saxon forum (apologies to those of you who will have seen it there) a user has reported that Saxon is getting numbering using Kanji digits wrong - see https://sourceforge.net/forum/message.php?msg_id=5197982 I'm very reluctant to make changes in this kind of area without advice from a native user of the numbering scheme in question; I'm all too aware of the amount of out-of-date information that non-local "experts" have sometimes picked up from 19th century reference books. Any volunteers please? Michael Kay http://www.saxonica.com/ |
From: Florent Georges <lists@fg...> - 2008-08-26 14:39:30
|
Michael Kay wrote: > Now that I'm back from vacation, I'm hoping to put together a > maintenance release that collects together the patches issued > so far for 9.1. Ok, I can live with that: I did use correctly the API and I just have to wait for a new release :-) Thank you for the quick response, as usual, --drkm _____________________________________________________________________________ Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr |
From: Michael Kay <mike@sa...> - 2008-08-26 14:09:58
|
> > Do you have plans for XQuery Update to support other > representations besides LinkedTree? I'm specifically > interested in DOM support. No plans as such. DOM is pretty messy to do because of things like multiple adjacent text nodes. Perhaps there is a customer who wants it enough to pay for the development? Michael Kay http://www.saxonica.com/ |
From: Ivan Toshkov <ivan@to...> - 2008-08-26 13:56:11
|
Hi, Michael. Do you have plans for XQuery Update to support other representations besides LinkedTree? I'm specifically interested in DOM support. Cheers, Ivan -- "...Please don't assume Lisp is only useful for Animation and Graphics, AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor applications, Expert Systems, Finance, Intelligent Agents, Knowledge Management, Mechanical CAD, Modeling and Simulation, Natural Language, Optimization, Research, Risk Analysis, Scheduling, Telecom, and Web Authoring just because these are the only things they happened to list." -- Kent Pitman |
From: Michael Kay <mike@sa...> - 2008-08-26 13:48:59
|
This is one of the effects of the nasty bug https://sourceforge.net/tracker/index.php?func=detail&aid=2025294&group_id=2 9872&atid=397617 Now that I'm back from vacation, I'm hoping to put together a maintenance release that collects together the patches issued so far for 9.1. Perversely, the fact that 9.1 has been a lot more reliable than previous major releases has meant there has been less pressure to get a maintenance release out quickly. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: saxon-help-bounces@... > [mailto:saxon-help-bounces@...] On Behalf > Of Florent Georges > Sent: 26 August 2008 14:39 > To: Saxon Help SF list > Subject: [saxon] s9api: serializing to a file and indentation > > Hi, > > Using the s9api, I use a Serializer to a File as > Destination of an XSLT transform: > > XsltTransformer trans = ...; > Serializer serial = new Serializer(); > serial.setOutputFile(...); > trans.setDestination(serial); > > The stylesheet has an <xsl:output indent="yes"/> > instruction, but the result is not indented. Is it normal > using such a destination? What is the right way to serialize > the result of a transform into a file, with Saxon indenting > the result, using s9api? > > Regards, > > --drkm > > > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________ > _______________ > Envoyez avec Yahoo! Mail. Une boite mail plus intelligente > http://mail.yahoo.fr > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge Build the coolest Linux based > applications with Moblin SDK & win great prizes Grand prize > is a trip for two to an Open Source event anywhere in the > world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at > http://saxon.markmail.org/ saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Florent Georges <lists@fg...> - 2008-08-26 13:39:24
|
Hi, Using the s9api, I use a Serializer to a File as Destination of an XSLT transform: XsltTransformer trans = ...; Serializer serial = new Serializer(); serial.setOutputFile(...); trans.setDestination(serial); The stylesheet has an <xsl:output indent="yes"/> instruction, but the result is not indented. Is it normal using such a destination? What is the right way to serialize the result of a transform into a file, with Saxon indenting the result, using s9api? Regards, --drkm _____________________________________________________________________________ Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr |
From: Michael Kay <mike@sa...> - 2008-08-26 10:20:27
|
With your first call to buildDocument(), you supply a DOMSource that wraps a DOM Document node. In this case buildDocument() creates a wrapper around the supplied DOM, and returns a Saxon DocumentInfo that wraps the original DOM tree. With your second call to buildDocument(), you supply a DOMSource that wraps a DOM Element node. buildDocument() always returns a document node, so in this case it copies the supplied DOM tree to create a native Saxon TinyTree. The nodes in this tree are not DOM nodes, which accounts for the cast failure when you try to treat them as such. The documentation of buildDocument() could be improved to make it more clear when the supplied source is copied and when it is wrapped. Other things that may cause copying include requesting whitespace stripping or schema validation. There are various ways you could fix your code, some more radical than others. For example, you could switch to have all the logic in XQuery, rather than mixing XQuery and Java in this way; or you could switch to using the Saxon native tree representation throughout, which would hugely improve performance. Or you could switch to using the s9api interface, which I think is a bit cleaner. But assuming you want to keep the design as it is, the simplest fix is to avoid the inner call to buildDocument() and handle the wrapping of DOM nodes as Saxon nodes explicitly, so the logic becomes: public class TestXQueryDOM extends TestCase { private static final String query1 = ".//form"; private static final String query2 = ".//input"; private static final String xml = "<?xml version='1.0' encoding='UTF-8'?><form><input/><input/></form>"; public void testXQueryDOM() { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder db = factory.newDocumentBuilder(); InputSource is = new InputSource(new StringReader(xml)); org.w3c.dom.Document pageDom = db.parse(is); Configuration config = new Configuration(); StaticQueryContext staticContext = new StaticQueryContext(config); XQueryExpression findFormQuery = staticContext.compileQuery(query1); XQueryExpression findInputQuery = staticContext.compileQuery(query2); DocumentWrapper info = (DocumentWrapper)staticContext.buildDocument(new DOMSource(pageDom)); DynamicQueryContext dynamicContext = new DynamicQueryContext(config); dynamicContext.setContextItem(info); List<Node> formNodes = findFormQuery.evaluate(dynamicContext); for(Node formNode : formNodes){ dynamicContext.clearParameters(); dynamicContext.setContextItem(info.wrap(formNode)); List<Node> inputNodes = findInputQuery.evaluate(dynamicContext); for(Node inputNode : inputNodes){ System.err.println("found: " + inputNode.getLocalName()); } } } catch (Exception e) { fail(e.getMessage()); } } > -----Original Message----- > From: saxon-help-bounces@... > [mailto:saxon-help-bounces@...] On Behalf > Of Adam Jenkins > Sent: 21 August 2008 22:02 > To: saxon-help@... > Subject: [saxon] ClassCastException TinyElementImpl --> dom Node > > Hi, > > I've been using saxon (9.1.0.1) with the DOM wrapping > functionality (i.e. passing in a DOM document and getting > back a list of dom Nodes). It all works great, except if I > pass in a child node derived from a previous query. > > Specifically, I'm trying to find all the form elements in an > xhtml document, then all the input elements within that. My > first query is: > > let $doc := . > let $return-val := $doc/descendant::form return $return-val > > which I access thus: > > DocumentInfo info = staticContext.buildDocument(new > DOMSource(pageDom)); dynamicContext.setContextItem(info); > List<Node> formNodes = findFormQuery.evaluate(dynamicContext); > for(Node formNode : formNodes){ > > ...second query here > > } > > So the above works fine, the second query is: > > let $form := . > let $return-val := $form/descendant::input[@type = 'button' > or @type = 'hidden' or @type = 'image' or @type = 'submit'] > return $return-val > > and I access it thus: > > dynamicContext.clearParameters(); > info = staticContext.buildDocument(new DOMSource(formNode)); > dynamicContext.setContextItem(info); > List<Node> inputNodes = findInputQuery.evaluate(dynamicContext); > for(Node inputNode : inputNodes){ > > ...do stuff here... > > } > > Which works fine...I get back a list of matching input, but > here's the kicker, it's a List<TinyElementImpl> not a > List<Node>....so when the loop for(Node inputNode : > inputNodes) tries to do it's cast I get: > > net.sf.saxon.tinytree.TinyElementImpl cannot be cast to > org.w3c.dom.Node > > Can anyone tell me what I'm doing wrong here? > > Cheers > Adam > > > Win a MacBook Air or iPod touch with Yahoo!7. > http://au.docs.yahoo.com/homepageset > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge Build the coolest Linux based > applications with Moblin SDK & win great prizes Grand prize > is a trip for two to an Open Source event anywhere in the > world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at > http://saxon.markmail.org/ saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Michael Kay <mike@sa...> - 2008-08-25 21:47:06
|
Thanks, fixed. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: saxon-help-bounces@... > [mailto:saxon-help-bounces@...] On Behalf > Of Florent Georges > Sent: 25 August 2008 22:41 > To: Saxon Help SF list > Subject: [saxon] Doc typo > > Michael, > > I've just run into a little typo in an example at: > > http://saxonica.com/documentation/extensibility/functions/stat > icmethods.html > > The example for XQuery shows "<a .../> ... </a>" (note the extra > slash.) > > Regards, > > --drkm > > > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________ > _______________ > Envoyez avec Yahoo! Mail. Une boite mail plus intelligente > http://mail.yahoo.fr > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge Build the coolest Linux based > applications with Moblin SDK & win great prizes Grand prize > is a trip for two to an Open Source event anywhere in the > world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at > http://saxon.markmail.org/ saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Florent Georges <lists@fg...> - 2008-08-25 21:41:08
|
Michael, I've just run into a little typo in an example at: http://saxonica.com/documentation/extensibility/functions/staticmethods.html The example for XQuery shows "<a .../> ... </a>" (note the extra slash.) Regards, --drkm _____________________________________________________________________________ Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr |
From: Michael Kay <mike@sa...> - 2008-08-25 12:25:35
|
No, there's no magic answer to this one. You can get Saxon to stream the contents of a node to a SAX ContentHandler by calling copy() on the NodeInfo object, and supplying a ContentHandlerProxy as the Receiver. But you will need to supply your own implementation of XMLReader that invokes this copy() method when its parse() method is called, and put this XMLReader in the InputSource. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: saxon-help-bounces@... > [mailto:saxon-help-bounces@...] On Behalf > Of Norman Walsh > Sent: 25 August 2008 13:03 > To: saxon-help@... > Subject: [saxon] Get a node as an InputSource? > > Last time I asked a question along these lines, it was > embarrassingly obvious. Let's see if I can make a fool of > myself again :-) > > I can use node.asSource() to get an XdmNode as a Source. Is > there an equally straightforward way to get one as an > InputSource? I need to pass it to another API that only > accepts InputSources. > > Be seeing you, > norm > > -- > Norman Walsh <ndw@...> | A man can believe a considerable deal > http://nwalsh.com/ | of rubbish, and yet go about his daily > | work in a rational and cheerful > | manner.--Norman Douglas > |
From: Norman Walsh <ndw@nw...> - 2008-08-25 12:03:27
|
Last time I asked a question along these lines, it was embarrassingly obvious. Let's see if I can make a fool of myself again :-) I can use node.asSource() to get an XdmNode as a Source. Is there an equally straightforward way to get one as an InputSource? I need to pass it to another API that only accepts InputSources. Be seeing you, norm -- Norman Walsh <ndw@...> | A man can believe a considerable deal http://nwalsh.com/ | of rubbish, and yet go about his daily | work in a rational and cheerful | manner.--Norman Douglas |
From: Ivan Toshkov <ivan@to...> - 2008-08-25 11:41:08
|
Thanks for the quick response. On Mon, Aug 25, 2008 at 1:56 PM, Michael Kay <mike@...> wrote: >> >> Is net.sf.saxon.s9api.DocumentBuilder thread-safe? I >> couldn't determine by the documentation. > > I think it's thread-safe unless you supply a SchemaValidator. So the safe > answer is that it's not thread-safe, I suppose. >> >> The same for net.sf.saxon.s9api.ItemTypeFactory (specifically, the >> getExternalObject(Object) method). >> > > I think the ItemTypeFactory is completely thread-safe. > > Michael Kay > http://www.saxonica.com/ > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help > -- "...Please don't assume Lisp is only useful for Animation and Graphics, AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor applications, Expert Systems, Finance, Intelligent Agents, Knowledge Management, Mechanical CAD, Modeling and Simulation, Natural Language, Optimization, Research, Risk Analysis, Scheduling, Telecom, and Web Authoring just because these are the only things they happened to list." -- Kent Pitman |
From: Michael Kay <mike@sa...> - 2008-08-25 11:39:47
|
> Could you not subclass XPathException and fix the problem > within Saxon? I'm normally reluctant to create subclasses of another product's class in order to fix bugs in that product. It's only an appropriate strategy as an absolute last resort. Also, the only point of providing the JAXP XPath interface in Saxon is to be compatible with other JAXP XPath implementations, warts and all. Michael Kay http://www.saxonica.com/ > > On Monday 25 August 2008 11:12:07 you wrote: > > The class Throwable has > > > > public Throwable(Throwable cause) { > > fillInStackTrace(); > > detailMessage = (cause==null ? null : cause.toString()); > > this.cause = cause; > > } > > > > which in effect causes getMessage() to output the message > associated > > with the cause. However, javax.xml.xpath.XPathException has: > > > > public XPathException(Throwable cause) { > > super(); > > this.cause = cause; > > if ( cause == null ) { > > throw new NullPointerException ( "cause can't be null"); > > } > > } > > > > which does not inherit this behaviour. > > > > My initial thought was to work around this by setting both > a message > > and a cause, but javax.xml.xpath.XPathException doesn't > seem to allow > > this either. > > > > I've raised this on the JAXP expert group mailing list - > but JAXP is > > pretty inactive at the moment, so don't expect much. > > > > Michael Kay > > http://www.saxonica.com/ > > > > > -----Original Message----- > > > From: saxon-help-bounces@... > > > [mailto:saxon-help-bounces@...] On Behalf Of > > > Andrew Welch > > > Sent: 18 August 2008 10:51 > > > To: Mailing list for the SAXON XSLT and XQuery processor > > > Subject: Re: [saxon] XPathException > > > > > > 2008/8/17 John Baker <jbaker@...>: > > > > Hi, > > > > > > > > getMessage() on XPathException seems to return null, however > > > > getCause() reveals this: > > > > > > > > net.sf.saxon.trans.XPathException: XPath syntax error > at char 9 in > > > > {/newusers@...}: > > > > Unexpected token "@" beyond end of expression > > > > > > > > I vote getMessage() should return the message from the cause. > > > > > > Isn't it because a net.sf.saxon.trans.XPathException has to be > > > wrapped by a javax.xml.xpath.XPathException as that's > what required > > > by the interface... so it's the Java language designers > that would > > > need to modify getMessage() to return > > > getCause().getMessage() when it's null. > > > > > > > > > -- > > > Andrew Welch > > > http://andrewjwelch.com > > > Kernow: http://kernowforsaxon.sf.net/ > > > > > > -------------------------------------------------------------- > > > ----------- > > > This SF.Net email is sponsored by the Moblin Your Move > Developer's > > > challenge Build the coolest Linux based applications with > Moblin SDK > > > & win great prizes Grand prize is a trip for two to an > Open Source > > > event anywhere in the world > > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > _______________________________________________ > > > saxon-help mailing list archived at > > > http://saxon.markmail.org/ saxon-help@... > > > https://lists.sourceforge.net/lists/listinfo/saxon-help > > > > > ---------------------------------------------------------------------- > > --- This SF.Net email is sponsored by the Moblin Your Move > Developer's > > challenge Build the coolest Linux based applications with > Moblin SDK & > > win great prizes Grand prize is a trip for two to an Open > Source event > > anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > saxon-help mailing list archived at http://saxon.markmail.org/ > > saxon-help@... > > https://lists.sourceforge.net/lists/listinfo/saxon-help > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge Build the coolest Linux based > applications with Moblin SDK & win great prizes Grand prize > is a trip for two to an Open Source event anywhere in the > world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at > http://saxon.markmail.org/ saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Michael Kay <mike@sa...> - 2008-08-25 10:56:16
|
> > Is net.sf.saxon.s9api.DocumentBuilder thread-safe? I > couldn't determine by the documentation. I think it's thread-safe unless you supply a SchemaValidator. So the safe answer is that it's not thread-safe, I suppose. > > The same for net.sf.saxon.s9api.ItemTypeFactory (specifically, the > getExternalObject(Object) method). > I think the ItemTypeFactory is completely thread-safe. Michael Kay http://www.saxonica.com/ |
From: Ivan Toshkov <ivan@to...> - 2008-08-25 10:38:47
|
Hi, all. Is net.sf.saxon.s9api.DocumentBuilder thread-safe? I couldn't determine by the documentation. The same for net.sf.saxon.s9api.ItemTypeFactory (specifically, the getExternalObject(Object) method). Thanks, Ivan -- "...Please don't assume Lisp is only useful for Animation and Graphics, AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor applications, Expert Systems, Finance, Intelligent Agents, Knowledge Management, Mechanical CAD, Modeling and Simulation, Natural Language, Optimization, Research, Risk Analysis, Scheduling, Telecom, and Web Authoring just because these are the only things they happened to list." -- Kent Pitman |