W3c Validation stray input tags

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

W3c Validation stray input tags

NutterzUK
Hi,

I have this in my TML file:
<input t:type="textfield" type="email" class="form-control input-sm"
t:id="emailAddress" placeholder="Enter email"
t:value="emailAddress"/>

This renders are:
<input placeholder="Enter email" id="emailAddress" class="form-control
form-control input-sm" name="emailAddress" type="email"></input>

The issue here is the input tag should close like this instead:
<input placeholder="Enter email" id="emailAddress" class="form-control
form-control input-sm" name="emailAddress" type="email"/>

Therefore, I get a W3C validation issue:
Line 109, Column 115: Stray end tag input.

This seems to be a problem already reported and (apparently) fixed, it
is listed here:
https://issues.apache.org/jira/browse/TAP5-2071

However it says that this was fixed in Tapestry 5.4.

The version of Tapestry I am using is: 5.4-beta-26, which I believe is
the latest.

I'm wondering how I go about fixing this. I haven't delved into the
Tapestry source code and don't really want to have some patch which
works just on my version, currently I just use maven to grab the
tapestry dependency and I'm not too confident changing the tapestry
source code myself (mainly as I figure this will give me a headache
when I update).

Is there an easy way to fix this, or perhaps a more up to date build I
can get from maven?
I'm currently using:
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-hibernate</artifactId>
<version>${tapestry-release-version}</version>
</dependency>

With <tapestry-release-version>5.4-beta-26</tapestry-release-version>

Thanks,
Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: W3c Validation stray input tags

NutterzUK
Hi,

Just an update, I found there is a newer version of Tapestry,
5.4-beta28 which I have updated my POM.xml to. I can see it should be
pulling in the latest version by looking at the dependency hierarchy,
but I still get this on startup:

 ______                  __             ____
/_  __/__ ____  ___ ___ / /_______ __  / __/
 / / / _ `/ _ \/ -_|_-</ __/ __/ // / /__ \
/_/  \_,_/ .__/\__/___/\__/_/  \_, / /____/
        /_/                   /___/  5.4-beta-26 (development mode)

As well as the problem with the input tags. Perhaps for some reason I
am having trouble updating, or is there an issue with the tapestry
version number?

Thanks,
Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: W3c Validation stray input tags

Chris Poulsen
It works as far as I know, its probably a code error. A guess could be that
you do not have the correct doctype in your pages.

http://jumpstart.doublenegative.com.au/jumpstart7/examples/component/html5inputtypes
outputs html5 inputs if you need an online example.

--
Chris

On Sun, Apr 26, 2015 at 2:36 PM, Stephen Nutbrown <[hidden email]>
wrote:

> Hi,
>
> Just an update, I found there is a newer version of Tapestry,
> 5.4-beta28 which I have updated my POM.xml to. I can see it should be
> pulling in the latest version by looking at the dependency hierarchy,
> but I still get this on startup:
>
>  ______                  __             ____
> /_  __/__ ____  ___ ___ / /_______ __  / __/
>  / / / _ `/ _ \/ -_|_-</ __/ __/ // / /__ \
> /_/  \_,_/ .__/\__/___/\__/_/  \_, / /____/
>         /_/                   /___/  5.4-beta-26 (development mode)
>
> As well as the problem with the input tags. Perhaps for some reason I
> am having trouble updating, or is there an issue with the tapestry
> version number?
>
> Thanks,
> Steve
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: W3c Validation stray input tags

NutterzUK
Hi Chris,

Thanks. Seems very off that I am having this issue. This is what I
have at the top of mine layouts .tml file, which I think should be
correct:

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
xmlns:p="tapestry:parameter">


When I view the source of the page it produces, it starts:
<!DOCTYPE html>
<html data-debug-enabled="true" data-locale="en"
xmlns="http://www.w3.org/1999/xhtml">

But i'm still getting the same problems. As far as the tapestry
version, this is what is confusing me:
https://www.dropbox.com/s/ps68uzfqu4cng6t/Capture.PNG?dl=0

I have cleaned the project and ran a maven update but i'm still
getting this. I'm wondering if updating the tapestry version to beta
28 will pull in the fix? Perhaps it is because I am on a slightly
older version.

Thanks,





On 26 April 2015 at 13:38, Chris Poulsen <[hidden email]> wrote:

> It works as far as I know, its probably a code error. A guess could be that
> you do not have the correct doctype in your pages.
>
> http://jumpstart.doublenegative.com.au/jumpstart7/examples/component/html5inputtypes
> outputs html5 inputs if you need an online example.
>
> --
> Chris
>
> On Sun, Apr 26, 2015 at 2:36 PM, Stephen Nutbrown <[hidden email]>
> wrote:
>
>> Hi,
>>
>> Just an update, I found there is a newer version of Tapestry,
>> 5.4-beta28 which I have updated my POM.xml to. I can see it should be
>> pulling in the latest version by looking at the dependency hierarchy,
>> but I still get this on startup:
>>
>>  ______                  __             ____
>> /_  __/__ ____  ___ ___ / /_______ __  / __/
>>  / / / _ `/ _ \/ -_|_-</ __/ __/ // / /__ \
>> /_/  \_,_/ .__/\__/___/\__/_/  \_, / /____/
>>         /_/                   /___/  5.4-beta-26 (development mode)
>>
>> As well as the problem with the input tags. Perhaps for some reason I
>> am having trouble updating, or is there an issue with the tapestry
>> version number?
>>
>> Thanks,
>> Steve
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: W3c Validation stray input tags

NutterzUK
I also notice if I actually remove the "/" from my input in the .tml, like this:

<input t:type="textfield" type="email" class="form-control input-sm"
t:id="emailAddress" placeholder="Enter email"
t:value="emailAddress">

I get this error:

    Exception assembling root component of page Exception: Failure
parsing template
classpath:com/promotemybrand/webapplication/components/Layout.tml: The
element type "input" must be terminated by the matching end-tag
"</input>".

The error message itself is not correct.

I have also tried remoiving my input tag altogether from my tml and
just using t:textfield like the example:

<t:textfield type="email" class="form-control input-sm"
t:id="emailAddress" placeholder="Enter email"
t:value="emailAddress"/>

The page renders, but with this:
<input placeholder="Enter email" id="emailAddress" class="form-control
form-control input-sm" name="emailAddress" type="email"></input>

On 26 April 2015 at 13:57, Stephen Nutbrown <[hidden email]> wrote:

> Hi Chris,
>
> Thanks. Seems very off that I am having this issue. This is what I
> have at the top of mine layouts .tml file, which I think should be
> correct:
>
> <!DOCTYPE html>
>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
> xmlns:p="tapestry:parameter">
>
>
> When I view the source of the page it produces, it starts:
> <!DOCTYPE html>
> <html data-debug-enabled="true" data-locale="en"
> xmlns="http://www.w3.org/1999/xhtml">
>
> But i'm still getting the same problems. As far as the tapestry
> version, this is what is confusing me:
> https://www.dropbox.com/s/ps68uzfqu4cng6t/Capture.PNG?dl=0
>
> I have cleaned the project and ran a maven update but i'm still
> getting this. I'm wondering if updating the tapestry version to beta
> 28 will pull in the fix? Perhaps it is because I am on a slightly
> older version.
>
> Thanks,
>
>
>
>
>
> On 26 April 2015 at 13:38, Chris Poulsen <[hidden email]> wrote:
>> It works as far as I know, its probably a code error. A guess could be that
>> you do not have the correct doctype in your pages.
>>
>> http://jumpstart.doublenegative.com.au/jumpstart7/examples/component/html5inputtypes
>> outputs html5 inputs if you need an online example.
>>
>> --
>> Chris
>>
>> On Sun, Apr 26, 2015 at 2:36 PM, Stephen Nutbrown <[hidden email]>
>> wrote:
>>
>>> Hi,
>>>
>>> Just an update, I found there is a newer version of Tapestry,
>>> 5.4-beta28 which I have updated my POM.xml to. I can see it should be
>>> pulling in the latest version by looking at the dependency hierarchy,
>>> but I still get this on startup:
>>>
>>>  ______                  __             ____
>>> /_  __/__ ____  ___ ___ / /_______ __  / __/
>>>  / / / _ `/ _ \/ -_|_-</ __/ __/ // / /__ \
>>> /_/  \_,_/ .__/\__/___/\__/_/  \_, / /____/
>>>         /_/                   /___/  5.4-beta-26 (development mode)
>>>
>>> As well as the problem with the input tags. Perhaps for some reason I
>>> am having trouble updating, or is there an issue with the tapestry
>>> version number?
>>>
>>> Thanks,
>>> Steve
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: W3c Validation stray input tags

NutterzUK
Following some guide here
http://stackoverflow.com/questions/2555845/how-to-update-maven-repository-in-eclipse

I was able to finally get it running 5.4 beta 28, however I have the
same issue still. I'm not really sure what else to try (I have the
same doctype and almost the same .tml as the example).

Finally, I was able to fix it, thanks for your help pointing me to the
example (it helped me get there in the end).

The doctype I had at the top of my layout.tml, but not my index.tml.

So it seems that the doctype needs specifying on every component and page.

I notice I also need to add this to every component else I cannot use
t: or p: within the component, and sometimes this adds additional
<html> tags into the middle of my page:
<html
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
xmlns:p="tapestry:parameter">

Is there a way use <t: and <p: inside a component without adding
another html tag at the top?

Thanks,
Steve


On 26 April 2015 at 14:05, Stephen Nutbrown <[hidden email]> wrote:

> I also notice if I actually remove the "/" from my input in the .tml, like this:
>
> <input t:type="textfield" type="email" class="form-control input-sm"
> t:id="emailAddress" placeholder="Enter email"
> t:value="emailAddress">
>
> I get this error:
>
>     Exception assembling root component of page Exception: Failure
> parsing template
> classpath:com/promotemybrand/webapplication/components/Layout.tml: The
> element type "input" must be terminated by the matching end-tag
> "</input>".
>
> The error message itself is not correct.
>
> I have also tried remoiving my input tag altogether from my tml and
> just using t:textfield like the example:
>
> <t:textfield type="email" class="form-control input-sm"
> t:id="emailAddress" placeholder="Enter email"
> t:value="emailAddress"/>
>
> The page renders, but with this:
> <input placeholder="Enter email" id="emailAddress" class="form-control
> form-control input-sm" name="emailAddress" type="email"></input>
>
> On 26 April 2015 at 13:57, Stephen Nutbrown <[hidden email]> wrote:
>> Hi Chris,
>>
>> Thanks. Seems very off that I am having this issue. This is what I
>> have at the top of mine layouts .tml file, which I think should be
>> correct:
>>
>> <!DOCTYPE html>
>>
>> <html xmlns="http://www.w3.org/1999/xhtml"
>> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
>> xmlns:p="tapestry:parameter">
>>
>>
>> When I view the source of the page it produces, it starts:
>> <!DOCTYPE html>
>> <html data-debug-enabled="true" data-locale="en"
>> xmlns="http://www.w3.org/1999/xhtml">
>>
>> But i'm still getting the same problems. As far as the tapestry
>> version, this is what is confusing me:
>> https://www.dropbox.com/s/ps68uzfqu4cng6t/Capture.PNG?dl=0
>>
>> I have cleaned the project and ran a maven update but i'm still
>> getting this. I'm wondering if updating the tapestry version to beta
>> 28 will pull in the fix? Perhaps it is because I am on a slightly
>> older version.
>>
>> Thanks,
>>
>>
>>
>>
>>
>> On 26 April 2015 at 13:38, Chris Poulsen <[hidden email]> wrote:
>>> It works as far as I know, its probably a code error. A guess could be that
>>> you do not have the correct doctype in your pages.
>>>
>>> http://jumpstart.doublenegative.com.au/jumpstart7/examples/component/html5inputtypes
>>> outputs html5 inputs if you need an online example.
>>>
>>> --
>>> Chris
>>>
>>> On Sun, Apr 26, 2015 at 2:36 PM, Stephen Nutbrown <[hidden email]>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Just an update, I found there is a newer version of Tapestry,
>>>> 5.4-beta28 which I have updated my POM.xml to. I can see it should be
>>>> pulling in the latest version by looking at the dependency hierarchy,
>>>> but I still get this on startup:
>>>>
>>>>  ______                  __             ____
>>>> /_  __/__ ____  ___ ___ / /_______ __  / __/
>>>>  / / / _ `/ _ \/ -_|_-</ __/ __/ // / /__ \
>>>> /_/  \_,_/ .__/\__/___/\__/_/  \_, / /____/
>>>>         /_/                   /___/  5.4-beta-26 (development mode)
>>>>
>>>> As well as the problem with the input tags. Perhaps for some reason I
>>>> am having trouble updating, or is there an issue with the tapestry
>>>> version number?
>>>>
>>>> Thanks,
>>>> Steve
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: W3c Validation stray input tags

Thiago H de Paula Figueiredo
In reply to this post by NutterzUK
On Sun, 26 Apr 2015 09:02:17 -0300, Stephen Nutbrown <[hidden email]>  
wrote:

> Hi,

Hi!

> The version of Tapestry I am using is: 5.4-beta-26, which I believe is
> the latest.

No, it's not. Looking at  
https://git1-us-west.apache.org/repos/asf?p=tapestry-5.git, you can see  
the latest one is beta 31. Anyway, beta 26 was created after TAP5-2071's  
fix. Anyway #2, I think you're not actually using the HTML5 doctype so the  
fix is applied to your HTML output:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
xmlns:p="tapestry:parameter">

This way, you're requesting XHTML output, as you have the XHTML namespace  
declaration, which isn't the same as HTML5 at all. Please try this:

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
xmlns:p="tapestry:parameter">

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: W3c Validation stray input tags

NutterzUK
Hi Thiago, thanks for your reply!

It looks like I was confused about the doctypes and namespaces. I
finally got it fixed, thank you!

For anyone else who stumbled across this thread, I was looking for the
latest version here:
http://mvnrepository.com/artifact/org.apache.tapestry
It looks like mvnrepository.com is not always up to date with the latest.

Thank you Thiago for pointing me to the more up-to-date git
repository. As soon as I get a chance i'll see if I can update to the
latest version again as it looks like there have been a lot of updates
since beta 28. Actually, this link is fantastic for keeping up to date
with what is going on. Thankyou :).

Steve

On 27 April 2015 at 13:38, Thiago H de Paula Figueiredo
<[hidden email]> wrote:

> On Sun, 26 Apr 2015 09:02:17 -0300, Stephen Nutbrown <[hidden email]>
> wrote:
>
>> Hi,
>
>
> Hi!
>
>> The version of Tapestry I am using is: 5.4-beta-26, which I believe is
>> the latest.
>
>
> No, it's not. Looking at
> https://git1-us-west.apache.org/repos/asf?p=tapestry-5.git, you can see the
> latest one is beta 31. Anyway, beta 26 was created after TAP5-2071's fix.
> Anyway #2, I think you're not actually using the HTML5 doctype so the fix is
> applied to your HTML output:
>
> <!DOCTYPE html>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
> xmlns:p="tapestry:parameter">
>
> This way, you're requesting XHTML output, as you have the XHTML namespace
> declaration, which isn't the same as HTML5 at all. Please try this:
>
> <!DOCTYPE html>
>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
> xmlns:p="tapestry:parameter">
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]