Foros del Web » Creando para Internet » HTML »

pasar validación w3c

Estas en el tema de pasar validación w3c en el foro de HTML en Foros del Web. Buenos días foro. Estoy desarrollando una aplicación web utilizando primefaces (J2EE, JSP, css, xhtml...) mi problema ha venido una vez terminada, al intentar pasar la ...
  #1 (permalink)  
Antiguo 25/03/2013, 02:14
 
Fecha de Ingreso: mayo-2012
Mensajes: 49
Antigüedad: 11 años, 11 meses
Puntos: 0
Pregunta pasar validación w3c

Buenos días foro.

Estoy desarrollando una aplicación web utilizando primefaces (J2EE, JSP, css, xhtml...)

mi problema ha venido una vez terminada, al intentar pasar la validación de w3c validator en [URL="http://validator.w3.org"]http://validator.w3.org[/URL]

al ejecutar el validador, me muestra errores del estilo a:

Código HTML:
 Line 40, Column 302: there is no attribute "role"
… ui-widget-header ui-corner-all" role="tablist"><li class="ui-state-default ui…
✉
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
La verdad es que no se muy bien como solucionar esto, he provado incluso a parsear toda la web tras la carga borrando todos los role y sus atributos con el consiguiente fallo generalizado ...

este es un ejemplo del codigo generado por los componentes primefaces
Código HTML:
<li class="ui-state-default ui-tabs-selected ui-state-active ui-corner-top" role="tab" aria-expanded="true"><a href="#j_idt9:j_idt10">Acceso</a></li> 
alguien conoce alguna forma de pasar esta validación??

este es mi doctype

Código HTML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"> 
gracias por adelantado

Última edición por gerion_angel; 25/03/2013 a las 02:28 Razón: doctype
  #2 (permalink)  
Antiguo 25/03/2013, 07:58
Avatar de emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 9 meses
Puntos: 1567
Respuesta: pasar validación w3c

El atrbuto role que te está trayendo problemas si mal no recuerdo había sido incorporado en el borrador de XHTML 2.0, una especificación que no sé si va a continuar.
Pero html5 también lo acepta asi que podrías cambiar el Doctype
Esto valida
Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <html lang="es-ar">
  3. <meta charset="utf-8" />
  4. <title>Html5</title>
  5. </head>
  6. <ul role="navigation">
  7. <li>menu 1</li>
  8. <li>menu 2</li>
  9. </ul>
  10. </body>
  11. </html>
Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.

Etiquetas: html5, primefaces, validacion, w3c
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:32.