Index: src/test/it/com/xpn/xwiki/it/DutchWebGuidelinesValidationTest.java
===================================================================
--- src/test/it/com/xpn/xwiki/it/DutchWebGuidelinesValidationTest.java	(revision 28671)
+++ src/test/it/com/xpn/xwiki/it/DutchWebGuidelinesValidationTest.java	(working copy)
@@ -20,18 +20,16 @@
 package com.xpn.xwiki.it;
 
 import java.io.ByteArrayInputStream;
-import java.net.URLEncoder;
 
-import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.methods.GetMethod;
 import org.xwiki.validator.ValidationError;
 import org.xwiki.validator.Validator;
 import org.xwiki.validator.ValidationError.Type;
 
 import com.xpn.xwiki.it.framework.AbstractValidationTest;
 import com.xpn.xwiki.it.framework.CustomDutchWebGuidelinesValidator;
+import com.xpn.xwiki.it.framework.DocumentReferenceTarget;
+import com.xpn.xwiki.it.framework.Target;
 
 /**
  * Verifies that all pages in the default wiki are valid XHTML documents.
@@ -42,14 +40,11 @@
 {
     private CustomDutchWebGuidelinesValidator validator;
 
-    public DutchWebGuidelinesValidationTest(String fullPageName, HttpClient client, Validator validator)
-        throws Exception
+    public DutchWebGuidelinesValidationTest(Target target, HttpClient client, Validator validator) throws Exception
     {
-        super("testDocumentValidity");
+        super("testDocumentValidity", target, client);
 
         this.validator = (CustomDutchWebGuidelinesValidator) validator;
-        this.fullPageName = fullPageName;
-        this.client = client;
     }
 
     /**
@@ -59,41 +54,23 @@
      */
     public String getName()
     {
-        return "Validating Dutch Web Guidelines Validity for: " + fullPageName;
+        return "Validating Dutch Web Guidelines Validity for: " + this.target.getName();
     }
 
     public void testDocumentValidity() throws Exception
     {
-        GetMethod method =
-            new GetMethod("http://127.0.0.1:8080/xwiki/bin/view/"
-                + URLEncoder.encode(this.fullPageName, "UTF-8").replace('.', '/'));
-
-        method.setDoAuthentication(true);
-        method.setFollowRedirects(true);
-        method.addRequestHeader("Authorization", "Basic " + new String(Base64.encodeBase64("Admin:admin".getBytes())));
-
-        byte[] responseBody;
-
-        // Execute the method.
-        try {
-            int statusCode = this.client.executeMethod(method);
+        byte[] responseBody = getResponseBody();
 
-            assertEquals("Method failed: " + method.getStatusLine(), HttpStatus.SC_OK, statusCode);
-
-            // Read the response body.
-            responseBody = method.getResponseBody();
-        } finally {
-            method.releaseConnection();
+        if (this.target instanceof DocumentReferenceTarget) {
+            this.validator.setDocumentReference(((DocumentReferenceTarget) this.target).getDocumentReference());
         }
+        this.validator.setDocument((new ByteArrayInputStream(responseBody)));
+        this.validator.validate();
 
-        validator.setFullPageName(fullPageName);
-        validator.setDocument((new ByteArrayInputStream(responseBody)));
-        validator.validate();
-               
         StringBuffer message = new StringBuffer();
         boolean isValid = true;
-        message.append("Validation errors in " + fullPageName);
-        for (ValidationError error : validator.getErrors()) {
+        message.append("Validation errors in " + this.target.getName());
+        for (ValidationError error : this.validator.getErrors()) {
             if (error.getType() != Type.WARNING) {
                 isValid = false;
                 message.append("\n" + error);
Index: src/test/it/com/xpn/xwiki/it/XHTMLValidationTest.java
===================================================================
--- src/test/it/com/xpn/xwiki/it/XHTMLValidationTest.java	(revision 28675)
+++ src/test/it/com/xpn/xwiki/it/XHTMLValidationTest.java	(working copy)
@@ -24,18 +24,15 @@
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 import java.io.StringReader;
-import java.net.URLEncoder;
 import java.util.List;
 
-import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.methods.GetMethod;
 import org.xwiki.validator.ValidationError;
 import org.xwiki.validator.Validator;
 import org.xwiki.validator.XHTMLValidator;
 
 import com.xpn.xwiki.it.framework.AbstractValidationTest;
+import com.xpn.xwiki.it.framework.Target;
 
 /**
  * Verifies that all pages in the default wiki are valid XHTML documents.
@@ -68,13 +65,11 @@
      */
     protected ByteArrayOutputStream err;
 
-    public XHTMLValidationTest(String fullPageName, HttpClient client, Validator validator) throws Exception
+    public XHTMLValidationTest(Target target, HttpClient client, Validator validator) throws Exception
     {
-        super("testDocumentValidity");
+        super("testDocumentValidity", target, client);
 
         this.validator = (XHTMLValidator) validator;
-        this.fullPageName = fullPageName;
-        this.client = client;
     }
 
     /**
@@ -133,38 +128,18 @@
      */
     public String getName()
     {
-        return "Validating XHTML validity for: " + fullPageName;
+        return "Validating XHTML validity for: " + this.target.getName();
     }
 
     public void testDocumentValidity() throws Exception
     {
-        GetMethod method =
-            new GetMethod("http://127.0.0.1:8080/xwiki/bin/view/"
-                + URLEncoder.encode(this.fullPageName, "UTF-8").replace('.', '/'));
-
-        method.setDoAuthentication(true);
-        method.setFollowRedirects(true);
-        method.addRequestHeader("Authorization", "Basic " + new String(Base64.encodeBase64("Admin:admin".getBytes())));
-
-        byte[] responseBody;
-
-        // Execute the method.
-        try {
-            int statusCode = this.client.executeMethod(method);
-
-            assertEquals("Method failed: " + method.getStatusLine(), HttpStatus.SC_OK, statusCode);
+        byte[] responseBody = getResponseBody();
 
-            // Read the response body.
-            responseBody = method.getResponseBody();
-        } finally {
-            method.releaseConnection();
-        }
-
-        validator.setDocument(new ByteArrayInputStream(responseBody));
-        List<ValidationError> errors = validator.validate();
+        this.validator.setDocument(new ByteArrayInputStream(responseBody));
+        List<ValidationError> errors = this.validator.validate();
 
         StringBuffer message = new StringBuffer();
-        message.append("Validation errors in " + fullPageName);
+        message.append("Validation errors in " + this.target.getName());
         boolean hasError = false;
         for (ValidationError error : errors) {
             if (error.getType() == ValidationError.Type.WARNING) {
Index: src/test/it/com/xpn/xwiki/it/framework/URLPathTarget.java
===================================================================
--- src/test/it/com/xpn/xwiki/it/framework/URLPathTarget.java	(revision 0)
+++ src/test/it/com/xpn/xwiki/it/framework/URLPathTarget.java	(revision 0)
@@ -0,0 +1,26 @@
+package com.xpn.xwiki.it.framework;
+
+public class URLPathTarget implements Target
+{
+    private String urlPath;
+
+    public URLPathTarget(String urlPath)
+    {
+        this.urlPath = urlPath;
+    }
+
+    public String getUrlPath()
+    {
+        return urlPath;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see com.xpn.xwiki.it.framework.Target#getName()
+     */
+    public String getName()
+    {
+        return getUrlPath();
+    }
+}
Index: src/test/it/com/xpn/xwiki/it/framework/AbstractValidationTest.java
===================================================================
--- src/test/it/com/xpn/xwiki/it/framework/AbstractValidationTest.java	(revision 28671)
+++ src/test/it/com/xpn/xwiki/it/framework/AbstractValidationTest.java	(working copy)
@@ -20,57 +20,137 @@
 package com.xpn.xwiki.it.framework;
 
 import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.regex.Pattern;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.httpclient.Credentials;
 import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.httpclient.UsernamePasswordCredentials;
 import org.apache.commons.httpclient.auth.AuthScope;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.lang.StringUtils;
 import org.dom4j.Document;
 import org.dom4j.Element;
 import org.dom4j.io.SAXReader;
+import org.xwiki.model.EntityType;
+import org.xwiki.model.internal.reference.DefaultStringEntityReferenceResolver;
+import org.xwiki.model.reference.DocumentReference;
+import org.xwiki.model.reference.EntityReferenceResolver;
 import org.xwiki.validator.Validator;
 
 import com.xpn.xwiki.plugin.packaging.Package;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
 public class AbstractValidationTest extends TestCase
 {
     protected HttpClient client;
 
-    protected String fullPageName;
+    protected Target target;
+
+    private static final EntityReferenceResolver<String> RESOLVER = new DefaultStringEntityReferenceResolver();
 
-    public AbstractValidationTest(String name)
+    public AbstractValidationTest(String name, Target target, HttpClient client)
     {
         super(name);
+
+        this.target = target;
+        this.client = client;
     }
 
-    public static Test suite(Class< ? extends AbstractValidationTest> validationTest, Validator validator) throws Exception
+    protected GetMethod createGetMethod() throws UnsupportedEncodingException
+    {
+        GetMethod getMethod = null;
+
+        if (this.target instanceof DocumentReferenceTarget) {
+            DocumentReferenceTarget documentReferenceTarget = (DocumentReferenceTarget) this.target;
+            getMethod =
+                new GetMethod("http://127.0.0.1:8080/xwiki/bin/view/"
+                    + URLEncoder.encode(documentReferenceTarget.getDocumentReference().getLastSpaceReference()
+                        .getName(), "UTF-8") + "/"
+                    + URLEncoder.encode(documentReferenceTarget.getDocumentReference().getName(), "UTF-8"));
+        } else if (this.target instanceof URLPathTarget) {
+            String urlPath = ((URLPathTarget) this.target).getUrlPath();
+
+            if (urlPath.startsWith("http://")) {
+                getMethod = new GetMethod(urlPath);
+            } else {
+                getMethod = new GetMethod("http://127.0.0.1:8080" + urlPath);
+            }
+        }
+
+        return getMethod;
+    }
+
+    protected byte[] getResponseBody() throws IOException
+    {
+        GetMethod method = createGetMethod();
+
+        method.setDoAuthentication(true);
+        method.setFollowRedirects(true);
+        method.addRequestHeader("Authorization", "Basic " + new String(Base64.encodeBase64("Admin:admin".getBytes())));
+
+        // Execute the method.
+        try {
+            int statusCode = this.client.executeMethod(method);
+
+            assertEquals("Method failed: " + method.getStatusLine(), HttpStatus.SC_OK, statusCode);
+
+            // Read the response body.
+            return method.getResponseBody();
+        } finally {
+            method.releaseConnection();
+        }
+    }
+
+    public static Test suite(Class< ? extends AbstractValidationTest> validationTest, Validator validator)
+        throws Exception
     {
         TestSuite suite = new TestSuite();
-        String path = System.getProperty("localRepository") + "/" + System.getProperty("pathToXWikiXar");
-        String patternFilter = System.getProperty("documentsToTest");
-        HttpClient client = new HttpClient();
 
+        HttpClient client = new HttpClient();
         Credentials defaultcreds = new UsernamePasswordCredentials("Admin", "admin");
         client.getState().setCredentials(AuthScope.ANY, defaultcreds);
 
-        for (String pageName : readXarContents(path, patternFilter)) {
-            suite.addTest(validationTest.getConstructor(String.class, HttpClient.class, Validator.class).newInstance(
-                pageName, client, validator));
-        }
+        addXarFiles(validationTest, validator, suite, client);
 
         return suite;
     }
 
-    public static List<String> readXarContents(String fileName, String patternFilter) throws Exception
+    public static void addURLs(Class< ? extends AbstractValidationTest> validationTest, Validator validator,
+        TestSuite suite, HttpClient client)
+    {
+        String urlsToTest = System.getProperty("urlsToTest");
+
+        for (String url : StringUtils.split(urlsToTest, '|')) {
+
+        }
+    }
+
+    public static void addXarFiles(Class< ? extends AbstractValidationTest> validationTest, Validator validator,
+        TestSuite suite, HttpClient client) throws Exception
+    {
+        String path = System.getProperty("localRepository") + "/" + System.getProperty("pathToXWikiXar");
+        String patternFilter = System.getProperty("documentsToTest");
+
+        for (DocumentReference documentReference : readXarContents(path, patternFilter)) {
+            suite.addTest(validationTest.getConstructor(Target.class, HttpClient.class, Validator.class).newInstance(
+                new DocumentReferenceTarget(documentReference), client, validator));
+        }
+    }
+
+    public static List<DocumentReference> readXarContents(String fileName, String patternFilter) throws Exception
     {
         FileInputStream fileIS = new FileInputStream(fileName);
         ZipInputStream zipIS = new ZipInputStream(fileIS);
@@ -89,15 +169,17 @@
             return Collections.emptyList();
         }
 
-        List<String> result = new ArrayList<String>();
+        List<DocumentReference> result = new ArrayList<DocumentReference>();
+
+        Pattern pattern = patternFilter == null ? null : Pattern.compile(patternFilter);
 
         Element filesElement = tocDoc.getRootElement().element("files");
         List<Element> fileElementList = filesElement.elements("file");
         for (Element el : fileElementList) {
             String docFullName = el.getStringValue();
 
-            if (patternFilter == null || docFullName.matches(patternFilter)) {
-                result.add(docFullName);
+            if (pattern == null || pattern.matcher(docFullName).matches()) {
+                result.add(new DocumentReference(RESOLVER.resolve("xwiki:" + docFullName, EntityType.DOCUMENT)));
             }
         }
 
Index: src/test/it/com/xpn/xwiki/it/framework/DocumentReferenceTarget.java
===================================================================
--- src/test/it/com/xpn/xwiki/it/framework/DocumentReferenceTarget.java	(revision 0)
+++ src/test/it/com/xpn/xwiki/it/framework/DocumentReferenceTarget.java	(revision 0)
@@ -0,0 +1,29 @@
+package com.xpn.xwiki.it.framework;
+
+import org.xwiki.model.reference.DocumentReference;
+
+public class DocumentReferenceTarget implements Target
+{
+    private DocumentReference documentReference;
+
+    public DocumentReferenceTarget(DocumentReference documentReference)
+    {
+        this.documentReference = documentReference;
+    }
+
+    public DocumentReference getDocumentReference()
+    {
+        return documentReference;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see com.xpn.xwiki.it.framework.Target#getName()
+     */
+    public String getName()
+    {
+        return "space=" + this.documentReference.getLastSpaceReference().getName() + ", page="
+            + this.documentReference.getName();
+    }
+}
Index: src/test/it/com/xpn/xwiki/it/framework/Target.java
===================================================================
--- src/test/it/com/xpn/xwiki/it/framework/Target.java	(revision 0)
+++ src/test/it/com/xpn/xwiki/it/framework/Target.java	(revision 0)
@@ -0,0 +1,6 @@
+package com.xpn.xwiki.it.framework;
+
+public interface Target
+{
+    String getName();
+}
Index: src/test/it/com/xpn/xwiki/it/framework/CustomDutchWebGuidelinesValidator.java
===================================================================
--- src/test/it/com/xpn/xwiki/it/framework/CustomDutchWebGuidelinesValidator.java	(revision 28671)
+++ src/test/it/com/xpn/xwiki/it/framework/CustomDutchWebGuidelinesValidator.java	(working copy)
@@ -22,25 +22,26 @@
 import javax.xml.xpath.XPathConstants;
 
 import org.w3c.dom.NodeList;
+import org.xwiki.model.reference.DocumentReference;
 import org.xwiki.validator.DutchWebGuidelinesValidator;
 import org.xwiki.validator.ValidationError.Type;
 
 public class CustomDutchWebGuidelinesValidator extends DutchWebGuidelinesValidator
 {
     private static final String SPACE_META = "space";
-    
-    private String fullName = "";
-    
+
+    private DocumentReference documentReference;
+
     /**
-     * Set the fullName of the page being analyzed.
-     *  
-     * @param fullName fullName of the page
+     * Set the reference of the page being analyzed.
+     * 
+     * @param DocumentReference document reference of the page
      */
-    public void setFullPageName(String fullName) 
+    public void setDocumentReference(DocumentReference documentReference)
     {
-        this.fullName = fullName;
+        this.documentReference = documentReference;
     }
-    
+
     /**
      * @param metaName name of the meta to get
      * @return the value for the given meta
@@ -49,18 +50,19 @@
     {
         String exprString = "//meta[@name='" + metaName + "']";
         NodeList meta = (NodeList) evaluate(document, exprString, XPathConstants.NODESET);
-        
+
         return getAttributeValue(meta.item(0), ATTR_CONTENT);
     }
-    
+
     /**
      * @return true if the current page is the give page, false otherwise.
      */
-    private boolean isPage(String pageName)
+    private boolean isPage(String space, String page)
     {
-        return pageName.equals(fullName);
+        return this.documentReference != null && this.documentReference.getName().equals(page)
+            && this.documentReference.getLastSpaceReference().getName().equals(space);
     }
-    
+
     /**
      * Use the p (paragraph) element to indicate paragraphs. Do not use the br (linebreak) element to separate
      * paragraphs.
@@ -68,86 +70,81 @@
     @Override
     public void validateRpd3s4()
     {
-        if (!isPage("XWiki.XWikiSyntax")) {
+        if (!isPage("XWiki", "XWikiSyntax")) {
             super.validateRpd3s4();
         }
     }
 
     /**
-     * Avoid using the sup (superscript) and sub (subscript) element if possible. XWiki exception: wiki syntax
-     * allows using sub and sup tags, this usage is demonstrated in the Sandbox space and the XWiki.XWikiSyntax page.
+     * Avoid using the sup (superscript) and sub (subscript) element if possible. XWiki exception: wiki syntax allows
+     * using sub and sup tags, this usage is demonstrated in the Sandbox space and the XWiki.XWikiSyntax page.
      */
     @Override
     public void validateRpd3s9()
     {
-        if (!isPage("XWiki.XWikiSyntax") && !isPage("Sandbox.WebHome")) {
+        if (!isPage("XWiki", "XWikiSyntax") && !isPage("Sandbox", "WebHome")) {
             super.validateRpd3s9();
         }
     }
-    
+
     /**
-     * Use ol (ordered list) and ul (unordered list) elements to indicate lists. XWiki exception: XWiki.XWikiSyntax 
-     * shows the wiki syntax to use to create lists, this syntax is precisely what's forbidden to use in the generated 
-     * html. 
+     * Use ol (ordered list) and ul (unordered list) elements to indicate lists. XWiki exception: XWiki.XWikiSyntax
+     * shows the wiki syntax to use to create lists, this syntax is precisely what's forbidden to use in the generated
+     * html.
      */
     @Override
     public void validateRpd3s13()
     {
-        if (!isPage("XWiki.XWikiSyntax")) {
+        if (!isPage("XWiki", "XWikiSyntax")) {
             super.validateRpd3s13();
         }
     }
-    
+
     /**
      * CSS should be placed in linked files and not mixed with the HTML source code. XWiki exceptions: in the ColorTheme
-     * application we have to allow the use of inline styles, this is the only way to offer a preview of the themes 
-     * color. In XWiki.XWikiSyntax usage of style custom parameter is demonstrated. In Panels.PanelWizard and 
+     * application we have to allow the use of inline styles, this is the only way to offer a preview of the themes
+     * color. In XWiki.XWikiSyntax usage of style custom parameter is demonstrated. In Panels.PanelWizard and
      * XWiki.Treeview the use of JS libraries make the use of inline styles mandatory.
-     * 
      */
     @Override
     public void validateRpd9s1()
     {
         String exprString = "//*[@style]";
-        
-        if (!getMeta(SPACE_META).equals("ColorThemes") && !isPage("XWiki.XWikiSyntax") 
-            && !isPage("Panels.PanelWizard") &&  !isPage("XWiki.Treeview")) {
+
+        if (!getMeta(SPACE_META).equals("ColorThemes") && !isPage("XWiki", "XWikiSyntax")
+            && !isPage("Panels", "PanelWizard") && !isPage("XWiki", "Treeview")) {
             // Usage of the style attribute is strictly forbidden in the other spaces.
             assertFalse(Type.ERROR, "rpd9s1.attr", ((Boolean) evaluate(getElement(ELEM_BODY), exprString,
                 XPathConstants.BOOLEAN)));
         }
-        
+
         // <style> tags are forbidden everywhere.
-        assertFalse(Type.ERROR, "rpd9s1.tag",
-            getChildren(getElement(ELEM_BODY), "style").getNodeList().getLength() > 0);
+        assertFalse(Type.ERROR, "rpd9s1.tag", getChildren(getElement(ELEM_BODY), "style").getNodeList().getLength() > 0);
     }
-    
+
     /**
      * Use the scope attribute to associate table labels (th cells) with columns or rows. XWiki exception: wiki syntax
-     * allows using table headers without scope, this usage is demonstrated in the Sandbox space and the 
+     * allows using table headers without scope, this usage is demonstrated in the Sandbox space and the
      * XWiki.XWikiSyntax page.
      */
     @Override
     public void validateRpd11s4()
     {
-        if (!isPage("XWiki.XWikiSyntax") && !isPage("Sandbox.WebHome")) {
+        if (!isPage("XWiki", "XWikiSyntax") && !isPage("Sandbox", "WebHome")) {
             super.validateRpd11s4();
         }
     }
-    
+
     /**
      * Use the headers and id attributes to associate table labels (th cells) with individual cells in complex tables.
-     * XWiki exception: wiki syntax allows using tables without headers, this usage is demonstrated in the Sandbox 
-     * space and the XWiki.XWikiSyntax page.
+     * XWiki exception: wiki syntax allows using tables without headers, this usage is demonstrated in the Sandbox space
+     * and the XWiki.XWikiSyntax page.
      */
     @Override
     public void validateRpd11s5()
     {
-        if (!isPage("XWiki.XWikiSyntax") && !isPage("Sandbox.WebHome")) {
+        if (!isPage("XWiki", "XWikiSyntax") && !isPage("Sandbox", "WebHome")) {
             super.validateRpd11s5();
         }
     }
-    
-    
-    
 }
