RE: Query on MobileOk

>Should i create my own xsl file externally for the new test class(FooterTest)? OR It would be created at compile time?

You should create your xsl file and then compile it. 

If you want to create a FooterTest you need the following:
-Define the new test in TestType.java
-Provide an implementation FooterTest.java. If it is a XSLT test (AbstractXSLTTestImplementation child) you only need
 to override getTestType method (returning the value previously defined in TestType.java) 
-Create a FooterTest.xsl that carry our the test.
-Then make sure that you compile it. (There is an ANT task -build- that fulfils this compilation) 

Anyway, there are a user and developer manuals (that need some updating) that explain some basic usage and
checker design.

Regards,
Abel.


________________________________________
De: Ashwinkumar Vairu [mailto:ashwinkvairu@gmail.com] 
Enviado el: jueves, 23 de octubre de 2008 13:20
Para: Abel Rionda
CC: Guido García Bernardo; public-mobileok-checker@w3.org
Asunto: Re: Query on MobileOk

Hi Guido,

I am little bit confused here, I have configured the project as follows:
* Set Tester.java as a main class
* Arguments are: http://www.example.com FOOTER  
                           -r D:\MobNetk\Output\TestResult\result.xml 
                           -m  D:\MobNetk\Output\Intermediate\intermediate.xml
* When i build it, it is creating .xsl files and a Compiler.class file in build\classes\org\w3c\mwi\mobileok\basic\xslt

Should i create my own xsl file externally for the new test class(FooterTest)? OR It would be created at compile time?

I would like to create a test case where it can check whether it contains a href/link at the end of given URI or not.

Could you please assist?

Thank you.

Regards,
Ashwin.
On Thu, Oct 23, 2008 at 4:28 PM, Abel Rionda <abel.rionda@fundacionctic.org> wrote:
Hi Gudio,
Thank you very much Guido for your fast response on this.
We really appreciate your collaboration.
Regards,
Abel.

-----Mensaje original-----
De: public-mobileok-checker-request@w3.org [mailto:public-mobileok-checker-request@w3.org] En nombre de Guido García Bernardo
Enviado el: jueves, 23 de octubre de 2008 12:52
Para: Ashwinkumar Vairu
CC: public-mobileok-checker@w3.org
Asunto: Re: Query on MobileOk


Hi Ashwinkumar,

It seems that the file FooterTest.sxx is not found.  SXX files are the
result of your stylesheets compiled with Saxon.
You can find the class XSLTCompiler in the package
org.w3c.mwi.mobileok.basic.xslt

Try to run it as java XSLTComplier path_to_xsl_dir (where
path_to_xsl_dir is the path to the directory where you have the xsl
files), as that should generate again your SXX files.

Then cross your fingers and try again !

Best regards,
Guido.

Ashwinkumar Vairu escribió:
> Hi Guido,
>
> Please find attached java files.
>
> *I am stucked over here, your advice would help me to move ahead.*
>
> Previous error i am getting with NetBean v6.1 and I am unable to
> print(SOP) values on console.
>
> I have opened project with eclipse v3.3.2 and now I am getting
> following error.
>
> Inside the main Mehtod()....................
> Info: Writing MOKI document to
> D:\MobileOk\2007\mobkOut\intermediate\expli1.xml
> Info: Writing result document to
> D:\MobileOk\2007\mobkOut\result\explr1.xml
> [Fatal Error] :12:3: The element type "body" must be terminated by the
> matching end-tag "</body>".
>
> Class Name::FooterTest
> Resource Stream:: org/w3c/mwi/mobileok/basic/xslt/FooterTest.sxx
> Exception in thread "main" org.w3c.mwi.mobileok.basic.TestException:
> java.io.FileNotFoundException:
> build\org\w3c\mwi\mobileok\basic\xslt\FooterTest.sxx (The system
> cannot find the path specified)
>     at
> org.w3c.mwi.mobileok.basic.DOMUtils.getResourceStream(DOMUtils.java:171)
>     at
> org.w3c.mwi.mobileok.basic.AbstractXSLTTestImplementation.loadTransformer(AbstractXSLTTestImplementation.java:43)
>     at
> org.w3c.mwi.mobileok.basic.AbstractXSLTTestImplementation.runTest(AbstractXSLTTestImplementation.java:32)
>     at org.w3c.mwi.mobileok.basic.Tester.runTests(Tester.java:74)
>     at org.w3c.mwi.mobileok.basic.Tester.main(Tester.java:206)
> Caused by: java.io.FileNotFoundException:
> build\org\w3c\mwi\mobileok\basic\xslt\FooterTest.sxx (The system
> cannot find the path specified)
>     at java.io.FileInputStream.open(Native Method)
>     at java.io.FileInputStream.<init>(Unknown Source)
>     at
> org.w3c.mwi.mobileok.basic.DOMUtils.getResourceStream(DOMUtils.java:169)
>     ... 4 more
>
> Does anything is missing in configuration?
>
> Thank you,
>
> Regards,
> Ashwin.
>
> On Wed, Oct 22, 2008 at 6:59 PM, Guido García Bernardo
> <ggarciab@oesia.com <mailto:ggarciab@oesia.com>> wrote:
>
>     Hi Ashwin,
>
>     You have to add two lines in the enum :
>
>     public enum TestType {
>         ...
>         *FOOTER,*
>         ...
>
>         static {
>             final Map<TestType, TestImplementation> temp =
>                 new EnumMap<TestType, TestImplementation>(TestType.class);
>             ...
>             *temp.put(FOOTER, new FooterTest());*
>             ...
>         }
>     }
>
>     And your FooterTest class should look like :
>
>     public class FooterTest extends AbstractXSLTTestImplementation {
>         public TestType getTestType() {
>             return TestType.FOOTER;
>         }
>     }
>
>     Let me know if you already did it.  Could you please paste your
>     complete stack trace ?
>
>     Regards,
>     Guido
>     PS. I suggest you to prefix your tests in order to make them
>     easier to maintain (i.e. EXT_FOOTER)
>
>     Ashwinkumar Vairu escribió:
>>     Hi,
>>
>>     This is Ashwin, a software engineer.
>>
>>     I have downloaded the MobileOk source code and now trying to
>>     create a new test case by which i would like to test whether a
>>     footer link is exist in the given page/URI or not.
>>
>>     I have created a FooterTest class extending the
>>     AbstractXSLTTestImplementation class. Then i have added the
>>     FOOTER type in the TestType class.
>>
>>     While running application(Tester is set as a main class), I am
>>     getting following error.
>>
>>     *" Exception in thread "main" java.lang.IllegalArgumentException:
>>     No enum const class org.w3c.mwi.mobileok.basic.TestType.FOOTER "*
>>
>>
>>     Could please suggest me what's the wrong with the application?
>>     What could be the resolution?
>>     Do you have information/documents to create/costomize new test
>>     cases?
>>
>>     I have gone throught the document provided by the MobileOk in
>>     CVS. But, I still require some more information on application.
>>
>>     Thank you.
>>
>>     Regards,
>>     Ashwin.
>>
>
>

Received on Thursday, 23 October 2008 11:55:09 UTC