RE: Problems with SQLTransformer
Your step a) makes it sound like this has nothing to do with SQL transformer - that's the step that works unless I misunderstand you. When you say you see only data and no xml tags in the browser that sounds like a common non-problem I see all the time. A few questions: 1) Are the tags there when you do View Source in your browser? 2) When in e) you say modifications have no effect do you mean that if you literally re-arrange or remove items from the final output those changes are not reflected? 3) Have you ensured that any namespaces in use are not the problem? (the xsl is looking for foo but is finding ns:foo ?) Geoff Howard -Original Message- From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:01 AM To: [EMAIL PROTECTED] Subject: Problems with SQLTransformer Hi, I start a new thread about it because the problem deserves this and I'm desperate ;-) map:generate src=docs/consulta.xml/ map:transform type=sql map:parameter name=use-connection value=cocoon/ /map:transform map:transform src=stylesheets/usuaris.xsl/ map:serialize type=xml/ Looking at the source code of the generated xml with the browser I see only data no xml tags. Only the initial one: ?xml I've been making some changes and it seems like after the SQLTransform I can't put a XSLTransform. I've tried the following things: a) Take off the XSL transform and the result is correct. The data I get can be processed with xalan and usuaris.xsl and I get a new well formed XML file. b) Change the name of usuaris.xsl (just in case I was modifing the wrong one) and it gives an error as cocoon can't find the file. c) Leave usuaris.xsl empty and It gives an error. d) Only leave the initial and final xsl:stylesheet tags and the output is the same. e) Various modifications in the xsl file but does not seem to affect to the output unless it is bad formed, then it gives an error. So the file is processed but incorrectly? I don't know if it might be a bug or I'm really doing something very wrong, but it should be pretty stright forward, shouldn't it? Well... thanks for your patience ;-) Thanks! It worked without problems! But of course I couldn't wait until having another problem ;-) The thing is that I'm trying to make this work: sitemap.xmap: map:generate src=docs/usuaris.xml/ map:transform src=stylesheets/usuaris.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:transform type=sql map:parameter name=use-connection value=cocoon/ /map:transform map:transform src=stylesheets/usuaris.xsl/ map:serialize type=xml/ While debugging I commented the last transform and data arrives as I expect. In fact, I save the xml generated file with the browser and process it with xalan using the usuaris.xsl and it works! But if I use this transform in the sitemap I get all the fields returned but without any XML tags. (It should return as xalan all the authentication XML structure) Yes I know I'm using the same stylesheet twice but its for an authentication process and It should work :-) The strange thing is that last step map:transform src=stylesheets/usuaris.xsl/. Any clue? Thanks, once again! PS: I believe, after so many problems, some day I will be able to answer all the questions in this list ;-) May be a new Trivial Pursuit about cocoon? That On Thursday 08 August 2002 14:33, Vadim Gritsenko wrote: From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] I get the following error while trying to connect to a postgresql database throw the SQLTransformer: java.sql.SQLException: No suitable driver I've seen in the list archives that it's been reported various times but none of the solutions seems to correct my problem. web.xml: init-param param-nameload-class/param-name param-value org.postgresql.Driver /param-value /init-param init-param param-nameextra-classpath/param-name param-value/usr/share/java/postgresql.jar/param-value AFAIR, this will not work and has different purpose. Please jar under WEB-INF/lib. Vadim /init-param cocoon.xconf: datasources jdbc logger=core.datasources.postgres name=cocoon pool-controller max=10 min=5/ driverorg.postgresql.Driver/driver dburljdbc:postgresql://localhost/cocoon:5432/dburl usercocoon/user passwordpassword/password /jdbc /datasources I don't know if org.postgresql.Driver is necessari in both files but I started I've tried it in just one of them and doesn't work neighter. Of course access to the database is enabled correctly, the port is 5432 as NMAP says ;) and I can connect from psql. All connection data seems to be correct... Any
RE: Problems with SQLTransformer
Albert, may you show us usuaris.xsl ? Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 4:01 PM To: [EMAIL PROTECTED] Subject: Problems with SQLTransformer Hi, I start a new thread about it because the problem deserves this and I'm desperate ;-) map:generate src=docs/consulta.xml/ map:transform type=sql map:parameter name=use-connection value=cocoon/ /map:transform map:transform src=stylesheets/usuaris.xsl/ map:serialize type=xml/ Looking at the source code of the generated xml with the browser I see only data no xml tags. Only the initial one: ?xml I've been making some changes and it seems like after the SQLTransform I can't put a XSLTransform. I've tried the following things: a) Take off the XSL transform and the result is correct. The data I get can be processed with xalan and usuaris.xsl and I get a new well formed XML file. b) Change the name of usuaris.xsl (just in case I was modifing the wrong one) and it gives an error as cocoon can't find the file. c) Leave usuaris.xsl empty and It gives an error. d) Only leave the initial and final xsl:stylesheet tags and the output is the same. e) Various modifications in the xsl file but does not seem to affect to the output unless it is bad formed, then it gives an error. So the file is processed but incorrectly? I don't know if it might be a bug or I'm really doing something very wrong, but it should be pretty stright forward, shouldn't it? Well... thanks for your patience ;-) Thanks! It worked without problems! But of course I couldn't wait until having another problem ;-) The thing is that I'm trying to make this work: sitemap.xmap: map:generate src=docs/usuaris.xml/ map:transform src=stylesheets/usuaris.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:transform type=sql map:parameter name=use-connection value=cocoon/ /map:transform map:transform src=stylesheets/usuaris.xsl/ map:serialize type=xml/ While debugging I commented the last transform and data arrives as I expect. In fact, I save the xml generated file with the browser and process it with xalan using the usuaris.xsl and it works! But if I use this transform in the sitemap I get all the fields returned but without any XML tags. (It should return as xalan all the authentication XML structure) Yes I know I'm using the same stylesheet twice but its for an authentication process and It should work :-) The strange thing is that last step map:transform src=stylesheets/usuaris.xsl/. Any clue? Thanks, once again! PS: I believe, after so many problems, some day I will be able to answer all the questions in this list ;-) May be a new Trivial Pursuit about cocoon? That On Thursday 08 August 2002 14:33, Vadim Gritsenko wrote: From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] I get the following error while trying to connect to a postgresql database throw the SQLTransformer: java.sql.SQLException: No suitable driver I've seen in the list archives that it's been reported various times but none of the solutions seems to correct my problem. web.xml: init-param param-nameload-class/param-name param-value org.postgresql.Driver /param-value /init-param init-param param-nameextra-classpath/param-name param-value/usr/share/java/postgresql.jar/param-value AFAIR, this will not work and has different purpose. Please jar under WEB-INF/lib. Vadim /init-param cocoon.xconf: datasources jdbc logger=core.datasources.postgres name=cocoon pool-controller max=10 min=5/ driverorg.postgresql.Driver/driver dburljdbc:postgresql://localhost/cocoon:5432/dburl usercocoon/user passwordpassword/password /jdbc /datasources I don't know if org.postgresql.Driver is necessari in both files but I started I've tried it in just one of them and doesn't work neighter. Of course access to the database is enabled correctly, the port is 5432 as NMAP says ;) and I can connect from psql. All connection data seems to be correct... Any other ideas?? Thanks! Albert Cervera Areny - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Albert
RE: Problems with SQLTransformer
Hi, This is what I receive after the SQLTransform when I look it through the browser (option view source code) ?xml version=1.0 encoding=UTF-8? rowset row id081778/id role/ nomname/nom passwdpaswd/passwd programaprogname/programa /row /rowset After the XSLTransform, the browser gives an error (because no initial tag in the xml file) and if I look at the source code of the page I see: ?xml version=1.0 encoding=UTF-8? 081778namepassdprogname About the usuaris.xsl it is quite simple: ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=rowset xsl:apply-templates/ /xsl:template xsl:template match=row authentication IDxsl:value-of select=id//ID rolexsl:value-of select=role//role data xsl:copy-of select=nom/ xsl:copy-of select=programa/ xsl:copy-of select=instruccions/ /data /authentication /xsl:template /xsl:stylesheet Your step a) makes it sound like this has nothing to do with SQL transformer - that's the step that works unless I misunderstand you. When you say you see only data and no xml tags in the browser that sounds like a common non-problem I see all the time. A few questions: 1) Are the tags there when you do View Source in your browser? 2) When in e) you say modifications have no effect do you mean that if you literally re-arrange or remove items from the final output those changes are not reflected? I mean that if instead of the above code I put the following for usuaris.xsl: ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; /xsl:stylesheet Or ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=rowset hello /xsl:template /xsl:stylesheet The output is exactly the same! 3) Have you ensured that any namespaces in use are not the problem? (the xsl is looking for foo but is finding ns:foo ?) Geoff Howard -Original Message- From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:01 AM To: [EMAIL PROTECTED] Subject: Problems with SQLTransformer Hi, I start a new thread about it because the problem deserves this and I'm desperate ;-) map:generate src=docs/consulta.xml/ map:transform type=sql map:parameter name=use-connection value=cocoon/ /map:transform map:transform src=stylesheets/usuaris.xsl/ map:serialize type=xml/ Looking at the source code of the generated xml with the browser I see only data no xml tags. Only the initial one: ?xml I've been making some changes and it seems like after the SQLTransform I can't put a XSLTransform. I've tried the following things: a) Take off the XSL transform and the result is correct. The data I get can be processed with xalan and usuaris.xsl and I get a new well formed XML file. b) Change the name of usuaris.xsl (just in case I was modifing the wrong one) and it gives an error as cocoon can't find the file. c) Leave usuaris.xsl empty and It gives an error. d) Only leave the initial and final xsl:stylesheet tags and the output is the same. e) Various modifications in the xsl file but does not seem to affect to the output unless it is bad formed, then it gives an error. So the file is processed but incorrectly? I don't know if it might be a bug or I'm really doing something very wrong, but it should be pretty stright forward, shouldn't it? Well... thanks for your patience ;-) Thanks! It worked without problems! But of course I couldn't wait until having another problem ;-) The thing is that I'm trying to make this work: sitemap.xmap: map:generate src=docs/usuaris.xml/ map:transform src=stylesheets/usuaris.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:transform type=sql map:parameter name=use-connection value=cocoon/ /map:transform map:transform src=stylesheets/usuaris.xsl/ map:serialize type=xml/ While debugging I commented the last transform and data arrives as I expect. In fact, I save the xml generated file with the browser and process it with xalan using the usuaris.xsl and it works! But if I use this transform in the sitemap I get all the fields returned but without any XML tags. (It should return as xalan all the authentication XML structure) Yes I know I'm using the same stylesheet twice but its for an authentication process and It should work :-) The strange thing is that last step map:transform src=stylesheets/usuaris.xsl/. Any clue? Thanks, once again! PS: I believe, after so many problems, some day I will be able to answer all the questions in this list ;-) May be a new Trivial Pursuit about cocoon? That
Re: Problems with SQLTransformer
On 09.Aug.2002 -- 05:13 PM, Albert Cervera Areny wrote: Hi, This is what I receive after the SQLTransform when I look it through the browser (option view source code) ?xml version=1.0 encoding=UTF-8? rowset row id081778/id role/ nomname/nom passwdpaswd/passwd programaprogname/programa /row /rowset After the XSLTransform, the browser gives an error (because no initial tag in the xml file) and if I look at the source code of the page I see: ?xml version=1.0 encoding=UTF-8? 081778namepassdprogname About the usuaris.xsl it is quite simple: ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=rowset xsl:apply-templates/ /xsl:template xsl:template match=row authentication IDxsl:value-of select=id//ID rolexsl:value-of select=role//role data xsl:copy-of select=nom/ xsl:copy-of select=programa/ xsl:copy-of select=instruccions/ /data /authentication /xsl:template /xsl:stylesheet You need to copy all other elements explicitly! !-- Copy all nodes that were not handled by a dedicated template. -- xsl:template match=@*|node() priority=-2 xsl:copy xsl:apply-templates select=@*|node()/ /xsl:copy /xsl:template Best, to use logicsheet-util.xsl in your own logicsheets. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with SQLTransformer
-Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 11:19 AM To: [EMAIL PROTECTED] Subject: Re: Problems with SQLTransformer You need to copy all other elements explicitly! ? I don't see any that he didn't handle. !-- Copy all nodes that were not handled by a dedicated template. -- xsl:template match=@*|node() priority=-2 xsl:copy xsl:apply-templates select=@*|node()/ /xsl:copy /xsl:template Best, to use logicsheet-util.xsl in your own logicsheets. Chris. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with SQLTransformer
081778namepassdprogname This looks like the default template for elements which just copies their value. As an experiment, try this: ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=rowset authentication xsl:apply-templates/ /authentication /xsl:template xsl:template match=row IDxsl:value-of select=id//ID rolexsl:value-of select=role//role data xsl:copy-of select=nom/ xsl:copy-of select=programa/ xsl:copy-of select=instruccions/ /data /xsl:template /xsl:stylesheet 2) When in e) you say modifications have no effect do you mean that if you literally re-arrange or remove items from the final output those changes are not reflected? I mean that if instead of the above code I put the following for usuaris.xsl: ... ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=rowset hello /xsl:template /xsl:stylesheet The output is exactly the same! Well, if you can't get hello to show up in that last example, then it looks more like you've got some kind of caching issue going on. The sql transformer should keep any caching from happening, but maybe there's a problem. I'd recommend first making absolutely sure that your browser is not caching these results, then make sure cocoon is not caching them. Either change to a non-caching pipeline, or shut cocoon down, find the work directory and delete everything from it, and the restart cocoon and try again. Geoff - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with SQLTransformer
Hi, Could you try to add to your xsl a template for the root node like this: xsl:template match=/ xsl:apply-templates/ /xsl:template or just modify the template for rowset like this: xsl:template match=/rowset xsl:apply-templates/ /xsl:template Roman Albert Cervera Areny wrote: Hi, This is what I receive after the SQLTransform when I look it through the browser (option view source code) ?xml version=1.0 encoding=UTF-8? rowset row id081778/id role/ nomname/nom passwdpaswd/passwd programaprogname/programa /row /rowset After the XSLTransform, the browser gives an error (because no initial tag in the xml file) and if I look at the source code of the page I see: ?xml version=1.0 encoding=UTF-8? 081778namepassdprogname About the usuaris.xsl it is quite simple: ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=rowset xsl:apply-templates/ /xsl:template xsl:template match=row authentication IDxsl:value-of select=id//ID rolexsl:value-of select=role//role data xsl:copy-of select=nom/ xsl:copy-of select=programa/ xsl:copy-of select=instruccions/ /data /authentication /xsl:template /xsl:stylesheet Your step a) makes it sound like this has nothing to do with SQL transformer - that's the step that works unless I misunderstand you. When you say you see only data and no xml tags in the browser that sounds like a common non-problem I see all the time. A few questions: 1) Are the tags there when you do View Source in your browser? 2) When in e) you say modifications have no effect do you mean that if you literally re-arrange or remove items from the final output those changes are not reflected? I mean that if instead of the above code I put the following for usuaris.xsl: ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; /xsl:stylesheet Or ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=rowset hello /xsl:template /xsl:stylesheet The output is exactly the same! 3) Have you ensured that any namespaces in use are not the problem? (the xsl is looking for foo but is finding ns:foo ?) Geoff Howard -Original Message- From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:01 AM To: [EMAIL PROTECTED] Subject: Problems with SQLTransformer Hi, I start a new thread about it because the problem deserves this and I'm desperate ;-) map:generate src=docs/consulta.xml/ map:transform type=sql map:parameter name=use-connection value=cocoon/ /map:transform map:transform src=stylesheets/usuaris.xsl/ map:serialize type=xml/ Looking at the source code of the generated xml with the browser I see only data no xml tags. Only the initial one: ?xml I've been making some changes and it seems like after the SQLTransform I can't put a XSLTransform. I've tried the following things: a) Take off the XSL transform and the result is correct. The data I get can be processed with xalan and usuaris.xsl and I get a new well formed XML file. b) Change the name of usuaris.xsl (just in case I was modifing the wrong one) and it gives an error as cocoon can't find the file. c) Leave usuaris.xsl empty and It gives an error. d) Only leave the initial and final xsl:stylesheet tags and the output is the same. e) Various modifications in the xsl file but does not seem to affect to the output unless it is bad formed, then it gives an error. So the file is processed but incorrectly? I don't know if it might be a bug or I'm really doing something very wrong, but it should be pretty stright forward, shouldn't it? Well... thanks for your patience ;-) Thanks! It worked without problems! But of course I couldn't wait until having another problem ;-) The thing is that I'm trying to make this work: sitemap.xmap: map:generate src=docs/usuaris.xml/ map:transform src=stylesheets/usuaris.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:transform type=sql map:parameter name=use-connection value=cocoon/ /map:transform map:transform src=stylesheets/usuaris.xsl/ map:serialize type=xml/ While debugging I commented the last transform and data arrives as I expect. In fact, I save the xml generated file with the browser and process it with xalan using the usuaris.xsl and it works! But if I use this transform in the sitemap I get all the fields returned but without any XML tags. (It should return as xalan all the
RE: Problems with SQLTransformer
Yes!!! Finally that worked! Buff I've spent so many hours with it... I think I should revise the namespace lesson ;-) Thanks to everyone for your suggestions! I promise to come back soon with a new challenge: Italy: one Rest of the world: zero ;-) and hopefully some answers too Albert, you should declare the sql namespace in usuaris.xsl; moreover, don't forget to add sql: in front of row and rowset template matching. Yes, I know the sql: namespace is not displayed in your SQLTransformer output, but, nevertheless, could you please try ? Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 5:13 PM To: [EMAIL PROTECTED] Subject: RE: Problems with SQLTransformer Hi, This is what I receive after the SQLTransform when I look it through the browser (option view source code) ?xml version=1.0 encoding=UTF-8? rowset row id081778/id role/ nomname/nom passwdpaswd/passwd programaprogname/programa /row /rowset After the XSLTransform, the browser gives an error (because no initial tag in the xml file) and if I look at the source code of the page I see: ?xml version=1.0 encoding=UTF-8? 081778namepassdprogname About the usuaris.xsl it is quite simple: ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=rowset xsl:apply-templates/ /xsl:template xsl:template match=row authentication IDxsl:value-of select=id//ID rolexsl:value-of select=role//role data xsl:copy-of select=nom/ xsl:copy-of select=programa/ xsl:copy-of select=instruccions/ /data /authentication /xsl:template /xsl:stylesheet Your step a) makes it sound like this has nothing to do with SQL transformer - that's the step that works unless I misunderstand you. When you say you see only data and no xml tags in the browser that sounds like a common non-problem I see all the time. A few questions: 1) Are the tags there when you do View Source in your browser? 2) When in e) you say modifications have no effect do you mean that if you literally re-arrange or remove items from the final output those changes are not reflected? I mean that if instead of the above code I put the following for usuaris.xsl: ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; /xsl:stylesheet Or ?xml version=1.0 encoding=iso-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=rowset hello /xsl:template /xsl:stylesheet The output is exactly the same! 3) Have you ensured that any namespaces in use are not the problem? (the xsl is looking for foo but is finding ns:foo ?) Geoff Howard -Original Message- From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:01 AM To: [EMAIL PROTECTED] Subject: Problems with SQLTransformer Hi, I start a new thread about it because the problem deserves this and I'm desperate ;-) map:generate src=docs/consulta.xml/ map:transform type=sql map:parameter name=use-connection value=cocoon/ /map:transform map:transform src=stylesheets/usuaris.xsl/ map:serialize type=xml/ Looking at the source code of the generated xml with the browser I see only data no xml tags. Only the initial one: ?xml I've been making some changes and it seems like after the SQLTransform I can't put a XSLTransform. I've tried the following things: a) Take off the XSL transform and the result is correct. The data I get can be processed with xalan and usuaris.xsl and I get a new well formed XML file. b) Change the name of usuaris.xsl (just in case I was modifing the wrong one) and it gives an error as cocoon can't find the file. c) Leave usuaris.xsl empty and It gives an error. d) Only leave the initial and final xsl:stylesheet tags and the output is the same. e) Various modifications in the xsl file but does not seem to affect to the output unless it is bad formed, then it gives an error. So the file is processed but incorrectly? I don't know if it might be a bug or I'm really doing something very wrong, but it should be pretty stright forward, shouldn't it? Well... thanks for your patience ;-) Thanks! It worked without problems! But of course I couldn't wait until having another problem ;-) The thing is that I'm trying to make this work