You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2009/05/20 17:46:45 UTC

[jira] Created: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
--------------------------------------------------------------------------------------------

                 Key: TAP5-713
                 URL: https://issues.apache.org/jira/browse/TAP5-713
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-core
    Affects Versions: 5.1.0.5
            Reporter: Howard M. Lewis Ship


The StAX APIs are not on the GAE "white list".

Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by Christian Edward Gruber <ch...@gmail.com>.
Hmm.  I think you could even wrap the bind() stuff up if you made an  
auto-loading module and had this in its own jar as an additional  
package.  Then you just add it as a dependency, exclude woodstox (per  
your instruction), and voila - fewer lines of code to write to add it.

Christian.

On 2009-08-06, at 07:38 , Christian Köberl (JIRA) wrote:

>
>     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel 
>  ]
>
> Christian Köberl updated TAP5-713:
> ----------------------------------
>
>    Attachment: SaxTemplateParserImpl.java
>
> Here is my final version - everthing seems to work (except see below).
>
> To use it in your 5.1 version you'll have to:
>
> 1. Remove Woodstox Depdency:
> 			<dependency>
> 				<groupId>org.apache.tapestry</groupId>
> 				<artifactId>tapestry-core</artifactId>
> 				<version>${tapestry-version}</version>
> 				<exclusions>
> 					<exclusion>
> 					  <groupId>org.codehaus.woodstox</groupId>
> 					  <artifactId>woodstox-core-asl</artifactId>
> 			        </exclusion>
> 				</exclusions>
> 			</dependency>
>
> 2. Add this to your AppModule:
>
> 	public static void bind(ServiceBinder binder)
> 	{
> 		binder.bind(TemplateParser.class,  
> SaxTemplateParserImpl.class).withId("TemplateParserOverride");
> 	}
>
>    public static void contributeTemplateParserOverride 
> (MappedConfiguration<String, URL> config)
>    {
>        // Any class inside the internal module would do. Or we could  
> move all these
>        // files to o.a.t.services.
>
>        Class<UpdateListenerHubImpl> c = UpdateListenerHubImpl.class;
>
>        config.add("-//W3C//DTD XHTML 1.0 Strict//EN", c.getResource 
> ("xhtml1-strict.dtd"));
>        config.add("-//W3C//DTD XHTML 1.0 Transitional//EN", c
>                .getResource("xhtml1-transitional.dtd"));
>        config.add("-//W3C//DTD XHTML 1.0 Frameset//EN", c.getResource 
> ("xhtml1-frameset.dtd"));
>        config.add("-//W3C//DTD HTML 4.01//EN", c.getResource("xhtml1- 
> strict.dtd"));
>        config.add("-//W3C//DTD HTML 4.01 Transitional//EN", c
>                .getResource("xhtml1-transitional.dtd"));
>        config.add("-//W3C//DTD HTML 4.01 Frameset//EN", c.getResource 
> ("xhtml1-frameset.dtd"));
>        config.add("-//W3C//ENTITIES Latin 1 for XHTML//EN",  
> c.getResource("xhtml-lat1.ent"));
>        config.add("-//W3C//ENTITIES Symbols for XHTML//EN",  
> c.getResource("xhtml-symbol.ent"));
>        config.add("-//W3C//ENTITIES Special for XHTML//EN",  
> c.getResource("xhtml-special.ent"));
>    }
>
> 	public static void contributeServiceOverride 
> (MappedConfiguration<Class, Object> configuration,
> 		@Local TemplateParser override)
> 	{
> 		configuration.add(TemplateParser.class, override);
> 	}
>
> Voila - you have a non-Stax Tapestry.
>
> I still get the 2 errors in the TemplateParserImplTest when running  
> the whole suite from command line. When I run just single test from  
> Eclipse (for debugging) it works fine:
> - parse_failure 
> (org.apache.tapestry5.internal.services.TemplateParserImplTest) Time  
> elapsed: 0 sec <<< FAILURE!
> java.lang.AssertionError: expected:<2> but was:<4>
> - just_HTML 
> (org.apache.tapestry5.internal.services.TemplateParserImplTest) Time  
> elapsed: 0 sec <<< FAILURE!
> java.lang.AssertionError: expected:<6> but was:<8>
> These problems are just line numbers that don't match - so I will  
> not investigate any further.
>
>> Change template parser to not use STAX, as it is not (yet)  
>> compatible with Google App Engine
>> --------------------------------------------------------------------------------------------
>>
>>                Key: TAP5-713
>>                URL: https://issues.apache.org/jira/browse/TAP5-713
>>            Project: Tapestry 5
>>         Issue Type: Improvement
>>         Components: tapestry-core
>>   Affects Versions: 5.1.0.5
>>           Reporter: Howard M. Lewis Ship
>>        Attachments: SaxTemplateParserImpl.java,  
>> SaxTemplateParserImpl.java, SaxTemplateParserImpl.java,  
>> SaxTemplateParserImpl.java
>>
>>
>> The StAX APIs are not on the GAE "white list".
>> Should be reasonable ot change the code, by using a SAX parser that  
>> parses the template into a list of tokens, and then iterate down  
>> the token list as we do today using StAX.  End result will be fewer  
>> dependencies to boot.
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>

Christian Edward Gruber
e-mail: christianedwardgruber@gmail.com
weblog: http://www.geekinasuit.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Köberl updated TAP5-713:
----------------------------------

    Attachment: SaxTemplateParserImpl.java

Here is my final version - everthing seems to work (except see below).

To use it in your 5.1 version you'll have to:

1. Remove Woodstox Depdency:
			<dependency>
				<groupId>org.apache.tapestry</groupId>
				<artifactId>tapestry-core</artifactId>
				<version>${tapestry-version}</version>
				<exclusions>
					<exclusion>
					  <groupId>org.codehaus.woodstox</groupId>
					  <artifactId>woodstox-core-asl</artifactId>
			        </exclusion>
				</exclusions>
			</dependency>

2. Add this to your AppModule:

	public static void bind(ServiceBinder binder)
	{
		binder.bind(TemplateParser.class, SaxTemplateParserImpl.class).withId("TemplateParserOverride");
	}

    public static void contributeTemplateParserOverride(MappedConfiguration<String, URL> config)
    {
        // Any class inside the internal module would do. Or we could move all these
        // files to o.a.t.services.

        Class<UpdateListenerHubImpl> c = UpdateListenerHubImpl.class;

        config.add("-//W3C//DTD XHTML 1.0 Strict//EN", c.getResource("xhtml1-strict.dtd"));
        config.add("-//W3C//DTD XHTML 1.0 Transitional//EN", c
                .getResource("xhtml1-transitional.dtd"));
        config.add("-//W3C//DTD XHTML 1.0 Frameset//EN", c.getResource("xhtml1-frameset.dtd"));
        config.add("-//W3C//DTD HTML 4.01//EN", c.getResource("xhtml1-strict.dtd"));
        config.add("-//W3C//DTD HTML 4.01 Transitional//EN", c
                .getResource("xhtml1-transitional.dtd"));
        config.add("-//W3C//DTD HTML 4.01 Frameset//EN", c.getResource("xhtml1-frameset.dtd"));
        config.add("-//W3C//ENTITIES Latin 1 for XHTML//EN", c.getResource("xhtml-lat1.ent"));
        config.add("-//W3C//ENTITIES Symbols for XHTML//EN", c.getResource("xhtml-symbol.ent"));
        config.add("-//W3C//ENTITIES Special for XHTML//EN", c.getResource("xhtml-special.ent"));
    }

	public static void contributeServiceOverride(MappedConfiguration<Class, Object> configuration,
		@Local TemplateParser override)
	{
		configuration.add(TemplateParser.class, override);
	}

Voila - you have a non-Stax Tapestry.

I still get the 2 errors in the TemplateParserImplTest when running the whole suite from command line. When I run just single test from Eclipse (for debugging) it works fine:
- parse_failure(org.apache.tapestry5.internal.services.TemplateParserImplTest) Time elapsed: 0 sec <<< FAILURE!
java.lang.AssertionError: expected:<2> but was:<4>
- just_HTML(org.apache.tapestry5.internal.services.TemplateParserImplTest) Time elapsed: 0 sec <<< FAILURE!
java.lang.AssertionError: expected:<6> but was:<8>
These problems are just line numbers that don't match - so I will not investigate any further.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use StAX, as it is not (yet) compatible with Google App Engine

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-713:
--------------------------------------

    Summary: Change template parser to not use StAX, as it is not (yet) compatible with Google App Engine  (was: Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine)

> Change template parser to not use StAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.0
>
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761516#action_12761516 ] 

Christian Köberl commented on TAP5-713:
---------------------------------------

Here is the implementation in a maven project (for those who need it in 5.1):
http://wiki.github.com/derkoe/tapestry-sax-parser

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-713:
-----------------------------------------

    Assignee: Howard M. Lewis Ship

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by Christian Gruber <ch...@gmail.com>.
At this point, one thing that would help is to have a first-class  
documented way of getting a woodstox parser without using the  
singleton, so we can properly avoid having to set system parameters to  
get it.  While this works if you have access to the JVM configuration,  
on something like Google App Engine, you don't - you're being loaded  
into a JVM that doesn't allow System properties to be played with.    
But if I can instantiate it, then I can contribute it to the IoC  
container, and then the template parser can consume it.

Christian.

On Jul 10, 2009, at 12:36 AM, Tatu Saloranta (JIRA) wrote:

>
>    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729518 
> #action_12729518 ]
>
> Tatu Saloranta commented on TAP5-713:
> -------------------------------------
>
> Huh? Woodstox does not use FactoryFinder for anything. Only thing I  
> think does is the Stax API. Nothing to do with Woodstox; same would  
> apply to JDK6-bundled Stax implementation (Sun Sjsxp). Ditto for  
> OSGi: Stax/SAX/JAXP all use introspection mechanism that does not  
> work well with OSGi. This is the same for all implementations.
>
> Also -- if and when there are concerns about Woodstox, would it kill  
> you to maybe contact Woodstox project team?
> It is rather frustrating to find that many have enough time to  
> complain, whine, and hack around things, but not enough to actually  
> take time to try to resolve problems. Most open source packages have  
> competent and friendly maintainers, who can be concated to help  
> resolve issues (or point out that issues are elsewhere as the case  
> may be).
>
> Finally: maybe it'd be good to make stax implementation a "provided"  
> dependency: provided by platform or added by users. That way it  
> could use whichever implementation user chose; either the best, or  
> one that container or JDK provides.
>
>
>> Change template parser to not use STAX, as it is not (yet)  
>> compatible with Google App Engine
>> --------------------------------------------------------------------------------------------
>>
>>                Key: TAP5-713
>>                URL: https://issues.apache.org/jira/browse/TAP5-713
>>            Project: Tapestry 5
>>         Issue Type: Improvement
>>         Components: tapestry-core
>>   Affects Versions: 5.1.0.5
>>           Reporter: Howard M. Lewis Ship
>>
>> The StAX APIs are not on the GAE "white list".
>> Should be reasonable ot change the code, by using a SAX parser that  
>> parses the template into a list of tokens, and then iterate down  
>> the token list as we do today using StAX.  End result will be fewer  
>> dependencies to boot.
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>

Christian Edward Gruber
christianedwardgruber@gmail.com
http://www.geekinasuit.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Tatu Saloranta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729518#action_12729518 ] 

Tatu Saloranta commented on TAP5-713:
-------------------------------------

Huh? Woodstox does not use FactoryFinder for anything. Only thing I think does is the Stax API. Nothing to do with Woodstox; same would apply to JDK6-bundled Stax implementation (Sun Sjsxp). Ditto for OSGi: Stax/SAX/JAXP all use introspection mechanism that does not work well with OSGi. This is the same for all implementations.

Also -- if and when there are concerns about Woodstox, would it kill you to maybe contact Woodstox project team?
It is rather frustrating to find that many have enough time to complain, whine, and hack around things, but not enough to actually take time to try to resolve problems. Most open source packages have competent and friendly maintainers, who can be concated to help resolve issues (or point out that issues are elsewhere as the case may be).

Finally: maybe it'd be good to make stax implementation a "provided" dependency: provided by platform or added by users. That way it could use whichever implementation user chose; either the best, or one that container or JDK provides.


> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711357#action_12711357 ] 

Igor Drobiazko commented on TAP5-713:
-------------------------------------

+1 for it. 
The woodstox's approach to FactoryFinder is a mess. It causes a lot of class loading problems in OSGi. I spent a lot of time migrating 5.0 Tapestry-OSGi bundle to 5.1. We should drop this dependency.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711357#action_12711357 ] 

Igor Drobiazko commented on TAP5-713:
-------------------------------------

+1 for it. 
The woodstox's approach to FactoryFinder is a mess. It causes a lot of class loading problems in OSGi. I spent a lot of time migrating 5.0 Tapestry-OSGi bundle to 5.1. We should drop this dependency.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use StAX, as it is not (yet) compatible with Google App Engine

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-713:
--------------------------------------

    Summary: Change template parser to not use StAX, as it is not (yet) compatible with Google App Engine  (was: Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine)

> Change template parser to not use StAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.0
>
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Köberl updated TAP5-713:
----------------------------------

    Attachment: SaxTemplateParserImpl.java

Here's the newest version of SaxTemplateParserImpl. I fixed the mustBeRoot check - DTD tokens are allowed before root element.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Köberl updated TAP5-713:
----------------------------------

    Attachment: SaxTemplateParserImpl.java

Here is my final version - everthing seems to work (except see below).

To use it in your 5.1 version you'll have to:

1. Remove Woodstox Depdency:
			<dependency>
				<groupId>org.apache.tapestry</groupId>
				<artifactId>tapestry-core</artifactId>
				<version>${tapestry-version}</version>
				<exclusions>
					<exclusion>
					  <groupId>org.codehaus.woodstox</groupId>
					  <artifactId>woodstox-core-asl</artifactId>
			        </exclusion>
				</exclusions>
			</dependency>

2. Add this to your AppModule:

	public static void bind(ServiceBinder binder)
	{
		binder.bind(TemplateParser.class, SaxTemplateParserImpl.class).withId("TemplateParserOverride");
	}

    public static void contributeTemplateParserOverride(MappedConfiguration<String, URL> config)
    {
        // Any class inside the internal module would do. Or we could move all these
        // files to o.a.t.services.

        Class<UpdateListenerHubImpl> c = UpdateListenerHubImpl.class;

        config.add("-//W3C//DTD XHTML 1.0 Strict//EN", c.getResource("xhtml1-strict.dtd"));
        config.add("-//W3C//DTD XHTML 1.0 Transitional//EN", c
                .getResource("xhtml1-transitional.dtd"));
        config.add("-//W3C//DTD XHTML 1.0 Frameset//EN", c.getResource("xhtml1-frameset.dtd"));
        config.add("-//W3C//DTD HTML 4.01//EN", c.getResource("xhtml1-strict.dtd"));
        config.add("-//W3C//DTD HTML 4.01 Transitional//EN", c
                .getResource("xhtml1-transitional.dtd"));
        config.add("-//W3C//DTD HTML 4.01 Frameset//EN", c.getResource("xhtml1-frameset.dtd"));
        config.add("-//W3C//ENTITIES Latin 1 for XHTML//EN", c.getResource("xhtml-lat1.ent"));
        config.add("-//W3C//ENTITIES Symbols for XHTML//EN", c.getResource("xhtml-symbol.ent"));
        config.add("-//W3C//ENTITIES Special for XHTML//EN", c.getResource("xhtml-special.ent"));
    }

	public static void contributeServiceOverride(MappedConfiguration<Class, Object> configuration,
		@Local TemplateParser override)
	{
		configuration.add(TemplateParser.class, override);
	}

Voila - you have a non-Stax Tapestry.

I still get the 2 errors in the TemplateParserImplTest when running the whole suite from command line. When I run just single test from Eclipse (for debugging) it works fine:
- parse_failure(org.apache.tapestry5.internal.services.TemplateParserImplTest) Time elapsed: 0 sec <<< FAILURE!
java.lang.AssertionError: expected:<2> but was:<4>
- just_HTML(org.apache.tapestry5.internal.services.TemplateParserImplTest) Time elapsed: 0 sec <<< FAILURE!
java.lang.AssertionError: expected:<6> but was:<8>
These problems are just line numbers that don't match - so I will not investigate any further.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Köberl updated TAP5-713:
----------------------------------

    Attachment: SaxTemplateParserImpl.java

Here's the newest version of SaxTemplateParserImpl. I fixed the mustBeRoot check - DTD tokens are allowed before root element.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729533#action_12729533 ] 

Robert Zeigler commented on TAP5-713:
-------------------------------------

Sadly, using a "provided" dependency is practically impossible since there's no reliable, implementation-independent manner to get at the DTD, as you well know.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-713) Change template parser to not use StAX, as it is not (yet) compatible with Google App Engine

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-713.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.2.0

And the extra bonus is to reduce the number of dependencies in Tapestry.

> Change template parser to not use StAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.0
>
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Köberl updated TAP5-713:
----------------------------------

    Attachment: SaxTemplateParserImpl.java

First, good news: the parser works (my 3rd attachment)! We have it running in our test environment.

Bad news: there are still some integration tests failing, namely:
- extend_without_base_template(org.apache.tapestry5.integration.IntegrationTests)  Time elapsed: 0.328 sec  <<< FAILURE!
java.lang.AssertionError: Page did not contain 'Component org.apache.tapestry5.integration.app1.pages.InvalidTemplateExtend uses an extension template, but does not have a parent component.'.
- component_extends_parent_template(org.apache.tapestry5.integration.IntegrationTests)  Time elapsed: 0.344 sec  <<< FAILURE!
com.thoughtworks.selenium.SeleniumException: ERROR: Element title not found

Then, I get 2 errors in the TemplateParserImplTest when running the whole suite from command line. When I run just single test from Eclipse (for debugging) it works fine:
- parse_failure(org.apache.tapestry5.internal.services.TemplateParserImplTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: expected:<2> but was:<4>
- just_HTML(org.apache.tapestry5.internal.services.TemplateParserImplTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: expected:<6> but was:<8>

And finally I my template parser reports on the following test line number 3 (which I think should be correct):
{ "content_within_body_element.tml", "Content inside a Tapestry body element is not allowed", 2 },

I will investigate on this the next days - help welcome.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729533#action_12729533 ] 

Robert Zeigler commented on TAP5-713:
-------------------------------------

Sadly, using a "provided" dependency is practically impossible since there's no reliable, implementation-independent manner to get at the DTD, as you well know.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Tatu Saloranta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729518#action_12729518 ] 

Tatu Saloranta edited comment on TAP5-713 at 7/9/09 9:57 PM:
-------------------------------------------------------------

Woodstox does not use FactoryFinder for anything. Only thing that does is the Stax API itself. 
Nothing to do with Woodstox; same would apply to JDK6-bundled Stax implementation (Sun Sjsxp). Ditto for OSGi: Stax/SAX/JAXP all use introspection mechanism that does not work well with OSGi. This is the same for all implementations.

One thought regarding nature of dependency: maybe it'd be good to make stax implementation a "provided" dependency: provided by platform or added by users. That way it could use whichever implementation user chose; either the best, or one that container or JDK provides.

And finally -- if and when there are concerns about Woodstox, would it kill you to maybe quickly contact Woodstox project team? Who knows, that could even help resolve issues.
It is rather frustrating to find that there's enough time to complain, and hack around things, but apparently not enough time to collaborate. Most open source packages have competent and friendly maintainers, who can be concated to help resolve issues (or point out that issues are elsewhere as the case may be); or at least would be interested in learning of such issues.


      was (Author: cowtowncoder):
    Huh? Woodstox does not use FactoryFinder for anything. Only thing I think does is the Stax API. Nothing to do with Woodstox; same would apply to JDK6-bundled Stax implementation (Sun Sjsxp). Ditto for OSGi: Stax/SAX/JAXP all use introspection mechanism that does not work well with OSGi. This is the same for all implementations.

Also -- if and when there are concerns about Woodstox, would it kill you to maybe contact Woodstox project team?
It is rather frustrating to find that many have enough time to complain, whine, and hack around things, but not enough to actually take time to try to resolve problems. Most open source packages have competent and friendly maintainers, who can be concated to help resolve issues (or point out that issues are elsewhere as the case may be).

Finally: maybe it'd be good to make stax implementation a "provided" dependency: provided by platform or added by users. That way it could use whichever implementation user chose; either the best, or one that container or JDK provides.

  
> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Köberl updated TAP5-713:
----------------------------------

    Attachment: SaxTemplateParserImpl.java

First, good news: the parser works (my 3rd attachment)! We have it running in our test environment.

Bad news: there are still some integration tests failing, namely:
- extend_without_base_template(org.apache.tapestry5.integration.IntegrationTests)  Time elapsed: 0.328 sec  <<< FAILURE!
java.lang.AssertionError: Page did not contain 'Component org.apache.tapestry5.integration.app1.pages.InvalidTemplateExtend uses an extension template, but does not have a parent component.'.
- component_extends_parent_template(org.apache.tapestry5.integration.IntegrationTests)  Time elapsed: 0.344 sec  <<< FAILURE!
com.thoughtworks.selenium.SeleniumException: ERROR: Element title not found

Then, I get 2 errors in the TemplateParserImplTest when running the whole suite from command line. When I run just single test from Eclipse (for debugging) it works fine:
- parse_failure(org.apache.tapestry5.internal.services.TemplateParserImplTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: expected:<2> but was:<4>
- just_HTML(org.apache.tapestry5.internal.services.TemplateParserImplTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: expected:<6> but was:<8>

And finally I my template parser reports on the following test line number 3 (which I think should be correct):
{ "content_within_body_element.tml", "Content inside a Tapestry body element is not allowed", 2 },

I will investigate on this the next days - help welcome.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Köberl updated TAP5-713:
----------------------------------

    Attachment: SaxTemplateParserImpl.java

I'm currently working on a SAX implementation of the template parser - here's my first (not complete!!!) version. It passes 30 out of the 62 test cases for the template parser. I will try to finish the parser until the first week of August.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-713:
-----------------------------------------

    Assignee: Howard M. Lewis Ship

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Köberl updated TAP5-713:
----------------------------------

    Attachment: SaxTemplateParserImpl.java

My second version (still not complete!!!) 
It passes 48 out of the 62 test cases for the TemplateParserImplTest

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Tatu Saloranta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729518#action_12729518 ] 

Tatu Saloranta edited comment on TAP5-713 at 7/9/09 9:57 PM:
-------------------------------------------------------------

Woodstox does not use FactoryFinder for anything. Only thing that does is the Stax API itself. 
Nothing to do with Woodstox; same would apply to JDK6-bundled Stax implementation (Sun Sjsxp). Ditto for OSGi: Stax/SAX/JAXP all use introspection mechanism that does not work well with OSGi. This is the same for all implementations.

One thought regarding nature of dependency: maybe it'd be good to make stax implementation a "provided" dependency: provided by platform or added by users. That way it could use whichever implementation user chose; either the best, or one that container or JDK provides.

And finally -- if and when there are concerns about Woodstox, would it kill you to maybe quickly contact Woodstox project team? Who knows, that could even help resolve issues.
It is rather frustrating to find that there's enough time to complain, and hack around things, but apparently not enough time to collaborate. Most open source packages have competent and friendly maintainers, who can be concated to help resolve issues (or point out that issues are elsewhere as the case may be); or at least would be interested in learning of such issues.


      was (Author: cowtowncoder):
    Huh? Woodstox does not use FactoryFinder for anything. Only thing I think does is the Stax API. Nothing to do with Woodstox; same would apply to JDK6-bundled Stax implementation (Sun Sjsxp). Ditto for OSGi: Stax/SAX/JAXP all use introspection mechanism that does not work well with OSGi. This is the same for all implementations.

Also -- if and when there are concerns about Woodstox, would it kill you to maybe contact Woodstox project team?
It is rather frustrating to find that many have enough time to complain, whine, and hack around things, but not enough to actually take time to try to resolve problems. Most open source packages have competent and friendly maintainers, who can be concated to help resolve issues (or point out that issues are elsewhere as the case may be).

Finally: maybe it'd be good to make stax implementation a "provided" dependency: provided by platform or added by users. That way it could use whichever implementation user chose; either the best, or one that container or JDK provides.

  
> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761516#action_12761516 ] 

Christian Köberl commented on TAP5-713:
---------------------------------------

Here is the implementation in a maven project (for those who need it in 5.1):
http://wiki.github.com/derkoe/tapestry-sax-parser

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Köberl updated TAP5-713:
----------------------------------

    Attachment: SaxTemplateParserImpl.java

My second version (still not complete!!!) 
It passes 48 out of the 62 test cases for the TemplateParserImplTest

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Christian Köberl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Köberl updated TAP5-713:
----------------------------------

    Attachment: SaxTemplateParserImpl.java

I'm currently working on a SAX implementation of the template parser - here's my first (not complete!!!) version. It passes 30 out of the 62 test cases for the template parser. I will try to finish the parser until the first week of August.

> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>         Attachments: SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-713) Change template parser to not use StAX, as it is not (yet) compatible with Google App Engine

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-713.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.2.0

And the extra bonus is to reduce the number of dependencies in Tapestry.

> Change template parser to not use StAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.0
>
>         Attachments: SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java, SaxTemplateParserImpl.java
>
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-713) Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine

Posted by "Tatu Saloranta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729518#action_12729518 ] 

Tatu Saloranta commented on TAP5-713:
-------------------------------------

Huh? Woodstox does not use FactoryFinder for anything. Only thing I think does is the Stax API. Nothing to do with Woodstox; same would apply to JDK6-bundled Stax implementation (Sun Sjsxp). Ditto for OSGi: Stax/SAX/JAXP all use introspection mechanism that does not work well with OSGi. This is the same for all implementations.

Also -- if and when there are concerns about Woodstox, would it kill you to maybe contact Woodstox project team?
It is rather frustrating to find that many have enough time to complain, whine, and hack around things, but not enough to actually take time to try to resolve problems. Most open source packages have competent and friendly maintainers, who can be concated to help resolve issues (or point out that issues are elsewhere as the case may be).

Finally: maybe it'd be good to make stax implementation a "provided" dependency: provided by platform or added by users. That way it could use whichever implementation user chose; either the best, or one that container or JDK provides.


> Change template parser to not use STAX, as it is not (yet) compatible with Google App Engine
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-713
>                 URL: https://issues.apache.org/jira/browse/TAP5-713
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>
> The StAX APIs are not on the GAE "white list".
> Should be reasonable ot change the code, by using a SAX parser that parses the template into a list of tokens, and then iterate down the token list as we do today using StAX.  End result will be fewer dependencies to boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.