html5 doctype

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

html5 doctype

joostvanrijn
Hi all,

We're trying to develop a Sencha touch based mobile application using Orbeon,
and now we'd like to change the default doctype declaration to html5. However:
Orbeon keeps overriding the doctype, so we're wondering where we can find the
default for the doctype.

Thanks in advance.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: html5 doctype

Tambet Matiisen
I think the only way to change the doctype is in
orbeon.war/WEB-INF/lib/orbeon-resources-private.jar/config/epilogue-servlet.xpl

You can put the modified version in orbeon.war/WEB-INF/resources/config
directory, so the jar stays intact. Or you can put it into directory of
your choice when using this how-to:
http://wiki.orbeon.com/forms/doc/developer-guide/admin/overriding-adding-resources

   Tambet

On 12.04.2011 12:57, [hidden email] wrote:
> Hi all,
>
> We're trying to develop a Sencha touch based mobile application using Orbeon,
> and now we'd like to change the default doctype declaration to html5. However:
> Orbeon keeps overriding the doctype, so we're wondering where we can find the
> default for the doctype.
>
> Thanks in advance.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: html5 doctype

joostvanrijn
I'm going to bump this thread, because we're (again) looking into changing the Doctype.
We found the epilogue-servlet and are able to modify some aspects for the doctype declaration, but in order to use <!DOCTYPE html> we need to have more control. Right now Orbeon seems to be needing a public and a system doctype declaration, but the html5 doctype doesn't need that. When i leave both the doctypes empty Orbeon just renders <html> without a doctype.

What do we need to do to have this simple line of code rendered by the html-converter: <!DOCTYPE html>

Thanks in advance,

Joost van Rijn
Reply | Threaded
Open this post in threaded view
|

Re: Re: html5 doctype

Erik Bruchez
Administrator
The DOCTYPE is output by the Saxon HTML serializer, and it doesn't
seem to support outputting plain <!DOCTYPE html> with the version of
Saxon we are using (9.1). It seems that it is able to do so for newer
versions of the serializer, see:

http://w3schools.invisionzone.com/index.php?showtopic=40768

(With 9.1, it says "Unsupported HTML version: 5".)

The fix might involve either upgrading Saxon (hard), or backport
support for that option in the serializer to Saxon 9.1.

For now I have entered an issue:

https://github.com/orbeon/orbeon-forms/issues/306

-Erik

On Mon, Jun 11, 2012 at 7:55 AM, joostvanrijn <[hidden email]> wrote:

> I'm going to bump this thread, because we're (again) looking into changing
> the Doctype.
> We found the epilogue-servlet and are able to modify some aspects for the
> doctype declaration, but in order to use <!DOCTYPE html> we need to have
> more control. Right now Orbeon seems to be needing a public and a system
> doctype declaration, but the html5 doctype doesn't need that. When i leave
> both the doctypes empty Orbeon just renders <html> without a doctype.
>
> What do we need to do to have this simple line of code rendered by the
> html-converter: <!DOCTYPE html>
>
> Thanks in advance,
>
> Joost van Rijn
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/html5-doctype-tp3444162p4655231.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: html5 doctype

Alessandro  Vernet
Administrator
In reply to this post by joostvanrijn
Hi Joost,

HTML5 seems to allow <!DOCTYPE html SYSTEM "about:legacy-compat"> instead of <!DOCTYPE html>, "for the purposes of HTML generators that cannot output HTML markup with the short DOCTYPE" (http://dev.w3.org/html5/spec/single-page.html#the-doctype), which seems to be our case for now. So until the issue created by Erik is fixed, maybe you could use:

    <system-doctype>about:legacy-compat</system-doctype>

instead of:

    <public-doctype>-//W3C//DTD HTML 4.01//EN</public-doctype>

In your epilogue-servlet.xpl.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: html5 doctype

Erik Bruchez
Administrator
This is now fixed and we have switched the default to the HTML 5 doctype:

https://github.com/orbeon/orbeon-forms/commit/5659e28d64b151218372260bd16ed390b465bf42
https://github.com/orbeon/saxon/commit/ad2764792a69dc3ec59ea381a6177b6c3df04be5

-Erik

On Tue, Jun 12, 2012 at 6:23 PM, Alessandro  Vernet <[hidden email]> wrote:

> Hi Joost,
>
> HTML5 seems to allow <!DOCTYPE html SYSTEM &quot;about:legacy-compat&quot;>
> instead of <!DOCTYPE html>, "for the purposes of HTML generators that cannot
> output HTML markup with the short DOCTYPE"
> (http://dev.w3.org/html5/spec/single-page.html#the-doctype), which seems to
> be our case for now. So until the issue created by Erik is fixed, maybe you
> could use:
>
>    <system-doctype>about:legacy-compat</system-doctype>
>
> instead of:
>
>    <public-doctype>-//W3C//DTD HTML 4.01//EN</public-doctype>
>
> In your epilogue-servlet.xpl.
>
> Alex
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/html5-doctype-tp3444162p4655248.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: html5 doctype

joostvanrijn
Hi Erik,

Thank you very much for the update. Just a few days ago we found the HtmlEmitter class en edited it ourselves, but now we've integrated your solution.
Which brings me to my next issue:

According to this article http://wiki.orbeon.com/forms/doc/developer-guide/xforms-controls/input-control as of november 22nd, Orbeon should support the iOS datepicker. But as far as I can tell, simply binding an input to an xs:date does not do the trick and the input type is still "text" in stead of "date". On iOS there are also other keyboards and input types available for (i.e.) ranges, numbers, email addresses and phone numbers, but I can't seem to find a way to have Orbeon/xforms produce the necessary input type. Am I missing something, or is there no support for these types yet? And if no: What is the route to go to create these inputs manually?

Kind regards,

Joost van Rijn

On Tue, Jun 19, 2012 at 8:13 PM, Erik Bruchez <[hidden email]> wrote:
This is now fixed and we have switched the default to the HTML 5 doctype:

https://github.com/orbeon/orbeon-forms/commit/5659e28d64b151218372260bd16ed390b465bf42
https://github.com/orbeon/saxon/commit/ad2764792a69dc3ec59ea381a6177b6c3df04be5

-Erik

On Tue, Jun 12, 2012 at 6:23 PM, Alessandro  Vernet <[hidden email]> wrote:
> Hi Joost,
>
> HTML5 seems to allow <!DOCTYPE html SYSTEM &quot;about:legacy-compat&quot;>
> instead of <!DOCTYPE html>, "for the purposes of HTML generators that cannot
> output HTML markup with the short DOCTYPE"
> (http://dev.w3.org/html5/spec/single-page.html#the-doctype), which seems to
> be our case for now. So until the issue created by Erik is fixed, maybe you
> could use:
>
>    <system-doctype>about:legacy-compat</system-doctype>
>
> instead of:
>
>    <public-doctype>-//W3C//DTD HTML 4.01//EN</public-doctype>
>
> In your epilogue-servlet.xpl.
>
> Alex
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/html5-doctype-tp3444162p4655248.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--

Joost van Rijn

Ontwikkeling
(e) [hidden email]
(w) www.aexist.nl



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: html5 doctype

Alessandro  Vernet
Administrator
Hi Joost,

Have you been trying this on iOS? I just checked with the XForms Controls example (http://localhost:8080/orbeon/xforms-controls/), and on iOS, the native date and time picker is used as expected.

Note that if you try this with a desktop browser, and look at the DOM, you'll still see the type="text", because we don't want to use the native date/time pickers on desktop browsers at this point. (Most don't have one, which isn't a problem, but for instance Chrome for now has something ridiculous, which you wouldn't want to show users.)

And you're right, only xs:date, xs:time, and xs:dateTime are supported for now. Ranges, numbers… won't generate a special type="…".

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: html5 doctype

Erik Bruchez
Administrator
And we have some issues to track this:

https://github.com/orbeon/orbeon-forms/issues/106
https://github.com/orbeon/orbeon-forms/issues/111

-Erik

On Tue, Jul 3, 2012 at 10:40 AM, Alessandro  Vernet <[hidden email]> wrote:

> Hi Joost,
>
> Have you been trying this on iOS? I just checked with the XForms Controls
> example (http://localhost:8080/orbeon/xforms-controls/), and on iOS, the
> native date and time picker is used as expected.
>
> Note that if you try this with a desktop browser, and look at the DOM,
> you'll still see the type="text", because we don't want to use the native
> date/time pickers on desktop browsers at this point. (Most don't have one,
> which isn't a problem, but for instance Chrome for now has something
> ridiculous, which you wouldn't want to show users.)
>
> And you're right, only xs:date, xs:time, and xs:dateTime are supported for
> now. Ranges, numbers… won't generate a special type="…".
>
> Alex
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/html5-doctype-tp3444162p4655421.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws