- From: Felix Sasaki <fsasaki@w3.org>
- Date: Thu, 13 Sep 2012 15:46:58 +0200
- To: Phil Ritchie <philr@vistatec.ie>
- Cc: Jirka Kosek <jirka@kosek.cz>, "public-multilingualweb-lt@w3.org" <public-multilingualweb-lt@w3.org>
- Message-ID: <CAL58czqh8tLmYAiAFmmVq0JC5LjAktT1MUgYuMGGF=XowBGGWg@mail.gmail.com>
2012/9/13 Phil Ritchie <philr@vistatec.ie> > Are there any code samples for doing this? I couldn't find any on the web > site. > > Apologies for wanting to be somewhat spoon-fed but my java is > "intermediate" level. > My Java is worse, I'm sure. A while ago I searched fort this. I think you can use https://whattf.svn.cvsdude.com/htmlparser/tags/RELEASE_1_0_6/test-src/nu/validator/htmlparser/tools/XSLT4HTML5.java as a basis. Then, re-use the content of "if (mode == Mode.DOM) { ..." This "inputDoc = builder.parse(new File(input));" should give you the dom. I haven't tested this, Jirka or others might have a much better approach. Felix > > > Phil > > > > On 13 Sep 2012, at 13:21, "Felix Sasaki" <fsasaki@w3.org> wrote: > > As Jirka pointed out, the tool is just a validator. The underlying HTML > parser > http://about.validator.nu/htmlparser/ > allows for creating a DOM from HTML5 input - which you can modify as you > like. > > Felix > > 2012/9/13 Phil Ritchie <philr@vistatec.ie> > >> Jirka >> >> I took a look at this the other day. Would my understanding be correct >> that the API does not allow modification of the DOM, i.e. to add ITS 2.0 >> metadata? >> >> Phil. >> >> >> >> >> >> From: Jirka Kosek <jirka@kosek.cz> >> To: "public-multilingualweb-lt@w3.org" < >> public-multilingualweb-lt@w3.org>, >> Date: 13/09/2012 10:50 >> Subject: HTML5+ITS validator >> ------------------------------ >> >> >> >> Hi, >> >> just to keep you informed. On my machine I have working copy of >> HTML5+ITS validator (see screenshot). >> >> The long term plan is too offer such functionality directly on >> http://validator.w3.org/ and http://validator.nu >> >> Jirka >> >> -- >> ------------------------------------------------------------------ >> Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz >> >> ------------------------------------------------------------------ >> Professional XML consulting and training services >> DocBook customization, custom XSLT/XSL-FO document processing >> ------------------------------------------------------------------ >> OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member >> ------------------------------------------------------------------ >> [attachment "its-validator.png" deleted by Phil Ritchie/VISTATEC] >> [attachment "signature.asc" deleted by Phil Ritchie/VISTATEC] >> >> >> ************************************************************ >> This email and any files transmitted with it are confidential and >> intended solely for the use of the individual or entity to whom they >> are addressed. If you have received this email in error please notify >> the sender immediately by e-mail. >> >> www.vistatec.com >> ************************************************************ >> > > > > -- > Felix Sasaki > DFKI / W3C Fellow > > > ************************************************************ > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the sender immediately by e-mail. > > www.vistatec.com > ************************************************************ > -- Felix Sasaki DFKI / W3C Fellow
Received on Thursday, 13 September 2012 13:47:34 UTC