kernowforsaxon-help Mailing List for Kernow (Page 13)
Brought to you by:
ajwelch
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(24) |
Jul
(39) |
Aug
(95) |
Sep
(2) |
Oct
|
Nov
(14) |
Dec
(18) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(9) |
Feb
(1) |
Mar
(36) |
Apr
(10) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(4) |
2009 |
Jan
(9) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
(11) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(3) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(11) |
Nov
|
Dec
(5) |
2012 |
Jan
|
Feb
|
Mar
(7) |
Apr
(4) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(1) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Florent G. <dar...@ya...> - 2007-06-30 20:09:52
|
Florent Georges wrote: > I've just wrote a few words about the IDE setting in the Wiki, > on a new page: BTW, you can monitor the entire Wiki there: http://kernowforsaxon.wiki.sourceforge.net/space/notify Regards, --drkm ___________________________________________________________________________ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com |
From: Florent G. <dar...@ya...> - 2007-06-30 19:49:33
|
Hi Andrew I've just wrote a few words about the IDE setting in the Wiki, on a new page: http://kernowforsaxon.wiki.sourceforge.net/develop Are you ok with those (little) changes? Regards, --drkm ___________________________________________________________________________ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com |
From: Florent G. <dar...@ya...> - 2007-06-29 14:30:11
|
Andrew Welch wrote: > On 6/27/07, Florent Georges wrote: Hi > > Maybe I could first try to commit the namespace > > feature on the XQuery Sandbox (once finished & tested), > > and then you will be able to see if all remains OK for > > you after having updated the project? > Sure. I'll add you to the project now. I've just commited it. Could you please update your copy and test if all seems ok? > > Maybe it would be better to use exactly the same > > NetBeans setup as yours to minimize those noisy changes? > Its the GUI Builder Update (iirc) from the "Netbeans > Update Center Beta" under "Tools / Update Center". I use > Netbeans 5.5.1 Ok. I remade all changes on a fresh copy after having installed NB 5.5.1 and updated Matisse (aka GUI Builder). The changes in administrative and generated files are far less important than with NB 6.0M9. > > When we arrive at a solution, maybe it could be > > interesting to activate the Wiki on the project, to keep > > track of this info. I think Wikis are perfect for this > > kind of info. What do you think? > Ok, I'll enable it. I'll try to see this weekend if I can add a few words on the way I added this functionality, the responsabilities of the classes I modified and/or the setup of the tools & IDE. BTW, I saw you still used JUnit 3. By habit I used JUnit 4. Is there any reason to use JUnit while we are using Java SE 6? I can revert back my unit tests to JUnit 3 if needed. Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |
From: Andrew W. <and...@gm...> - 2007-06-28 09:20:31
|
On 6/27/07, Florent Georges <dar...@ya...> wrote: > Andrew Welch wrote: > > Hi > > > I agree through that it could do with refactoring to be better > > separated, so if you want to do it that would be great. > > That would be interesting, yes. But before doing any more work, I > wonder if we can agree on a commit procedure. As you can see with the > differences between the two following patches: > > http://www.fgeorges.org/tmp/kernow.diff > http://www.fgeorges.org/tmp/kernow-simple.diff > > NetBeans changes a lot of files even for quite little changes in the > code. Manly in administrative files (project files and so on) and > *.form files. Please don't commit any files in the nbproject directory, but do commit all the .form files. > Maybe I could first try to commit the namespace feature on the XQuery > Sandbox (once finished & tested), and then you will be able to see if > all remains OK for you after having updated the project? Sure. I'll add you to the project now. > Maybe it would be better to use exactly the same NetBeans setup as > yours to minimize those noisy changes? I use NB 6.0 M9 (that's the > latest milestone, and I'm surprised to see that *.form files here have > /Form/@version eq '1.3' while you have '1.4'). What are you using? > Any specific module? Its the GUI Builder Update (iirc) from the "Netbeans Update Center Beta" under "Tools / Update Center". I use Netbeans 5.5.1 - I think its still a bit too early NB 6.0. > When we arrive at a solution, maybe it could be interesting to > activate the Wiki on the project, to keep track of this info. I think > Wikis are perfect for this kind of info. What do you think? Ok, I'll enable it. -- http://andrewjwelch.com |
From: Florent G. <dar...@ya...> - 2007-06-27 21:53:34
|
Andrew Welch wrote: Hi > I agree through that it could do with refactoring to be better > separated, so if you want to do it that would be great. That would be interesting, yes. But before doing any more work, I wonder if we can agree on a commit procedure. As you can see with the differences between the two following patches: http://www.fgeorges.org/tmp/kernow.diff http://www.fgeorges.org/tmp/kernow-simple.diff NetBeans changes a lot of files even for quite little changes in the code. Manly in administrative files (project files and so on) and *.form files. Maybe I could first try to commit the namespace feature on the XQuery Sandbox (once finished & tested), and then you will be able to see if all remains OK for you after having updated the project? Maybe it would be better to use exactly the same NetBeans setup as yours to minimize those noisy changes? I use NB 6.0 M9 (that's the latest milestone, and I'm surprised to see that *.form files here have /Form/@version eq '1.3' while you have '1.4'). What are you using? Any specific module? When we arrive at a solution, maybe it could be interesting to activate the Wiki on the project, to keep track of this info. I think Wikis are perfect for this kind of info. What do you think? Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |
From: Andrew W. <and...@gm...> - 2007-06-27 14:09:39
|
On 6/27/07, Florent Georges <dar...@ya...> wrote: > > - NamespaceBindings should be static, as should the > > "myBindings" Map (just like Params) > > Actually, I went that way on purpose. I'm really not > convinced that using static with a semantics of singleton is > a good thing. If I correctly understand, this class is > static because we only need one *at this time* and that > seems easier to access its members through static access > than to pass an instance to each place that needs to use it. > > To take another example, I'd like to add another feature > on the XQuery Sandox, a dialog box to define variables, the > same way ParamsDiag define parameters for XSLT. What would > be great should be to be able to reuse the ParamsDiag GUI > piece here. That is not an OO-integrist approach, as it > would be worth adding facilities on this dialog box to > define variables of special types (file paths with a > graphical navigator for instance). > > That is unfortunately not possible, as ParamsDiag uses > directly Params. I think this is contrary to the MVC > paradigm. What I think could be maybe more flexible should > be having a VariableBindings interface. This interface will > be implemented by Params, and by the model behind the XQuery > Sandbox. And the ParamsDiag will be constructed with an > object that implements this interface. So instead of: > > ParamsDiag --use--> Params > > you would have (ParamsDiag's constructor will require a > VariableBindings): > > ParamsDiag --use--> VariableBindings > | > +--impl--> Params > +--impl--> XQuerySandboxVariables > > (Maybe VariableBindings could be a concrete class instead that only > stores and permits to retrieve variable/param definitions, as > NamespaceBindings is.) > > I think this is very important for flexibility and to > reduce dependencies in Kernow's code. What do you think? Ok, I think it sounds like a good idea, and reducing dependencies is always good. However you could just reuse Params + ParamsDiag for the XQuery Sandbox parameters. Its just a HashMap of name/value pairs stored in Map using the URI of the stylesheet as the key - you could just use it without modification (just use say "XQuerySandbox" as the key)- its already shared between transform parameters and Ant parameters.... I agree through that it could do with refactoring to be better separated, so if you want to do it that would be great. -- http://andrewjwelch.com |
From: Florent G. <dar...@ya...> - 2007-06-27 13:51:50
|
Andrew Welch wrote: > Good idea though (and a good choice of a discrete package > of work). I'll try to write a little bit about that. The form is really simple, as well as the business code, and it deals with saving/loading properties. So if someone else wants to help, that could be an interesting entry point. > The Config class maintains the state for Kernow, and as > such its pretty big. In this case though its not needed. > If you want to store the namespaces in the Properties > file, just write Save and Load methods in > NamespaceBindings (called from TabbedView on load and > close) that uses the static PropertyManager. Ok, I'll change that. > - The buttons on the NamespacesDiag still say "Add Param" > and "Delete Param" Ok. > - The variable names in NamespacesDiag are still the same > as in ParamsDiag (eg paramsTable) they should really be > renamed Yes. That was the first time I used the NetBeans GUI designer (and I must admit the first time I designed a GUI). I'm not used to check little details in the property dialog box nor to check the generated code. > - NamespaceBindings should be static, as should the > "myBindings" Map (just like Params) Actually, I went that way on purpose. I'm really not convinced that using static with a semantics of singleton is a good thing. If I correctly understand, this class is static because we only need one *at this time* and that seems easier to access its members through static access than to pass an instance to each place that needs to use it. To take another example, I'd like to add another feature on the XQuery Sandox, a dialog box to define variables, the same way ParamsDiag define parameters for XSLT. What would be great should be to be able to reuse the ParamsDiag GUI piece here. That is not an OO-integrist approach, as it would be worth adding facilities on this dialog box to define variables of special types (file paths with a graphical navigator for instance). That is unfortunately not possible, as ParamsDiag uses directly Params. I think this is contrary to the MVC paradigm. What I think could be maybe more flexible should be having a VariableBindings interface. This interface will be implemented by Params, and by the model behind the XQuery Sandbox. And the ParamsDiag will be constructed with an object that implements this interface. So instead of: ParamsDiag --use--> Params you would have (ParamsDiag's constructor will require a VariableBindings): ParamsDiag --use--> VariableBindings | +--impl--> Params +--impl--> XQuerySandboxVariables (Maybe VariableBindings could be a concrete class instead that only stores and permits to retrieve variable/param definitions, as NamespaceBindings is.) I think this is very important for flexibility and to reduce dependencies in Kernow's code. What do you think? > - There aren't any comments, or JUnit tests. Ideally the > code you submit should be reasonably documented and at > least have a few JUnit tests (I know my code isn't exactly > well documented or tested, but these things become really > important when there's more than 1 developer). Yes off course. That was just a first draft and I just wanted to be sure that I was "on the right way" before spending time in documentation and testing. > I couldn't comment on the changes to TabbedView, or on > StandaloneXQuery if you've made any changes there. They are contained in the following patch (the simple one is the same without difference mainly generated by NetBeans): http://www.fgeorges.org/tmp/kernow.diff http://www.fgeorges.org/tmp/kernow-simple.diff I'll integrate your change this evening, once at home. Regards, --drkm ___________________________________________________________________________ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com |
From: Florent G. <dar...@ya...> - 2007-06-27 09:17:14
|
Andrew Welch wrote: Hi > > Yes. Maybe you can remove the test within > > Timer.getDurationInWords() and always display > > milliseconds? > It's certainly something that needs looking at, it's not > quite right the moment. I can just make the time all > milliseconds because some tranforms that I've measured in > the past (like the Sudoku solver) took up to a minute. Just to be sure: I meant to always display the ms *part*, not the whole time only in ms. Even if you have minutes and seconds, you can still have ms, that's not anoying IMHO, and that should be a pretty simple solution. Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |
From: Andrew W. <and...@gm...> - 2007-06-27 09:14:35
|
On 6/27/07, Florent Georges <dar...@ya...> wrote: > I forgot one thing. When I tested the timing, I used a > simple identity transform, with a huge input file. The > timing was really different if I run it with the output > within the Kernow window or in a file. I guess this is > because huge text display in Swing. Yes - writing the output to the JTextArea takes a long time. In practice though, you would always be writing to a file and just checking the output window for any notifications like xsl:message output. > But this is a case where we don't really want the output > and using a file for that is too more work ;-) Maybe an > option "ignore output" on the transform panel could be > interesting? Good idea, I'll add it to the TODO list. -- http://andrewjwelch.com |
From: Andrew W. <and...@gm...> - 2007-06-27 09:10:11
|
> Perfect! Some possible enhancements... > > 1/ Permit to separate compile- and run- time. Good point - I'll add that. > 2/ Perform timing in other actions than single transform. > For example XQuery and why not, validation. Yes, it's on the TODO list :) > Yes. Maybe you can remove the test within > Timer.getDurationInWords() and always display milliseconds? It's certainly something that needs looking at, it's not quite right the moment. I can just make the time all milliseconds because some tranforms that I've measured in the past (like the Sudoku solver) took up to a minute. I'll think about it. |
From: Andrew W. <and...@gm...> - 2007-06-27 09:03:55
|
> I added a simple functionality, almost to discover Kernow > internals and play a little bit with it. I added a button > "namespaces" on the XQuery Sandbox panel. It launches a > dialogue box (designed after the ParamsDiag class) that > allow to add namespace bindings (pairs of String, prefixes > and URIs). Bindings are saved to and loaded from the config > file. > > That permits you to add permanently bindings for prefixes > 'xsl', 'fo', 'h', and the like. I think that it could be > worth having it in a XQuery Sandbox. The XQuery Sandbox was added just as a way to play with XQuery. Good idea though (and a good choice of a discrete package of work). > After this first look, I have a couple of remarks. Mainly > about the configuration. I saw Params.java uses static > members. And I think Config.java is too monolithic and > rather big and could be break down within a few classes. The Config class maintains the state for Kernow, and as such its pretty big. In this case though its not needed. If you want to store the namespaces in the Properties file, just write Save and Load methods in NamespaceBindings (called from TabbedView on load and close) that uses the static PropertyManager. > For example for the namespace bindings, I add a new class > NamespaceBindings whose the only responsablity is to act as > a container for bindings. You can then store it in the > configuration, and pass it to the dialog box. The dialog > box then never use the config singleton, so it is easier to > reuse it later. Yes, I think it should work in exactly the same way as ParamsDiag and Params. > Unfortunately, NetBeans changed a lot of files, mainly > project and build related. It changed also generated code > in TabbedView.java and TabbedView.form. So I'm not sure > they are suitable to commit. You can instead find a patch > and the new files there: > > http://www.fgeorges.org/tmp/kernow.diff > http://www.fgeorges.org/tmp/kernow-simple.diff > http://www.fgeorges.org/tmp/NamespaceBindings.java > http://www.fgeorges.org/tmp/NamespacesDiag.form > http://www.fgeorges.org/tmp/NamespacesDiag.java [snip] > Is that in accord with the way you are developing Kernow? Yes, I think that's a good start. Some things that needs fixing first though: - The buttons on the NamespacesDiag still say "Add Param" and "Delete Param" - The variable names in NamespacesDiag are still the same as in ParamsDiag (eg paramsTable) they should really be renamed - NamespaceBindings should be static, as should the "myBindings" Map (just like Params) - There aren't any comments, or JUnit tests. Ideally the code you submit should be reasonably documented and at least have a few JUnit tests (I know my code isn't exactly well documented or tested, but these things become really important when there's more than 1 developer). I couldn't comment on the changes to TabbedView, or on StandaloneXQuery if you've made any changes there. cheers andrew -- http://andrewjwelch.com |
From: Florent G. <dar...@ya...> - 2007-06-26 23:25:16
|
Florent Georges wrote: > Perfect! Some possible enhancements... I forgot one thing. When I tested the timing, I used a simple identity transform, with a huge input file. The timing was really different if I run it with the output within the Kernow window or in a file. I guess this is because huge text display in Swing. But this is a case where we don't really want the output and using a file for that is too more work ;-) Maybe an option "ignore output" on the transform panel could be interesting? Regards, --drkm ___________________________________________________________________________ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com |
From: Florent G. <dar...@ya...> - 2007-06-26 23:14:17
|
Hi Andrew, I added a simple functionality, almost to discover Kernow internals and play a little bit with it. I added a button "namespaces" on the XQuery Sandbox panel. It launches a dialogue box (designed after the ParamsDiag class) that allow to add namespace bindings (pairs of String, prefixes and URIs). Bindings are saved to and loaded from the config file. That permits you to add permanently bindings for prefixes 'xsl', 'fo', 'h', and the like. I think that it could be worth having it in a XQuery Sandbox. After this first look, I have a couple of remarks. Mainly about the configuration. I saw Params.java uses static members. And I think Config.java is too monolithic and rather big and could be break down within a few classes. For example for the namespace bindings, I add a new class NamespaceBindings whose the only responsablity is to act as a container for bindings. You can then store it in the configuration, and pass it to the dialog box. The dialog box then never use the config singleton, so it is easier to reuse it later. Unfortunately, NetBeans changed a lot of files, mainly project and build related. It changed also generated code in TabbedView.java and TabbedView.form. So I'm not sure they are suitable to commit. You can instead find a patch and the new files there: http://www.fgeorges.org/tmp/kernow.diff http://www.fgeorges.org/tmp/kernow-simple.diff http://www.fgeorges.org/tmp/NamespaceBindings.java http://www.fgeorges.org/tmp/NamespacesDiag.form http://www.fgeorges.org/tmp/NamespacesDiag.java kernow-simple.diff is a simplification of the patch, with only relevant part in Java sources (that is, without administrative files, TabbedView.form, and without some part in generated code in TabbedView.java). Is that in accord with the way you are developing Kernow? Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |
From: Florent G. <dar...@ya...> - 2007-06-26 22:15:48
|
Andrew Welch wrote: Hi > Ok, all checked in. Please take a look and see what you > think. Perfect! Some possible enhancements... 1/ Permit to separate compile- and run- time. 2/ Perform timing in other actions than single transform. For example XQuery and why not, validation. > I think I may need to modify the way the times are > displayed - currently milliseconds are only displayed for > times under 3 seconds... > but for performance testing its good to see these (and it > looks odd when the average time doesn't quite equal (total > / (numOfRuns - numToIgnore)) because the ms aren't > displayed for the total. Yes. Maybe you can remove the test within Timer.getDurationInWords() and always display milliseconds? Thanks for the feature. Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |
From: Andrew W. <and...@gm...> - 2007-06-25 14:32:37
|
> > I've pretty much done the refactoring now so I'll > > commit the code... > > Great! I'm sure that will save time when one (for instance me :-p) > will want to compare two constructs in terms of efficiency. Ok, all checked in. Please take a look and see what you think. I think I may need to modify the way the times are displayed - currently milliseconds are only displayed for times under 3 seconds... but for performance testing its good to see these (and it looks odd when the average time doesn't quite equal (total / (numOfRuns - numToIgnore)) because the ms aren't displayed for the total. Anyway, let me know if this is what you had in mind. cheers andrew |
From: Florent G. <dar...@ya...> - 2007-06-25 12:49:02
|
Andrew Welch wrote: Hi > I've pretty much done the refactoring now so I'll > commit the code... Great! I'm sure that will save time when one (for instance me :-p) will want to compare two constructs in terms of efficiency. Thanks, --drkm ___________________________________________________________________________ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com |
From: Andrew W. <and...@gm...> - 2007-06-25 11:15:34
|
> > That looks good, although there is no initializing of the > > environment, loading of classes etc as the JVM is already > > running (its not like running Saxon from the command line) > > Two points here: > > 1/ I always, always heard to do a few initializing > passes when doing timing. The computer architecture > is very complex, and there are a lot of caching or > lazy computing from the processor core to the > application level. IMHO this is a good practice, > even if you think you can argue you don't need it in > a specific case. > > 2/ I wonder if the class loader load all classes before > main() is called, or the first time a class is used. > I think it is the second case. [snip] > So I think this is worth adding this possibility (maybe > defaulted to 0). IMHO interesting default values are 2 and > 5. This should be enough for most of timing. What do you > think? I agree, however in Kernow after the first run everything is initialized - so on the second run the first iteration won't be an outlier. I don't see any reason not to include the feature though - something like "ignore first n runs" should be simple enough. I've pretty much done the refactoring now so I'll commit the code... |
From: Florent G. <dar...@ya...> - 2007-06-25 10:57:41
|
Andrew Welch wrote: Hi > That looks good, although there is no initializing of the > environment, loading of classes etc as the JVM is already > running (its not like running Saxon from the command line) Two points here: 1/ I always, always heard to do a few initializing passes when doing timing. The computer architecture is very complex, and there are a lot of caching or lazy computing from the processor core to the application level. IMHO this is a good practice, even if you think you can argue you don't need it in a specific case. 2/ I wonder if the class loader load all classes before main() is called, or the first time a class is used. I think it is the second case. Anyway, I did a simple test to see if the first timing is quite different from the others: import java.util.Calendar; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import net.sf.saxon.TransformerFactoryImpl; public class Main { public static void main(String[] args) throws Throwable { TransformerFactory factory; Transformer trans; Calendar before; Calendar after; long time; for ( int i = 0; i < 10; ++i ) { factory = new TransformerFactoryImpl(); before = Calendar.getInstance(); trans = factory.newTransformer( new StreamSource("timing.xsl") ); trans.transform(new StreamSource("../hamlet.xml"), new StreamResult(System.out)); after = Calendar.getInstance(); time = after.getTimeInMillis() - before.getTimeInMillis(); System.err.println("ms: " + time); } } } The stylesheet is an identity transform and the input doc is from http://www.cafeconleche.org/examples/shakespeare/ (very useful to do some tests). The result of running it twice is: (drkm)[12] ~/java/tests/timing$ make > /dev/null ms: 1141 ms: 181 ms: 220 ms: 170 ms: 140 ms: 141 ms: 90 ms: 160 ms: 150 ms: 150 (drkm)[13] ~/java/tests/timing$ make > /dev/null ms: 1211 ms: 191 ms: 240 ms: 180 ms: 150 ms: 151 ms: 90 ms: 160 ms: 160 ms: 150 So I think this is worth adding this possibility (maybe defaulted to 0). IMHO interesting default values are 2 and 5. This should be enough for most of timing. What do you think? Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |
From: Andrew W. <and...@gm...> - 2007-06-25 09:37:29
|
> I'm trying to understand the Params.java class in the > package net.sf.kernow.transform. It seems it is a graphical > component; at least NB shows it as if, and there is a > Params.form file (if I'm correct, this is the way NB stores > info about graphical classes). BTW it is almost the same > form as ParamsDiag (in net.sf.kernow.ui). > > But the Params.java classe itself contains only two static > methods and one static field, and doesn't extend any Swing > class. Is that normal? No! Oddly Netbeans seems to have left the .form behind for the Params class. I couldn't see it using any of the views - I was completely unaware of it until you just pointed it out to me. I couldn't see any way in Netbeans to remove the form... in the end I had to use TortoiseSVN. It should be ok now if you re-checkout the transform package. Parameters are stored as name value pairs in a HashMap, which is then stored against the URL of the stylesheet in another HashMap. The Params class used to be both the dialog and the place where the mappings between stylesheets and parameters were held. I separated them and moved the dialog into the UI package (now called ParamsDiag) and left the Params class in the transform package... the .form must have been left behind at that point. |
From: Andrew W. <and...@gm...> - 2007-06-25 08:49:08
|
> About the average timing feature, I thought about the > following points. You can see a screenshot of what the > option frame could looks like at: > > http://www.fgeorges.org/tmp/kernow-timing-options.jpg > > You can enable/disable the timing. Then you can set the > number of time the transformation should be performed before > measuring time (to initialize the environement, load all > classes, etcetera), and the number of time to execute the > transformation to actually measure time. And finally you > can you want to measure only the compilation phase, or the > transformation phase, or both. > > In addition, this have not to be restricted to XSLT > transformation. When enabled, the feature can measure > average time of evaluating an XQuery expression, or even to > validate a document. > > What do you think about those thoughts? That looks good, although there is no initializing of the environment, loading of classes etc as the JVM is already running (its not like running Saxon from the command line) The only real "startup" cost is creating the Transformer (or Templates when compiling the stylesheet), and Kernow doesn't start the timing until after that point - see SingleFileTransformer - this is the class that's used for both "single file" and "standalone" transforms. I would suggest that the "ignore initialization" options aren't needed, but apart from that it looks good. A bit of refactoring will need to be done before it's possible to run the transform n times and store the time for each run (it will give me chance to tidy the code a bit and add some comments :) Hopefully I'll do it today, but if not tomorrow.... |
From: Florent G. <dar...@ya...> - 2007-06-24 22:25:21
|
Hi Andrew, I'm trying to understand the Params.java class in the package net.sf.kernow.transform. It seems it is a graphical component; at least NB shows it as if, and there is a Params.form file (if I'm correct, this is the way NB stores info about graphical classes). BTW it is almost the same form as ParamsDiag (in net.sf.kernow.ui). But the Params.java classe itself contains only two static methods and one static field, and doesn't extend any Swing class. Is that normal? Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |
From: Florent G. <dar...@ya...> - 2007-06-23 19:38:22
|
Hi Andrew, I've just submited a new issue in the bug tracker: http://sourceforge.net/tracker/index.php?func=detail&aid=1742219&group_id=161018&atid=818177 I don't know if you are monitoring the tracker yet. Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |
From: Florent G. <dar...@ya...> - 2007-06-23 19:25:45
|
Andrew, About the average timing feature, I thought about the following points. You can see a screenshot of what the option frame could looks like at: http://www.fgeorges.org/tmp/kernow-timing-options.jpg You can enable/disable the timing. Then you can set the number of time the transformation should be performed before measuring time (to initialize the environement, load all classes, etcetera), and the number of time to execute the transformation to actually measure time. And finally you can you want to measure only the compilation phase, or the transformation phase, or both. In addition, this have not to be restricted to XSLT transformation. When enabled, the feature can measure average time of evaluating an XQuery expression, or even to validate a document. What do you think about those thoughts? Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |
From: Florent G. <dar...@ya...> - 2007-06-22 16:48:10
|
Hi Andrew I've just got a fresh SVN copy, an opened it within NetBeans (6.0 M9). I got two errors: it didn't find xercesImpl.jar, and it complained about inexisting com/saxonica/jaxp/SchemaFactoryImpl. The later is imported in net.sf.kernow.schema.SchemaValidator, but is not used (so just deleting the import works fine). For xercesImpl.jar, it seems to look in ../../Kernow/lib, what seems weird. For the JAXP factory, it is in an extra JAR in Saxon: saxon8sa-jaxp.jar. Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |