You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(10) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Oliver Z. <ol...@ze...> - 2004-05-27 15:03:59
|
Hi Missi! It would work with XPA, but for this rather simple task I would recommend either using SAX, DOM or JDOM. Cheers, Oliver Missi Tran wrote: > Hi. > > I have a XML file associated with a XML Schema and I need to make > several transformations on it. My transformations are basic (add, delete > or update an element) and can be associated with guards. For example, if > I have an element <linkcomponent IDREF="someid"/>, I want to check if > there is not an element in my XML file that has an attribute ID with the > same value (something like <component ID="someid"/>), I will delete the > first element from my XML file. So, to check if my guard is true or > false, I need to go through the XML file. > So I would like to know if you think that XPA is an adequate tool to my > needs or not. > > Thanks. > > Missi |
From: Missi T. <Mis...@li...> - 2004-05-27 08:40:05
|
Hi. I have a XML file associated with a XML Schema and I need to make = several transformations on it. My transformations are basic (add, delete = or update an element) and can be associated with guards. For example, if = I have an element <linkcomponent IDREF=3D"someid"/>, I want to check if = there is not an element in my XML file that has an attribute ID with the = same value (something like <component ID=3D"someid"/>), I will delete = the first element from my XML file. So, to check if my guard is true or = false, I need to go through the XML file. So I would like to know if you think that XPA is an adequate tool to my = needs or not. Thanks. Missi |
From: Oliver Z. <ol...@ze...> - 2004-01-15 15:11:00
|
Remi! If it is running at max CPU it is no deadlock problem, but really a loop that does not exit. More specific it is in the AttributesImpl code from org.xml.sax.helpers. My version coming with Java 1.4.1_01 looks like this and certainly does not contain such a loop: public void addAttribute (String uri, String localName, String qName, String type, String value) { ensureCapacity(length+1); data[length*5] = uri; data[length*5+1] = localName; data[length*5+2] = qName; data[length*5+3] = type; data[length*5+4] = value; length++; } and for ensureCapacity: private void ensureCapacity (int n) { if (n <= 0) { return; } int max; if (data == null || data.length == 0) { max = 25; } else if (data.length >= n * 5) { return; } else { max = data.length; } while (max < n * 5) { max *= 2; } String newData[] = new String[max]; if (length > 0) { System.arraycopy(data, 0, newData, 0, length*5); } data = newData; } I can see the code above only loops forever when max is 0. Which can never be. now have a look at the 1.4.0 version (yours): private void ensureCapacity (int n) { if (n > 0 && data == null) { data = new String[25]; } int max = data.length; if (max >= n * 5) { return; } while (max < n * 5) { max *= 2; } String newData[] = new String[max]; System.arraycopy(data, 0, newData, 0, length*5); data = newData; } a voila there it is: max becomes 0 if data.length, i.e. the size of your attributes is 0. Thus the while loop loops forever. *Thus the bug is not in XPA and switching to Java 1.4.1 should fix your problem.* Could you try and verify the problem is fixed? Oliver SCHNEKENBURGER Remi CRIT wrote: > Argh! > > Still the same : it blocks when there are no attributes on the tag > "component". > > At runtime, it does not end the execution : I put a System. out.println("x") > before and after the line getAttr[...]().setAttr[...]. It prints on the > screen the first one but not after. The CPU is running at max usage. If I > remove the line, everything is OK. > > > Remi > > -----Message d'origine----- > De : Oliver Zeigermann [mailto:ol...@ze...] > Envoyé : jeudi 15 janvier 2004 00:45 > À : SCHNEKENBURGER Remi CRIT > Objet : Re: [Xpa-users] Not better > > > Remi, > > thanks for your patience, this really was a silly patch. I have added > the new version. Would you give it another try? > > Thanks again :) > > Oliver > > SCHNEKENBURGER Remi CRIT wrote: > > >>Hi Oliver, >> >>I still have problems on execution. I have no problems during the >>compilation. At runtime, I have a null pointer exception >> >>Input: >><component attr="caliur"> >>HUHU, hier geht's ab</component> >> >>############### >>exception: java.lang.NullPointerException >>java.lang.NullPointerException >> at >>org.xml.sax.helpers.AttributesImpl.setAttributes(AttributesImpl.java:344) >> at > > org.xml.sax.helpers.AttributesImpl.<init>(AttributesImpl.java:75) > >> at >> > > de.zeigermann.xpa.treeParser.XMLStartAST.setAttributes(XMLStartAST.java:157) > >> at >>de.zeigermann.xpa.treeParser.XMLStartAST.<init>(XMLStartAST.java:93) >> at >>de.zeigermann.xpa.treeParser.XMLASTFactory.create(XMLASTFactory.java:80) >> at >>de.zeigermann.xpa.treeParser.XMLASTFactory.create(XMLASTFactory.java:94) >> at ComponentTreeParser.component(ComponentTreeParser.java:65) >> at Main.main(Main.java:41) >> >> >>I have tried with some attributes or not on <component>, but it is the > > same. > >>For information, running under Solaris, java 2 runtime environment , >>Standard Edition 1.4.0_02 >> >> >> >> >>------------------------------------------------ >>Remi SCHNEKENBURGER >>CEA / SACLAY >>L-LSP >>91191 Gif s/ Yvette >> >>tel : (+33) 1 69 08 29 79 >>fax : (+33) 69 08 20 82 >> >> >> >> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: Perforce Software. >>Perforce is the Fast Software Configuration Management System offering >>advanced branching capabilities and atomic changes on 50+ platforms. >>Free Eval! http://www.perforce.com/perforce/loadprog.html >>_______________________________________________ >>Xpa-users mailing list >>Xpa...@li... >>https://lists.sourceforge.net/lists/listinfo/xpa-users >> > > > |
From: SCHNEKENBURGER R. C. <SCH...@or...> - 2004-01-14 08:32:34
|
Hi Oliver, I still have problems on execution. I have no problems during the compilation. At runtime, I have a null pointer exception Input: <component attr="caliur"> HUHU, hier geht's ab</component> ############### exception: java.lang.NullPointerException java.lang.NullPointerException at org.xml.sax.helpers.AttributesImpl.setAttributes(AttributesImpl.java:344) at org.xml.sax.helpers.AttributesImpl.<init>(AttributesImpl.java:75) at de.zeigermann.xpa.treeParser.XMLStartAST.setAttributes(XMLStartAST.java:157) at de.zeigermann.xpa.treeParser.XMLStartAST.<init>(XMLStartAST.java:93) at de.zeigermann.xpa.treeParser.XMLASTFactory.create(XMLASTFactory.java:80) at de.zeigermann.xpa.treeParser.XMLASTFactory.create(XMLASTFactory.java:94) at ComponentTreeParser.component(ComponentTreeParser.java:65) at Main.main(Main.java:41) I have tried with some attributes or not on <component>, but it is the same. For information, running under Solaris, java 2 runtime environment , Standard Edition 1.4.0_02 ------------------------------------------------ Remi SCHNEKENBURGER CEA / SACLAY L-LSP 91191 Gif s/ Yvette tel : (+33) 1 69 08 29 79 fax : (+33) 69 08 20 82 |
From: Oliver Z. <ol...@ze...> - 2004-01-12 16:47:46
|
Remi, thanks for your help :) I have found a spot that might be responsible for the error and already checked it into the CVS. Unfortunately, I can not check for it, because I can not reproduce it (indicates this has something to do with concurrent stuff, race conditions). Would you please try the jar attached that contains these changes and see if it works? Thanks, Oliver SCHNEKENBURGER Remi CRIT wrote: > Hi Oliver, > > It blocks when I try to add an attribute when I have an empty list of > attributes. > > In fact: > * when I add an attribute to component in test.xml, it runs very > fast. > * If there are no attributes, it doesn't want to work. > * when I don't try to add an attribute and I get the list, it runs > > It seems to be a problem on addAttribute(), when there are no attributes in > the list. > > I hope this will help you. > > Remi > > > PS: I only works with the tree parsing, I use XPA for automatic tree > construction like this example. > ------------------------------------------------ > Remi SCHNEKENBURGER > CEA / SACLAY > L-LSP > 91191 Gif s/ Yvette > > tel : (+33) 1 69 08 29 79 > fax : (+33) 69 08 20 82 > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Xpa-users mailing list > Xpa...@li... > https://lists.sourceforge.net/lists/listinfo/xpa-users > |
From: SCHNEKENBURGER R. C. <SCH...@or...> - 2004-01-12 09:23:24
|
Hi Oliver, It blocks when I try to add an attribute when I have an empty list of attributes. In fact: * when I add an attribute to component in test.xml, it runs very fast. * If there are no attributes, it doesn't want to work. * when I don't try to add an attribute and I get the list, it runs It seems to be a problem on addAttribute(), when there are no attributes in the list. I hope this will help you. Remi PS: I only works with the tree parsing, I use XPA for automatic tree construction like this example. ------------------------------------------------ Remi SCHNEKENBURGER CEA / SACLAY L-LSP 91191 Gif s/ Yvette tel : (+33) 1 69 08 29 79 fax : (+33) 69 08 20 82 |
From: Oliver Z. <ol...@ze...> - 2004-01-09 20:54:20
|
SCHNEKENBURGER Remi CRIT wrote: > With the classpath indicated in the precedent mail, it worked for the > example in /tokenparser/componentParser > > > Component Transformer > When I try to compile for /treeParser/ComponentTransformer/, I have the > error message : > javac -classpath ../../../lib/ext/antlr.jar:../../../lib/xpa1_0-full.jar > *.java > ComponentTreeParser.java:79: create(java.lang.String) has protected access > in antlr.ASTFactory > component_AST = (XMLAST)astFactory.make( (new > ASTArray(3)).add(c_AST).add((XMLAST)astFactory.create("<new-tree><first/><ch > ild>text")).add(cont_AST)); > > ^ > 1 error > Yeah, you are right :( I guess I messed this up when I made the step from a patched version of ANTLR to the standard one. Anyway, this works with ANTLR 2.7.3. It is available as a release candicate, but works fine: http://www.antlr.org/download/antlr-2.7.3rc1.tar.gz I will check in the changes to the CVS and have a maintainance release soon. > tokenparser combined with tree parser > Then I tried to compile the example in tokenparser combined with tree parser > : I had to remove the comment tag before the import de.zeigermann.... > Then it compiled. > This works fine with me... > multiComponent Transformer > could compile > > > PS1 : the install.txt has not the right jars name Too true, will fix this as well. > PS2 : I had some problems with my paths under linux when I tried to > indicate the absolute paths for the classpath. That's why the first example > did not work > > PS3 : I think I lack a "." path somewhere. For the xml files with > "entities.ent", I had to ad"./" ( file:./entities.ent) in the test.xml file This example tries to connect the web which is just nonsense, will fix it... > PS4: are the programs fast when running? My computer seems to run > indefinitly on some examples (for example, it occurs at the > ((XMLStartAST)c_AST).getAttributes().addAttribute("", "", "new", "CDATA", > "new value"); > line in componentTreeParser.java in the multicomponent Transformer. > > I can't have the result : it prints the first dump AST, the "############" . > With markers, I could find that it blocks in the above line. I runs very fast, I have no idea why in your case it blocks. I'd really appreciate if you could check this a bit more... Is this deterministic? Oliver |
From: SCHNEKENBURGER R. C. <SCH...@or...> - 2004-01-09 13:06:52
|
With the classpath indicated in the precedent mail, it worked for the example in /tokenparser/componentParser Component Transformer When I try to compile for /treeParser/ComponentTransformer/, I have the error message : javac -classpath ../../../lib/ext/antlr.jar:../../../lib/xpa1_0-full.jar *.java ComponentTreeParser.java:79: create(java.lang.String) has protected access in antlr.ASTFactory component_AST = (XMLAST)astFactory.make( (new ASTArray(3)).add(c_AST).add((XMLAST)astFactory.create("<new-tree><first/><ch ild>text")).add(cont_AST)); ^ 1 error tokenparser combined with tree parser Then I tried to compile the example in tokenparser combined with tree parser : I had to remove the comment tag before the import de.zeigermann.... Then it compiled. multiComponent Transformer could compile PS1 : the install.txt has not the right jars name PS2 : I had some problems with my paths under linux when I tried to indicate the absolute paths for the classpath. That's why the first example did not work PS3 : I think I lack a "." path somewhere. For the xml files with "entities.ent", I had to ad"./" ( file:./entities.ent) in the test.xml file PS4: are the programs fast when running? My computer seems to run indefinitly on some examples (for example, it occurs at the ((XMLStartAST)c_AST).getAttributes().addAttribute("", "", "new", "CDATA", "new value"); line in componentTreeParser.java in the multicomponent Transformer. I can't have the result : it prints the first dump AST, the "############" . With markers, I could find that it blocks in the above line. ------------------------------------------------ Remi SCHNEKENBURGER CEA / SACLAY L-LSP 91191 Gif s/ Yvette tel : (+33) 1 69 08 29 79 fax : (+33) 69 08 20 82 |
From: Oliver Z. <ol...@ze...> - 2004-01-09 08:51:58
|
Hi Remi, I do not know, just checked it like this starting from the XPA root dir: - cd examples/tokenParser/componentParser - javac -classpath ../../../lib/xpa1_0-full.jar;../../../lib/ext/antlr.jar *.java - java -classpath ../../../lib/xpa1_0-full.jar;../../../lib/ext/antlr.jar;. Main test.xml Everything works ok. The only classpath I used is the one named after javac and java. Oliver SCHNEKENBURGER Remi CRIT wrote: > Having downloaded and unzipped XPA, I followed the installation > instructions: > I added the two .jar in my classpath. > > I then tried to compile the few examples in the archive. During the > compilation, some errors occured (84 to be precise). I don't have access to > all packages "de.zeigermann.xpa......". I'm using jdk 1.4, and when I > verified my classpath, the two xpa.jar are present. > > Did I forget to do something ? > > Thanks > > Remi > > > > ------------------------------------------------ > Remi SCHNEKENBURGER > CEA / SACLAY > L-LSP > 91191 Gif s/ Yvette > > tel : (+33) 1 69 08 29 79 > fax : (+33) 69 08 20 82 > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Xpa-users mailing list > Xpa...@li... > https://lists.sourceforge.net/lists/listinfo/xpa-users > |
From: SCHNEKENBURGER R. C. <SCH...@or...> - 2004-01-08 10:57:06
|
Having downloaded and unzipped XPA, I followed the installation instructions: I added the two .jar in my classpath. I then tried to compile the few examples in the archive. During the compilation, some errors occured (84 to be precise). I don't have access to all packages "de.zeigermann.xpa......". I'm using jdk 1.4, and when I verified my classpath, the two xpa.jar are present. Did I forget to do something ? Thanks Remi ------------------------------------------------ Remi SCHNEKENBURGER CEA / SACLAY L-LSP 91191 Gif s/ Yvette tel : (+33) 1 69 08 29 79 fax : (+33) 69 08 20 82 |
From: Oliver Z. <ol...@ze...> - 2004-01-05 16:18:19
|
SCHNEKENBURGER Remi CRIT wrote: > /You do not need both grammars / parsers. You can just use the AST part / > > that is generated directly from the XML. > > > > So it is possible to have an AST generated directly from XML. Is this possible thanks to XPA? No grammar must be written ? Just to have an AST no grammar is needed, that's correct. Further processing the AST driven by a tree grammar is possible after reading XML into an AST. Both tasks, i.e. reading XML into an AST without and transformating this XML based AST are tasks provided by XPA. Oliver |
From: SCHNEKENBURGER R. C. <SCH...@or...> - 2004-01-05 09:44:18
|
You do not need both grammars / parsers. You can just use the AST part that is generated directly from the XML. So it is possible to have an AST generated directly from XML. Is this possible thanks to XPA? No grammar must be written ? |
From: Oliver Z. <ol...@ze...> - 2003-12-20 12:32:31
|
From: Oliver Z. <ol...@ze...> - 2003-12-20 12:13:06
|
SCHNEKENBURGER Remi CRIT wrote: > I'm a beginer in the worlds of XML and parsers. I have to parse an > XML file (exactly a XMI file representing a UML model). I think your > tool can be interesting for my job, so i downloaded it yesterday. I > tried to understand how it worked, but I gave up after few hours. > >>From the XMI file, I have to build an AST (a requisite from my > chief). Then I have to walk through the tree and generate code. > Which strategy should I use? I did not exactly understand the place > of XPA in ANTLR. XPA allows you to use ANTLR token and tree parsers operating on XML. You can either use both token / tree type combined or only one of them, depending on what you want to do. > All I understood is that I have to write two grammars, one for the > token parser and another one for the tree parsing. the second one > should not be too hard, as I already know the form it should have. > But I do not know how to write the token parser. I thought I could > write a parser recognizing the tags directly from the file, that's > why I don't understand the need to use your tool. You do not need both grammars / parsers. You can just use the AST part that is generated directly from the XML. > My second question is that I have a DTD, so my XMI file can be > validated. As we can consider that the dtd is a grammar for the Xmi > file, does a working tool exist to translate the dtd to a grammar for antlr. > > For example, i have a dtd that make my xmi file valid to represent a > model, and I would like to generate direclty a grammar for antlr for > the token parser. Is this possible. do you already know a tool that > does this. (I've tried SmartTools from the INRIA (a research center > in france), but it did not work (the tool is still in developpment. > For the www page : http://www-sop.inria.fr/oasis/SmartTools/st4up/). >>From a Dtd file, it should generate a xml parser. Do you know > another tool that does that? No, but the important and the biggest part of the work of your tree grammar should be the actions anyhow, right? So, there is little need for such I tool as I understand. Cheers Oliver > Thanks for your attention (My mail is quite long and surely not very > clear, I apologize for my bad english) > > Remi Schnekenburger > ------------------------------------------- > Engineer at the Nuclear research center > Department of software development > Mail : rem...@ce... > ------------------------------------------- > > |
From: Oliver Z. <ol...@ze...> - 2003-12-19 12:09:43
|
From: Oliver Z. <ol...@ze...> - 2003-12-19 11:39:46
|
Hi folks! This is the list to post in issues reltated to the *use* of XPA. Cheers, Oliver |
From: SCHNEKENBURGER R. C. <SCH...@or...> - 2003-12-19 09:54:13
|
I'm a beginer in the worlds of XML and parsers. I have to parse an XML file (exactly a XMI file representing a UML model). I think your tool can be interesting for my job, so i downloaded it yesterday. I tried to understand how it worked, but I gave up after few hours. From the XMI file, I have to build an AST (a requisite from my chief). Then I have to walk through the tree and generate code. Which strategy should I use? I did not exactly understand the place of XPA in ANTLR. All I understood is that I have to write two grammars, one for the token parser and another one for the tree parsing. the second one should not be too hard, as I already know the form it should have. But I do not know how to write the token parser. I thought I could write a parser recognizing the tags directly from the file, that's why I don't understand the need to use your tool. My second question is that I have a DTD, so my XMI file can be validated. As we can consider that the dtd is a grammar for the Xmi file, does a working tool exist to translate the dtd to a grammar for antlr. For example, i have a dtd that make my xmi file valid to represent a model, and I would like to generate direclty a grammar for antlr for the token parser. Is this possible. do you already know a tool that does this. (I've tried SmartTools from the INRIA (a research center in france), but it did not work (the tool is still in developpment. For the www page : http://www-sop.inria.fr/oasis/SmartTools/st4up/). From a Dtd file, it should generate a xml parser. Do you know another tool that does that? Thanks for your attention (My message is quite long and surely not very clear, I apologize for my bad english) Remi Schnekenburger ------------------------------------------------ Remi SCHNEKENBURGER Engineer at the CEA / SACLAY (nuclear research center) Software Engineering L-LSP 91191 Gif s/ Yvette |