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
(4) |
3
(5) |
4
(1) |
5
(7) |
6
(1) |
7
|
8
|
9
|
10
(6) |
11
(5) |
12
(16) |
13
(7) |
14
|
15
(2) |
16
(5) |
17
(6) |
18
(4) |
19
(9) |
20
(4) |
21
(2) |
22
(2) |
23
(1) |
24
(12) |
25
(9) |
26
(7) |
27
(2) |
28
(14) |
29
(3) |
30
|
31
|
|
|
|
|
From: Michael Kay <mike@sa...> - 2005-05-28 21:08:13
|
Sorry, but I can't reproduce this: I think it must be a problem that's system-dependent. What environment are you running on, and what symptoms suggest a "hung file handle"? How are you invoking the transformation? Does it still fail if you remove the "../../" from the href? Michael Kay http://www.saxonica.com/ _____ From: saxon-help-admin@... [mailto:saxon-help-admin@...] On Behalf Of Roger Kovack Sent: 28 May 2005 17:53 To: saxon-help@... Subject: Re: [saxon] Cannot write more than one result document to the same URI: null In this case <xsl:if test="not(@filename)"> means that nothing happens at all. But to put that concern aside, the fragement below still fails, writing content1.xml correctly; and writes content2.xml with no content and what appears to be a hung file handle.: <xsl:variable name="src"> <doc> <content filename="content1"> Content of element one </content> <content filename="content2"> Content of element two </content> </doc> </xsl:variable> <xsl:template match="/"> <xsl:for-each select="$src/doc/content"> <xsl:result-document href="../../{@filename}.xml" <mailto:../../{@filename}.xml> > <xsl:copy-of select="."/> </xsl:result-document> </xsl:for-each> </xsl:template> Roger Kovack Michael Kay wrote: Try test="not(@filename)" or test="not(@filename = '')" instead of test="@filename != ''" If there is no @filename attribute, then there is no @filename attribute whose value is not equal to "", so this test returns false. So if you have two elements with no @filename attribute, you will get two files called ".xml". Michael Kay http://www.saxonica.com/ _____ From: saxon-help-admin@... [mailto:saxon-help-admin@...] On Behalf Of Roger Kovack Sent: 28 May 2005 15:55 To: saxon-help@... Subject: Re: [saxon] Cannot write more than one result document to the same URI: null You are right about the error being dynamic. I do get 2 reports from <xsl:message> and 2 file outputs before the fatal error. However, I am not writing to the same URI in this case. I'm using an AVT in the xsl:result-document/@href attribute and every output URI is unique. It feels like the AVT isn't being evaluated to determine the error condition but is being evalutated to determine the filename. This fragment actually does write the file ../../content1.xml correctly and also *creates* a file named ../../content2.xml but it has no content and also seems to have lost a reference in Java because content2.xml cannot be deleted. That may be my fault, though. Read further down for the var $src. <xsl:for-each select="$src/doc/content"> <xsl:message>starting output <xsl:value-of select="@filename"/> </xsl:message> <xsl:if test="@filename != '' "> <xsl:result-document href="../../{@filename}.xml" <mailto:../../%7B@...%7D.xml> > <xsl:copy-of select="."/> </xsl:result-document> </xsl:if> </xsl:for-each> Roger Kovack Michael Kay wrote: This is a rule that has been in the spec for some time, but which wasn't enforced in Saxon until 8.4. In previous releases if you wrote two result documents to the same URI, the second overwrote the first (and in theory it's unpredictable which one that will be). The reason for the rule in the spec is that it's not possible to define what the effect should be, therefore it either has to be implementation-dependent or an error, and the WG decided the latter. (Don't blame me, guv!) I'm puzzled that you seem to be implying this error is reported before the transformation even starts. This is definitely a dynamic rather than a static error. Michael Kay _____ From: saxon-help-admin@... [mailto:saxon-help-admin@...] On Behalf Of Roger Kovack Sent: 27 May 2005 22:05 To: saxon-help@... Subject: [saxon] Cannot write more than one result document to the same URI: null Is this a no-side effects concern? It seems to work in Saxon8.2 but not in Saxon8.4. I'm trying to put indirection on <xsl:result-document> as follows: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; <http://www.w3.org/1999/XSL/Transform> > <xsl:variable name="src"> <doc> <content filename="content1"> Content of element one </content> <content filename="content2"> Content of element two </content> <content> <!-- @filename omitted --> Content of element with missing filename </content> </doc> </xsl:variable> <xsl:template match="/"> <xsl:for-each select="$src/doc/content"> <!-- dont try this without a filename attribute --> <xsl:if test="@filename != '' "> <xsl:result-document href="../../{@filename}.xml" <mailto:../../%7B@...%7D.xml> > <xsl:copy-of select="."/> </xsl:result-document> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> It feels like Saxon8.4 is suspicious of my attempt to write to the same result file more than once, but it hasn't even given me the chance to prove my innocence of that sin by throwing a configuration error before the transform even starts. I really do mean to obey the no side effects law although I admit I really don't think writing to the same output file is a side effect in the transform but rather a side effect in the external system. If the external system does not have side effects then all hope for transactional processing seems lost. Thanks again for Saxon!! Roger Kovack ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ saxon-help mailing list saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ saxon-help mailing list saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ saxon-help mailing list saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Andre Cusson <ac@hy...> - 2005-05-28 18:49:05
|
Hi, Thanks for the info and sorry for not looking closer at your samples. In any case, I agree that it is not much of a side effect. What I would really like is a warning instead of an error. It is quite useful to know when it would happen, especially in case of logic error, yet it may be useful to overwrite a result-document, without having to re-invoke Saxon, of course. Cheers, ac At 12:36 2005-05-28, you wrote: >Thanks for the observation, Andre. > >I wondered about that myself and aleardy did try your suggestion but got >the same results. > >As I mentioned below, it does write out the filename ../../content1.xml >and also the filename ../../content2.xml. The first output file has the >correct content but the second output file has an empty content but the >right filename. At that point it appears that Saxon throws the error >(which, in my case, starts a new stylesheet that puts the error message on >the web browser). There truly are two distinct output files created. > >I think this will end up being a mute point for me. I use >xsl:result-document to update the XML database which is a definite side >effect in the external system. I'll have to replace the >xsl:result-document with a custom Java call. I just believe that Saxon is >erroneously reporting this error but I can't complain about the spec. > >Roger Kovack > >Andre Cusson wrote: >>Hi, >> >>It seems that the curly brackets are not being processed and are taken >>literally in the AVT (so the name is the same everytime). >>I would try it as {concat('../../', @filename, '.xml')} >> >>ac |
From: Roger Kovack <pagan@so...> - 2005-05-28 16:53:21
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> In this case <tt><xsl:if test="not(@filename)"></tt> means that nothing happens at all. <br> <br> But to put that concern aside, the fragement below still fails, writing content1.xml correctly; and writes content2.xml with no content and what appears to be a hung file handle.:<br> <br> <tt><xsl:variable name="src"><br> <doc><br> <content filename="content1"><br> Content of element one<br> </content><br> <content filename="content2"><br> Content of element two<br> </content><br> </doc><br> </xsl:variable><br> <br> <xsl:template match="/"><br> <xsl:for-each select="$src/doc/content"><br> <xsl:result-document href=<a class="moz-txt-link-rfc2396E" href="mailto:../../{@filename}.xml">"../../{@filename}.xml"</a>><br> <xsl:copy-of select="."/><br> </xsl:result-document><br> </xsl:for-each><br> </xsl:template><br> </tt><br> Roger Kovack<br> <br> <br> Michael Kay wrote: <blockquote cite="midE1Dc4Ik-0001rD-B9@..." type="cite"> <title></title> <meta http-equiv="Content-Type" content="text/html; "> <meta content="MSHTML 6.00.2900.2627" name="GENERATOR"> <div align="left" dir="ltr"><span class="017403316-28052005"><font color="#0000ff" face="Arial" size="2">Try </font></span></div> <div align="left" dir="ltr"><span class="017403316-28052005"></span> </div> <div align="left" dir="ltr"><span class="017403316-28052005"><font color="#0000ff" face="Arial" size="2">test="not(@filename)"</font></span></div> <div align="left" dir="ltr"><span class="017403316-28052005"></span> </div> <div align="left" dir="ltr"><span class="017403316-28052005"><font color="#0000ff" face="Arial" size="2">or</font></span></div> <div align="left" dir="ltr"><span class="017403316-28052005"></span> </div> <div align="left" dir="ltr"><span class="017403316-28052005"><font color="#0000ff" face="Arial" size="2">test="not(@filename = '')"</font></span></div> <div align="left" dir="ltr"><span class="017403316-28052005"></span> </div> <div align="left" dir="ltr"><span class="017403316-28052005"><font color="#0000ff" face="Arial" size="2">instead of</font></span></div> <div align="left" dir="ltr"><span class="017403316-28052005"></span> </div> <div align="left" dir="ltr"><span class="017403316-28052005"><font color="#0000ff" face="Arial" size="2">test="@filename != ''"</font></span></div> <div><span class="017403316-28052005"></span> </div> <div><span class="017403316-28052005"><font color="#0000ff" face="Arial" size="2">If there is no @filename attribute, then there is no @filename attribute whose value is not equal to "", so this test returns false. So if you have two elements with no @filename attribute, you will get two files called ".xml".</font></span></div> <div><span class="017403316-28052005"></span> </div> <div><span class="017403316-28052005"><font color="#0000ff" face="Arial" size="2">Michael Kay</font></span></div> <div><span class="017403316-28052005"><font color="#0000ff" face="Arial" size="2"><a href="http://www.saxonica.com/">http://www.saxonica.com/</a></font></span></div> <div align="left" dir="ltr"><br> </div> <blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div class="OutlookMessageHeader" align="left" dir="ltr" lang="en-us"> <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b> <a class="moz-txt-link-abbreviated" href="mailto:saxon-help-admin@...">saxon-help-admin@...</a> [<a class="moz-txt-link-freetext" href="mailto:saxon-help-admin@...">mailto:saxon-help-admin@...</a>] <b>On Behalf Of </b>Roger Kovack<br> <b>Sent:</b> 28 May 2005 15:55<br> <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:saxon-help@...">saxon-help@...</a><br> <b>Subject:</b> Re: [saxon] Cannot write more than one result document to the same URI: null<br> </font><br> </div> You are right about the error being dynamic. I do get 2 reports from <xsl:message> and 2 file outputs before the fatal error. However, I am not writing to the same URI in this case. I'm using an AVT in the xsl:result-document/@href attribute and every output URI is unique. It feels like the AVT isn't being evaluated to determine the error condition but is being evalutated to determine the filename.<br> <br> This fragment actually does write the file ../../content1.xml correctly and also *creates* a file named ../../content2.xml but it has no content and also seems to have lost a reference in Java because content2.xml cannot be deleted. That may be my fault, though.<br> Read further down for the var $src.<br> <br> <tt> <xsl:for-each select="$src/doc/content"><br> <xsl:message>starting output <xsl:value-of select="@filename"/> </xsl:message><br> <xsl:if test="@filename != '' "><br> <xsl:result-document href=<a class="moz-txt-link-rfc2396E" href="mailto:../../%7B@...%7D.xml">"../../{@filename}.xml"</a>><br> <xsl:copy-of select="."/><br> </xsl:result-document><br> </xsl:if><br> </xsl:for-each><br> </tt><br> Roger Kovack<br> <br> Michael Kay wrote: <blockquote cite="midE1DbwSs-0006uj-Bz@..." type="cite"> <meta content="MSHTML 6.00.2900.2627" name="GENERATOR"> <div align="left" dir="ltr"><span class="367430908-28052005"><font color="#0000ff" face="Arial" size="2">This is a rule that has been in the spec for some time, but which wasn't enforced in Saxon until 8.4. In previous releases if you wrote two result documents to the same URI, the second overwrote the first (and in theory it's unpredictable which one that will be).</font></span></div> <div align="left" dir="ltr"><span class="367430908-28052005"></span> </div> <div align="left" dir="ltr"><span class="367430908-28052005"><font color="#0000ff" face="Arial" size="2">The reason for the rule in the spec is that it's not possible to define what the effect should be, therefore it either has to be implementation-dependent or an error, and the WG decided the latter. (Don't blame me, guv!)</font></span></div> <div align="left" dir="ltr"><span class="367430908-28052005"></span> </div> <div align="left" dir="ltr"><span class="367430908-28052005"><font color="#0000ff" face="Arial" size="2">I'm puzzled that you seem to be implying this error is reported before the transformation even starts. This is definitely a dynamic rather than a static error.</font></span></div> <div align="left" dir="ltr"><span class="367430908-28052005"></span> </div> <div align="left" dir="ltr"><span class="367430908-28052005"><font color="#0000ff" face="Arial" size="2">Michael Kay</font></span></div> <br> <blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div class="OutlookMessageHeader" align="left" dir="ltr" lang="en-us"> <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b> <a class="moz-txt-link-abbreviated" href="mailto:saxon-help-admin@...">saxon-help-admin@...</a> [<a class="moz-txt-link-freetext" href="mailto:saxon-help-admin@...">mailto:saxon-help-admin@...</a>] <b>On Behalf Of </b>Roger Kovack<br> <b>Sent:</b> 27 May 2005 22:05<br> <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:saxon-help@...">saxon-help@...</a><br> <b>Subject:</b> [saxon] Cannot write more than one result document to the same URI: null<br> </font><br> </div> Is this a no-side effects concern? It seems to work in Saxon8.2 but not in Saxon8.4.<br> <br> I'm trying to put indirection on <xsl:result-document> as follows:<br> <br> <tt><xsl:stylesheet <br> version="2.0" <br> xmlns:xsl=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/XSL/Transform">"http://www.w3.org/1999/XSL/Transform"</a>> <br> <br> <xsl:variable name="src"><br> <doc><br> <content filename="content1"><br> Content of element one<br> </content><br> <content filename="content2"><br> Content of element two<br> </content><br> <content> <!-- @filename omitted --><br> Content of element with missing filename<br> </content><br> </doc><br> </xsl:variable><br> <br> <xsl:template match="/"><br> <xsl:for-each select="$src/doc/content"><br> <!-- dont try this without a filename attribute --><br> <xsl:if test="@filename != '' "><br> <xsl:result-document href=<a class="moz-txt-link-rfc2396E" href="mailto:../../%7B@...%7D.xml">"../../{@filename}.xml"</a>><br> <xsl:copy-of select="."/><br> </xsl:result-document><br> </xsl:if><br> </xsl:for-each><br> </xsl:template><br> <br> </xsl:stylesheet><br> <br> </tt>It feels like Saxon8.4 is suspicious of my attempt to write to the same result file more than once, but it hasn't even given me the chance to prove my innocence of that sin by throwing a configuration error before the transform even starts. I really do mean to obey the no side effects law although I admit I really don't think writing to the same output file is a side effect in the transform but rather a side effect in the external system. If the external system does not have side effects then all hope for transactional processing seems lost.<br> <br> Thanks again for Saxon!!<br> Roger Kovack<br> ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit <a class="moz-txt-link-freetext" href="http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005">http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005</a> _______________________________________________ saxon-help mailing list <a class="moz-txt-link-abbreviated" href="mailto:saxon-help@...">saxon-help@...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/saxon-help">https://lists.sourceforge.net/lists/listinfo/saxon-help</a> </blockquote> </blockquote> ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit <a class="moz-txt-link-freetext" href="http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005">http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005</a> _______________________________________________ saxon-help mailing list <a class="moz-txt-link-abbreviated" href="mailto:saxon-help@...">saxon-help@...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/saxon-help">https://lists.sourceforge.net/lists/listinfo/saxon-help</a> </blockquote> </blockquote> </body> </html> |
From: Michael Kay <mike@sa...> - 2005-05-28 16:36:45
|
Try test="not(@filename)" or test="not(@filename = '')" instead of test="@filename != ''" If there is no @filename attribute, then there is no @filename attribute whose value is not equal to "", so this test returns false. So if you have two elements with no @filename attribute, you will get two files called ".xml". Michael Kay http://www.saxonica.com/ _____ From: saxon-help-admin@... [mailto:saxon-help-admin@...] On Behalf Of Roger Kovack Sent: 28 May 2005 15:55 To: saxon-help@... Subject: Re: [saxon] Cannot write more than one result document to the same URI: null You are right about the error being dynamic. I do get 2 reports from <xsl:message> and 2 file outputs before the fatal error. However, I am not writing to the same URI in this case. I'm using an AVT in the xsl:result-document/@href attribute and every output URI is unique. It feels like the AVT isn't being evaluated to determine the error condition but is being evalutated to determine the filename. This fragment actually does write the file ../../content1.xml correctly and also *creates* a file named ../../content2.xml but it has no content and also seems to have lost a reference in Java because content2.xml cannot be deleted. That may be my fault, though. Read further down for the var $src. <xsl:for-each select="$src/doc/content"> <xsl:message>starting output <xsl:value-of select="@filename"/> </xsl:message> <xsl:if test="@filename != '' "> <xsl:result-document href="../../{@filename}.xml" <mailto:../../{@filename}.xml> > <xsl:copy-of select="."/> </xsl:result-document> </xsl:if> </xsl:for-each> Roger Kovack Michael Kay wrote: This is a rule that has been in the spec for some time, but which wasn't enforced in Saxon until 8.4. In previous releases if you wrote two result documents to the same URI, the second overwrote the first (and in theory it's unpredictable which one that will be). The reason for the rule in the spec is that it's not possible to define what the effect should be, therefore it either has to be implementation-dependent or an error, and the WG decided the latter. (Don't blame me, guv!) I'm puzzled that you seem to be implying this error is reported before the transformation even starts. This is definitely a dynamic rather than a static error. Michael Kay _____ From: saxon-help-admin@... [mailto:saxon-help-admin@...] On Behalf Of Roger Kovack Sent: 27 May 2005 22:05 To: saxon-help@... Subject: [saxon] Cannot write more than one result document to the same URI: null Is this a no-side effects concern? It seems to work in Saxon8.2 but not in Saxon8.4. I'm trying to put indirection on <xsl:result-document> as follows: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; <http://www.w3.org/1999/XSL/Transform> > <xsl:variable name="src"> <doc> <content filename="content1"> Content of element one </content> <content filename="content2"> Content of element two </content> <content> <!-- @filename omitted --> Content of element with missing filename </content> </doc> </xsl:variable> <xsl:template match="/"> <xsl:for-each select="$src/doc/content"> <!-- dont try this without a filename attribute --> <xsl:if test="@filename != '' "> <xsl:result-document href="../../{@filename}.xml" <mailto:../../%7B@...%7D.xml> > <xsl:copy-of select="."/> </xsl:result-document> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> It feels like Saxon8.4 is suspicious of my attempt to write to the same result file more than once, but it hasn't even given me the chance to prove my innocence of that sin by throwing a configuration error before the transform even starts. I really do mean to obey the no side effects law although I admit I really don't think writing to the same output file is a side effect in the transform but rather a side effect in the external system. If the external system does not have side effects then all hope for transactional processing seems lost. Thanks again for Saxon!! Roger Kovack ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ saxon-help mailing list saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ saxon-help mailing list saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Roger Kovack <pagan@so...> - 2005-05-28 16:36:32
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Thanks for the observation, Andre. <br> <br> I wondered about that myself and aleardy did try your suggestion but got the same results. <br> <br> As I mentioned below, it does write out the filename ../../content1.xml and also the filename ../../content2.xml. The first output file has the correct content but the second output file has an empty content but the right filename. At that point it appears that Saxon throws the error (which, in my case, starts a new stylesheet that puts the error message on the web browser). There truly are two distinct output files created.<br> <br> I think this will end up being a mute point for me. I use xsl:result-document to update the XML database which is a definite side effect in the external system. I'll have to replace the xsl:result-document with a custom Java call. I just believe that Saxon is erroneously reporting this error but I can't complain about the spec.<br> <br> Roger Kovack<br> <br> Andre Cusson wrote: <blockquote cite="mid6.2.1.2.0.20050528121153.01e82f70@..." type="cite">Hi,<br> <br> It seems that the curly brackets are not being processed and are taken literally in the AVT (so the name is the same everytime).<br> I would try it as {concat('../../', @filename, '.xml')} <br> <br> ac<br> <br> <br> <br> <br> At 10:54 2005-05-28, you wrote:<br> <blockquote type="cite" class="cite" cite="">You are right about the error being dynamic. I do get 2 reports from <xsl:message> and 2 file outputs before the fatal error. However, I am not writing to the same URI in this case. I'm using an AVT in the xsl:result-document/@href attribute and every output URI is unique. It feels like the AVT isn't being evaluated to determine the error condition but is being evalutated to determine the filename.<br> <br> This fragment actually does write the file ../../content1.xml correctly and also *creates* a file named ../../content2.xml but it has no content and also seems to have lost a reference in Java because content2.xml cannot be deleted. That may be my fault, though.<br> Read further down for the var $src.<br> <br> <tt> <xsl:for-each select="$src/doc/content"><br> <xsl:message>starting output <xsl:value-of select="@filename"/> </xsl:message><br> <xsl:if test="@filename != '' "><br> <xsl:result-document href=<a href="mailto:../../%7B@...%7D.xml"> "../../{@filename}.xml"</a>><br> <xsl:copy-of select="."/><br> </xsl:result-document><br> </xsl:if><br> </xsl:for-each><br> </tt><br> Roger Kovack<br> <br> Michael Kay wrote: <br> <blockquote type="cite" class="cite" cite=""><font color="#0000ff" size="2"> This is a rule that has been in the spec for some time, but which wasn't enforced in Saxon until 8.4. In previous releases if you wrote two result documents to the same URI, the second overwrote the first (and in theory it's unpredictable which one that will be).<br> </font> <br> <font color="#0000ff" size="2">The reason for the rule in the spec is that it's not possible to define what the effect should be, therefore it either has to be implementation-dependent or an error, and the WG decided the latter. (Don't blame me, guv!)<br> </font> <br> <font color="#0000ff" size="2">I'm puzzled that you seem to be implying this error is reported before the transformation even starts. This is definitely a dynamic rather than a static error.<br> </font> <br> <font color="#0000ff" size="2">Michael Kay<br> </font><br> <dl> <hr><dd><font face="Tahoma" size="2">From: <a href="mailto:saxon-help-admin@...">saxon-help-admin@...</a> [<a href="mailto:saxon-help-admin@..." eudora="autourl"> mailto:saxon-help-admin@...</a>] On Behalf Of Roger Kovack<br> </font></dd> <dd><font face="Tahoma" size="2">Sent: 27 May 2005 22:05<br> </font></dd> <dd><font face="Tahoma" size="2">To: <a href="mailto:saxon-help@...">saxon-help@...</a><br> </font></dd> <dd><font face="Tahoma" size="2">Subject: [saxon] Cannot write more than one result document to the same URI: null<br> </font><br> </dd> <dd>Is this a no-side effects concern? It seems to work in Saxon8.2 but not in Saxon8.4.<br> <br> </dd> <dd>I'm trying to put indirection on <xsl:result-document> as follows:<br> <br> </dd> <dd><tt><xsl:stylesheet <br> </tt></dd> <dd><tt> version="2.0" <br> </tt></dd> <dd><tt> xmlns:xsl=<a href="http://www.w3.org/1999/XSL/Transform"; eudora="autourl"> "</a> <a class="moz-txt-link-freetext" href="http://www.w3.org/1999/XSL/Transform">http://www.w3.org/1999/XSL/Transform</a><a href="http://www.w3.org/1999/XSL/Transform"; eudora="autourl"> "</a>> <br> </tt></dd> <dd><tt> <br> </tt></dd> <dd><tt><xsl:variable name="src"><br> </tt></dd> <dd><tt> <doc><br> </tt></dd> <dd><tt> <content filename="content1"><br> </tt></dd> <dd><tt> Content of element one<br> </tt></dd> <dd><tt> </content><br> </tt></dd> <dd><tt> <content filename="content2"><br> </tt></dd> <dd><tt> Content of element two<br> </tt></dd> <dd><tt> </content><br> </tt></dd> <dd><tt> <content> <!-- @filename omitted --><br> </tt></dd> <dd><tt> Content of element with missing filename<br> </tt></dd> <dd><tt> </content><br> </tt></dd> <dd><tt> </doc><br> </tt></dd> <dd><tt></xsl:variable><br> <br> </tt></dd> <dd><tt> <xsl:template match="/"><br> </tt></dd> <dd><tt> <xsl:for-each select="$src/doc/content"><br> </tt></dd> <dd><tt> <!-- dont try this without a filename attribute --><br> </tt></dd> <dd><tt> <xsl:if test="@filename != '' "><br> </tt></dd> <dd><tt> <xsl:result-document href=<a href="mailto:../../%7B@...%7D.xml"> "../../{@filename}.xml"</a>><br> </tt></dd> <dd><tt> <xsl:copy-of select="."/><br> </tt></dd> <dd><tt> </xsl:result-document><br> </tt></dd> <dd><tt> </xsl:if><br> </tt></dd> <dd><tt> </xsl:for-each><br> </tt></dd> <dd><tt> </xsl:template><br> <br> </tt></dd> <dd><tt></xsl:stylesheet><br> <br> </tt> </dd> <dd>It feels like Saxon8.4 is suspicious of my attempt to write to the same result file more than once, but it hasn't even given me the chance to prove my innocence of that sin by throwing a configuration error before the transform even starts. I really do mean to obey the no side effects law although I admit I really don't think writing to the same output file is a side effect in the transform but rather a side effect in the external system. If the external system does not have side effects then all hope for transactional processing seems lost.<br> <br> </dd> <dd>Thanks again for Saxon!!<br> </dd> <dd>Roger Kovack<br> </dd> <dd>------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit <a href="http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005">http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005</a> _______________________________________________ saxon-help mailing list <a href="mailto:saxon-help@...">saxon-help@...</a> <a href="https://lists.sourceforge.net/lists/listinfo/saxon-help"; eudora="autourl">https://lists.sourceforge.net/lists/listinfo/saxon-help</a> <br> </dd> </dl> </blockquote> ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit <a href="http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005"; eudora="autourl">http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005</a> _______________________________________________ saxon-help mailing list <a class="moz-txt-link-abbreviated" href="mailto:saxon-help@...">saxon-help@...</a> <a href="https://lists.sourceforge.net/lists/listinfo/saxon-help"; eudora="autourl">https://lists.sourceforge.net/lists/listinfo/saxon-help</a> </blockquote> </blockquote> </body> </html> |
From: Michael Kay <mike@sa...> - 2005-05-28 16:32:28
|
It seems that the curly brackets are not being processed and are taken literally in the AVT (so the name is the same everytime). I would try it as {concat('../../', @filename, '.xml')} I don't think that can be the problem. Michael Kay |
From: Andre Cusson <ac@hy...> - 2005-05-28 16:18:38
|
Hi, It seems that the curly brackets are not being processed and are taken literally in the AVT (so the name is the same everytime). I would try it as {concat('../../', @filename, '.xml')} ac At 10:54 2005-05-28, you wrote: >You are right about the error being dynamic. I do get 2 reports from ><xsl:message> and 2 file outputs before the fatal error. However, I am not >writing to the same URI in this case. I'm using an AVT in the >xsl:result-document/@href attribute and every output URI is unique. It >feels like the AVT isn't being evaluated to determine the error condition >but is being evalutated to determine the filename. > >This fragment actually does write the file ../../content1.xml correctly >and also *creates* a file named ../../content2.xml but it has no content >and also seems to have lost a reference in Java because content2.xml >cannot be deleted. That may be my fault, though. >Read further down for the var $src. > > <xsl:for-each select="$src/doc/content"> > <xsl:message>starting output <xsl:value-of select="@filename"/> > </xsl:message> > <xsl:if test="@filename != '' "> > <xsl:result-document > href=<mailto:../../{@filename}.xml>"../../{@filename}.xml"> > <xsl:copy-of select="."/> > </xsl:result-document> > </xsl:if> > </xsl:for-each> > >Roger Kovack > >Michael Kay wrote: >>This is a rule that has been in the spec for some time, but which wasn't >>enforced in Saxon until 8.4. In previous releases if you wrote two result >>documents to the same URI, the second overwrote the first (and in theory >>it's unpredictable which one that will be). >> >>The reason for the rule in the spec is that it's not possible to define >>what the effect should be, therefore it either has to be >>implementation-dependent or an error, and the WG decided the latter. >>(Don't blame me, guv!) >> >>I'm puzzled that you seem to be implying this error is reported before >>the transformation even starts. This is definitely a dynamic rather than >>a static error. >> >>Michael Kay >> >> >>---------- >>From: >><mailto:saxon-help-admin@...>saxon-help-admin@... >>[mailto:saxon-help-admin@...] On Behalf Of Roger Kovack >>Sent: 27 May 2005 22:05 >>To: <mailto:saxon-help@...>saxon-help@... >>Subject: [saxon] Cannot write more than one result document to the same >>URI: null >> >>Is this a no-side effects concern? It seems to work in Saxon8.2 but not >>in Saxon8.4. >> >>I'm trying to put indirection on <xsl:result-document> as follows: >> >><xsl:stylesheet >> version="2.0" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> >> >><xsl:variable name="src"> >> <doc> >> <content filename="content1"> >> Content of element one >> </content> >> <content filename="content2"> >> Content of element two >> </content> >> <content> <!-- @filename omitted --> >> Content of element with missing filename >> </content> >> </doc> >></xsl:variable> >> >> <xsl:template match="/"> >> <xsl:for-each select="$src/doc/content"> >> <!-- dont try this without a filename attribute --> >> <xsl:if test="@filename != '' "> >> <xsl:result-document >> href=<mailto:../../%7B@...%7D.xml>"../../{@filename}.xml"> >> <xsl:copy-of select="."/> >> </xsl:result-document> >> </xsl:if> >> </xsl:for-each> >> </xsl:template> >> >></xsl:stylesheet> >> >>It feels like Saxon8.4 is suspicious of my attempt to write to the same >>result file more than once, but it hasn't even given me the chance to >>prove my innocence of that sin by throwing a configuration error before >>the transform even starts. I really do mean to obey the no side effects >>law although I admit I really don't think writing to the same output file >>is a side effect in the transform but rather a side effect in the >>external system. If the external system does not have side effects then >>all hope for transactional processing seems lost. >> >>Thanks again for Saxon!! >>Roger Kovack >>------------------------------------------------------- This SF.Net email >>is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - >>Create apps using Yahoo! Search APIs Find out how you can build Yahoo! >>directly into your own Applications - visit >><http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005>http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 >>_______________________________________________ saxon-help mailing list >><mailto:saxon-help@...>saxon-help@... >>https://lists.sourceforge.net/lists/listinfo/saxon-help >------------------------------------------------------- This SF.Net email >is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - >Create apps using Yahoo! Search APIs Find out how you can build Yahoo! >directly into your own Applications - visit >http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 >_______________________________________________ saxon-help mailing list >saxon-help@... >https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Roger Kovack <pagan@so...> - 2005-05-28 14:54:42
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> You are right about the error being dynamic. I do get 2 reports from <xsl:message> and 2 file outputs before the fatal error. However, I am not writing to the same URI in this case. I'm using an AVT in the xsl:result-document/@href attribute and every output URI is unique. It feels like the AVT isn't being evaluated to determine the error condition but is being evalutated to determine the filename.<br> <br> This fragment actually does write the file ../../content1.xml correctly and also *creates* a file named ../../content2.xml but it has no content and also seems to have lost a reference in Java because content2.xml cannot be deleted. That may be my fault, though.<br> Read further down for the var $src.<br> <br> <tt> <xsl:for-each select="$src/doc/content"><br> <xsl:message>starting output <xsl:value-of select="@filename"/> </xsl:message><br> <xsl:if test="@filename != '' "><br> <xsl:result-document href=<a class="moz-txt-link-rfc2396E" href="mailto:../../{@filename}.xml">"../../{@filename}.xml"</a>><br> <xsl:copy-of select="."/><br> </xsl:result-document><br> </xsl:if><br> </xsl:for-each><br> </tt><br> Roger Kovack<br> <br> Michael Kay wrote: <blockquote cite="midE1DbwSs-0006uj-Bz@..." type="cite"> <title></title> <meta http-equiv="Content-Type" content="text/html; "> <meta content="MSHTML 6.00.2900.2627" name="GENERATOR"> <div align="left" dir="ltr"><span class="367430908-28052005"><font color="#0000ff" face="Arial" size="2">This is a rule that has been in the spec for some time, but which wasn't enforced in Saxon until 8.4. In previous releases if you wrote two result documents to the same URI, the second overwrote the first (and in theory it's unpredictable which one that will be).</font></span></div> <div align="left" dir="ltr"><span class="367430908-28052005"></span> </div> <div align="left" dir="ltr"><span class="367430908-28052005"><font color="#0000ff" face="Arial" size="2">The reason for the rule in the spec is that it's not possible to define what the effect should be, therefore it either has to be implementation-dependent or an error, and the WG decided the latter. (Don't blame me, guv!)</font></span></div> <div align="left" dir="ltr"><span class="367430908-28052005"></span> </div> <div align="left" dir="ltr"><span class="367430908-28052005"><font color="#0000ff" face="Arial" size="2">I'm puzzled that you seem to be implying this error is reported before the transformation even starts. This is definitely a dynamic rather than a static error.</font></span></div> <div align="left" dir="ltr"><span class="367430908-28052005"></span> </div> <div align="left" dir="ltr"><span class="367430908-28052005"><font color="#0000ff" face="Arial" size="2">Michael Kay</font></span></div> <br> <blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div class="OutlookMessageHeader" align="left" dir="ltr" lang="en-us"> <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b> <a class="moz-txt-link-abbreviated" href="mailto:saxon-help-admin@...">saxon-help-admin@...</a> [<a class="moz-txt-link-freetext" href="mailto:saxon-help-admin@...">mailto:saxon-help-admin@...</a>] <b>On Behalf Of </b>Roger Kovack<br> <b>Sent:</b> 27 May 2005 22:05<br> <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:saxon-help@...">saxon-help@...</a><br> <b>Subject:</b> [saxon] Cannot write more than one result document to the same URI: null<br> </font><br> </div> Is this a no-side effects concern? It seems to work in Saxon8.2 but not in Saxon8.4.<br> <br> I'm trying to put indirection on <xsl:result-document> as follows:<br> <br> <tt><xsl:stylesheet <br> version="2.0" <br> xmlns:xsl=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/XSL/Transform">"http://www.w3.org/1999/XSL/Transform"</a>> <br> <br> <xsl:variable name="src"><br> <doc><br> <content filename="content1"><br> Content of element one<br> </content><br> <content filename="content2"><br> Content of element two<br> </content><br> <content> <!-- @filename omitted --><br> Content of element with missing filename<br> </content><br> </doc><br> </xsl:variable><br> <br> <xsl:template match="/"><br> <xsl:for-each select="$src/doc/content"><br> <!-- dont try this without a filename attribute --><br> <xsl:if test="@filename != '' "><br> <xsl:result-document href=<a class="moz-txt-link-rfc2396E" href="mailto:../../%7B@...%7D.xml">"../../{@filename}.xml"</a>><br> <xsl:copy-of select="."/><br> </xsl:result-document><br> </xsl:if><br> </xsl:for-each><br> </xsl:template><br> <br> </xsl:stylesheet><br> <br> </tt>It feels like Saxon8.4 is suspicious of my attempt to write to the same result file more than once, but it hasn't even given me the chance to prove my innocence of that sin by throwing a configuration error before the transform even starts. I really do mean to obey the no side effects law although I admit I really don't think writing to the same output file is a side effect in the transform but rather a side effect in the external system. If the external system does not have side effects then all hope for transactional processing seems lost.<br> <br> Thanks again for Saxon!!<br> Roger Kovack<br> ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit <a class="moz-txt-link-freetext" href="http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005">http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005</a> _______________________________________________ saxon-help mailing list <a class="moz-txt-link-abbreviated" href="mailto:saxon-help@...">saxon-help@...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/saxon-help">https://lists.sourceforge.net/lists/listinfo/saxon-help</a> </blockquote> </blockquote> </body> </html> |
From: Michael Kay <mike@sa...> - 2005-05-28 08:36:02
|
Thanks for reporting this. I think you are right: the two methods getNamedItem() and getNamedItemNS() should use NodeOverNodeInfo.wrap(att) rather than simply casting att to a Node. As you can probably guess, my testing of DOM interfaces to Saxon trees is less than complete (the reverse, Saxon interfaces to DOM trees, has improved greatly however). Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: saxon-help-admin@... > [mailto:saxon-help-admin@...] On Behalf Of > Paul Rabin > Sent: 26 May 2005 20:39 > To: saxon-help@... > Subject: [saxon] Saxon8.4 DOMAttributeMap.java > > Michael, > > In DOMAttributeMap.java, methods that return nodes don't in > every case use > wrap(); some just cast a NodeInfo to Node. Is the code > correct, or was the > change to use wrappers not quite completed? > > Paul > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > saxon-help mailing list > saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help > |
From: Michael Kay <mike@sa...> - 2005-05-28 08:29:45
|
I did think about providing access to the XPathFunctionResolver mechanism directly from the TransformerFactory, as Pier has done, but decided it was one more thing to test and maintain and the world could live without it. In many ways it's not a very satisfactory mechanism, in particular it doesn't solve the problem of mapping XPath types to Java classes so it doesn't really solve the interoperability issues. Let's hope a future JAXP can come up with something better. As you may know, XSLT 1.1 tried to solve this problem and the WG got its fingers badly burnt as a result, which is probably why everyone has been steering well clear of it since. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: saxon-help-admin@... > [mailto:saxon-help-admin@...] On Behalf Of > Pier Fumagalli > Sent: 26 May 2005 00:13 > To: saxon-help@... > Subject: Re: [saxon] Defining XPathFunctions > > On 25 May 2005, at 20:24, Alan wrote: > > > I found blog entry about extending Saxon with user defined > > methods: > > > > > http://www.betaversion.org/~pier/wiki/display/pier/Saxon+Extension > > > > I'd expected to see Saxon using XPathFunction and > > XPathFunctionResolver already. > > > > Is there a standardization of extension functions for XSLT and > > I'm not finding it? > > Nope, there isn't... That's why I wrote that page. As Michael > pointed > out correctly, the XPath API is not that great when it comes to > typing the arguments to pass to the functions, so, at the end of the > day, it's pretty useless in "slightly more complex" cases. > > He'll be able to expand on it in a much better way that I am capable > of... > > But to tell you the truth, I encountered some problems going > down the > "standards" way, and ultimately, I changed all my functions to be > proper SAXON ones, and forgot about JAXP 1.3, as it's > insufficient in > declaring how parameters should be passed from XPath/XSLT to Java. > > Pier > > |
From: Michael Kay <mike@sa...> - 2005-05-28 08:14:42
|
This is a rule that has been in the spec for some time, but which wasn't enforced in Saxon until 8.4. In previous releases if you wrote two result documents to the same URI, the second overwrote the first (and in theory it's unpredictable which one that will be). The reason for the rule in the spec is that it's not possible to define what the effect should be, therefore it either has to be implementation-dependent or an error, and the WG decided the latter. (Don't blame me, guv!) I'm puzzled that you seem to be implying this error is reported before the transformation even starts. This is definitely a dynamic rather than a static error. Michael Kay _____ From: saxon-help-admin@... [mailto:saxon-help-admin@...] On Behalf Of Roger Kovack Sent: 27 May 2005 22:05 To: saxon-help@... Subject: [saxon] Cannot write more than one result document to the same URI: null Is this a no-side effects concern? It seems to work in Saxon8.2 but not in Saxon8.4. I'm trying to put indirection on <xsl:result-document> as follows: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; <http://www.w3.org/1999/XSL/Transform> > <xsl:variable name="src"> <doc> <content filename="content1"> Content of element one </content> <content filename="content2"> Content of element two </content> <content> <!-- @filename omitted --> Content of element with missing filename </content> </doc> </xsl:variable> <xsl:template match="/"> <xsl:for-each select="$src/doc/content"> <!-- dont try this without a filename attribute --> <xsl:if test="@filename != '' "> <xsl:result-document href="../../{@filename}.xml" <mailto:../../{@filename}.xml> > <xsl:copy-of select="."/> </xsl:result-document> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> It feels like Saxon8.4 is suspicious of my attempt to write to the same result file more than once, but it hasn't even given me the chance to prove my innocence of that sin by throwing a configuration error before the transform even starts. I really do mean to obey the no side effects law although I admit I really don't think writing to the same output file is a side effect in the transform but rather a side effect in the external system. If the external system does not have side effects then all hope for transactional processing seems lost. Thanks again for Saxon!! Roger Kovack ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ saxon-help mailing list saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
From: Michael Kay <mike@sa...> - 2005-05-28 07:59:55
|
This will work with Saxon-SA if the source document is validated against the schema (using the -val option on the command line). I had to change the query to this: <data>{ for $s in doc("example.xml")/document/departaments/departament let $b2:=$s/id($s/@people)/@name return <depart>{ if ($b2='John') then $s/@nam else () }</depart> }</data> because id() fails if there is no context node. Then I ran it using java com.saxonica.Query -val test.xq and the result is: <?xml version="1.0" encoding="UTF-8"?> <data> <depart nam="Computer"/> <depart/> </data> If you want to use the id() function with Saxon-B you can either (a) define a DTD for the source document that declares the attribute as of type ID (b) use the special attribute name xml:id, which is always of type ID Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: saxon-help-admin@... > [mailto:saxon-help-admin@...] On Behalf Of > Luis Arevalo > Sent: 27 May 2005 09:03 > To: saxon-help@... > Subject: [saxon] Implementation of fn:id() function > > Hello, > > I've been trying to use the Xpath v2.0 function fn:id() but > it doesn't run > well.I don't know if I use it in a bad way or if the Xquery > processors don't > support it. I think there aren't any encoding problems and I > also think I > use this function in a good way. > > I enclose the files that I use in my examples. The example is > very stupid > however it's very easy for testing the id() function. I have > a xs:IDREFS > attribute called "people" in the "departament" element and I want to > retrieve their xs:ID that are in the element person. After > that, I print > whatever to check if I run well. > > XML-Document > > > <?xml version="1.0" encoding="UTF-8"?> > <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:noNamespaceSchemaLocation="schema.xsd"> > <people> > <person id="id1" name="John"/> > <person id="id2" name="Peter"/> > <person id="id3" name="Anne"/> > </people> > <departaments> > <departament nam="Computer" people="id1 id2"/> > <departament nam="Business" people="id2 id3"/> > </departaments> > </document> > > XQuery Document > > xquery version "1.0"; > > <data>{ > for $s in doc("example.xml")/document/departaments/departament > let $b2:=id($s/@people)/@name > return <depart>{ > if ($b2='John') then $s/@nam > else () > }</depart> > }</data> > > XML_Schema > > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; > elementFormDefault="qualified"> > <xs:element name="departament"> > <xs:complexType> > <xs:attribute name="nam" type="xs:string" use="required"/> > <xs:attribute name="people" type="xs:string" > use="required"/> > </xs:complexType> > </xs:element> > <xs:element name="departaments"> > <xs:complexType> > <xs:sequence> > <xs:element ref="departament" maxOccurs="unbounded"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="document"> > <xs:complexType> > <xs:sequence> > <xs:element ref="people"/> > <xs:element ref="departaments"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="people"> > <xs:complexType> > <xs:sequence> > <xs:element ref="person" maxOccurs="unbounded"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="person"> > <xs:complexType> > <xs:attribute name="id" type="xs:ID" use="required"/> > <xs:attribute name="name" type="xs:string" use="required"/> > </xs:complexType> > </xs:element> > </xs:schema> > > Thanks for all, > > Luis > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > saxon-help mailing list > saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help > |
From: Michael Kay <mike@sa...> - 2005-05-28 07:12:35
|
The character references α and α are equivalent - decimal 945 equals hexadecimal 3B1. XML and HTML parsers don't care which one you use. However, if you prefer your character references to be hexadecimal, you can use the saxon:character-representation attribute on xsl:output to control this: see http://www.saxonica.com/documentation/extensions/output-extras.html Michael Kay http://www.saxonica.com/ > _____________________________________________ > From: saxon-help-admin@... > [mailto:saxon-help-admin@...] On Behalf Of baskaran > Sent: 28 May 2005 05:21 > To: saxon-help@... > Subject: [saxon] output file also the same unicode character > > Dear sirs, > > Good Morning sir, > I transfer a xml file to some other dtd based xml file by using xslt, > instant saxon. All the entities are unicode in input xml file. And I need > the output file also the same unicode. But I got some other values; for > example for greek alpha character α is changed to α. How to > get the same unicode character in the output file. Kindly advice me... > > Thanking you > > Regards > Baskaran NK > |
From: baskaran <baskaran@br...> - 2005-05-28 04:23:21
|
Dear sirs, Good Morning sir, I transfer a xml file to some other dtd based xml file by using xslt, instant saxon. All the entities are unicode in input xml file. And I need the output file also the same unicode. But I got some other values; for example for greek alpha character α is changed to α. How to get the same unicode character in the output file. Kindly advice me... Thanking you Regards Baskaran NK |