Proyecto: Plantilla Maestra XHTML

Proyecto de Plantilla Maestra para cabecera de documento XHTML genérica potenciando la meta-información del documento.

Licencia, más información en: http://www.blog.culturadigital.org/desarrollo-web/plantilla-maestra-xhtml

Código para copiar y pegar:

Atención

Es una versión algo reducida y el coloreador de sintaxis puede provocar errores en un código tan grande.
Se eliminaron los caracteres del latín para que el colorador funcione, entre otras cosas.
Se recomienda usar la plantilla original: aquí.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<?php
/*									PLEASE, KEEP THIS
Template Name: StandarXHTML1.1 metadata with PHP
Template URI: http://www.blog.culturadigital.org/proyectos-y-trabajos/proyecto-plantilla-maestra-xhtml
Description: Plantilla generica para encabezados de documentos XHTML1.1 con PHP / A generic template for headers XHTML1.1 documents with PHP
Version: 1.5
Author: Juan Antonio Cobo Ruz (Covi)
Author URI: http://www.culturadigital.org
 
--------------------------------------------------------------------------------
	StandarXHTML head - a generic template for headers XHTML documents
	Copyright 2007 Juan Antonio Cobo Ruz  (email : juanancobo@gmail.com)
 
	*  License GNU General Public License (GPL)
	** http://www.gnu.org/licenses/licenses.html#GPL
 
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.
 
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
 
	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
--------------------------------------------------------------------------------*/
 
** - 1rev. 25/09/2007
** - 2rev. 28/09/2007
 
 
// Let's Rock!
// Find and Replace the text "CUSTOM-DATA: custom data" by your settings, conf, data...
error_reporting(0); /* Errores Off */
header("Content-type: application/xhtml+xml"); /* Forzamos a servir como XML, sino se usa un lenguaje de servidor, establecer el Mime-Type en el servidor */
 
/* Primer hack IE */
if(!eregi("MSIE",$_SERVER['HTTP_USER_AGENT'])) {
	echo "<?xml ".'version="1.0" encoding="UTF-8"?>'."\n"; /* Declaracion de version de XML. 
En XML IE no puede entrar en modo Quirks porque ni siquiera reconoce el documento xDD. De ahi el hack siguiente para forzar una renderizacion de XML: */
}
/* Segundo Hack */
echo "<!-- Hack XML IE -->
<!--[if lt IE 7.]>

<?xml-stylesheet ".'type="text/xsl" href="CUSTOM-DATA:/css/copy.xsl"'."?>
<![endif]-->" . "\n\n";
?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <!-- DTD XHTML1.1 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es"> <!-- Para XHTML1.1 xml:lang, no lang: -->
	<head profile="http://gmpg.org/xfn/11"> <!-- Opcional, redes sociales -->
		<title>CUSTOM-DATA:Fácil, no?, pej: CULTURA DIGITAL: El Mar de las Infragancias.</title>
		<base href="CUSTOM-DATA:tu dominio, pej: http://<?=$_SERVER['HTTP_HOST'];?>/" />
 
		<!-- METADATOS
			Principales -->
		<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
		<meta http-equiv="content-language" content="es" />
		<meta http-equiv="content-style-type" content="text/css" />
		<meta http-equiv="content-script-type" content="text/javascript" />
		<meta http-equiv="expires" content="0" />
 
		<!--
			SEO -->
		<meta name="description" content="CUSTOM-DATA:Cultura Digital, blog personal y desarrollo web." />
		<meta name="keywords" content="CUSTOM-DATA:cultura digital,mar de las infragancias,covi,u2,geek,diseño web,semántica,ciencia,tecnología,blogosfera" />
		<meta name="resource-type" content="CUSTOM-DATA:Tipo de recurso, habitualmente:document" />
		<meta name="distribution" content="CUSTOM-DATA:Igual que el ambito de D.C, pej: global" />
		<meta name="author" content="CUSTOM-DATA:pej: Covi" />
		<!-- Recomendado:
		Nuestros padres nos ense&ntilde;aron que COMPARTIR ES BUENO ;)
			Creative Commons: -->
		<meta name="copyright" content="CUSTOM-DATA:Copyright si existe, pej: http://creativecommons.org/licenses/by-sa/2.5/es" />
		<meta name="license" content="CUSTOM-DATA:Licencia, pej:http://creativecommons.org/licenses/by-sa/2.5/es" />
		<meta name="generator" content="CUSTOM-DATA:Opcional, herramienta que genera el recurso, pej: Intype, el Text-Mate de Windows, me encanta! xD." /> <!-- Opcional -->
		<!-- Motores, bots... (Recomendado) -->
		<meta name="robots" content="CUSTOM-DATA:Accion a tomar por los bots sobre el recurso, pej:index, follow" />
		<meta name="revisit-after" content="CUSTOM-DATA:Tiempo en el que volvera el bot a revisar el sitio, pej:1 days" />
		<meta name="rating" content="CUSTOM-DATA:clasificacion, valoracion, algo generico por defecto pej:general" />
 
		<!-- Microformatos
			Dublin Core (Recomendado) -->
		<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
		<meta name="DC.title" content="CUSTOM-DATA:Titulo, pej: Cultura Digital" />
		<meta name="DC.subject" content="CUSTOM-DATA:Una especie de slogan en palabras clave sobre el recurso, es algo relativo, yo podría usar: Mar Infragancias o personal blog... como decia, es bastante relativo. Por defecto se puede usar: document" />
		<meta name="DC.description" content="CUSTOM-DATA:Descripcion del recurso, pej:Cultura Digital, blog personal y desarrollo web." />
		<meta name="DC.language" scheme="ISO639-1" content="CUSTOM-DATA:Codigo internacional de idioma, pej:es" /> <!-- Castellano -->
		<meta name="DC.relation" content="CUSTOM-DATA:Relacion con otros recursos, pej: http://www.laguardiadejaen.com" />
		<meta name="DC.coverage" content="CUSTOM-DATA:Ambito espacial o temporal, pej: 2003-2007 (Temporal), 00.0000, -00.0000 (Espacial)" />
		<meta name="DC.date" content="CUSTOM-DATA:dd/mm/yyyy, formato anglosajon o el que se estime oportuno" />
		<meta name="DC.type" content="CUSTOM-DATA:Categoria formal del recurso, pej: blog, webdev" />
		<meta name="DC.format" content="CUSTOM-DATA:Formato del recurso, pej: xhtml,xml" />
		<meta name="DC.identifier" content="CUSTOM-DATA:URL de recurso, en mi caso, pej: http://www.culturadigital.org/" />
		<!-- Propiedad intelectual:
			Se puede incluir en el mismo formato: DC.publisher y DC.contributor -->
		<meta name="DC.creator" content="CUSTOM-DATA:Autor, creador, pej: Juan Antonio Cobo aka Covi" />
		<meta name="DC.rights" content="CUSTOM-DATA:URL a los Derechos de autor, propiedad, pej: http://creativecommons.org/licenses/by-sa/2.5/es" />
 
			<!--
			GEO (Recomendado, redes sociales) -->
		<link rel="schema.geo" href="http://geotags.com/geo" />
		<meta name="geo.position" content="CUSTOM-DATA:Coordenadas (google maps por ejemplo) en el formato: 00.0000;-0.0000" />
		<meta name="geo.region" content="CUSTOM-DATA:Region, pej:ES-M (seria Madrid) ES-J (Jaen)..." />
		<meta name="geo.placename" content="CUSTOM-DATA:Localidad" />
			<!--
			(Recomendado) -->
		<meta name="ICBM" content="CUSTOM-DATA:Las coordenadas que elijas" />
 
		<!-- Google Verify (Recomendado: SEO) -->
		<meta name="verify-v1" content="CUSTOM-DATA:tu_clave Google Analytics" />
 
 
		<!-- Enlaces Relacionales 
		Favicon (Opcional) -->
		<link rel="shortcut icon" href="CUSTOM-DATA:favicon.ico" type="image/x-icon" />
 
		<!-- Estilo: Los considero basicos
			Yahoo Reset, el que mejor me funciona siempre: -->
		<link rel="stylesheet" href="CUSTOM-DATA:css/yahoo_reset.css" type="text/css" media="screen,projection" />
		<!--
			Base: Basicos, todos los dispositivos -->
		<link rel="stylesheet" href="CUSTOM-DATA:css/basic.css" type="text/css" media="screen,projection" /> <!-- Desde esta hoja importamos la Hoja avanzada de estilo -->
		<link rel="stylesheet" href="CUSTOM-DATA:css/print.css" type="text/css" media="print,tty" /> <!-- Papel y terminales -->
			<!--
			Hack PNG IE para imagenes incrustadas, no vale para imagenes CSS, usar filtro -->
		<!--[if lt IE 7.]>
		<script defer type="text/javascript" src="CUSTOM-DATA:inc/pngfix.js"></script>
		<link rel="stylesheet" href="CUSTOM-DATA:css/ie.css" type="text/css" media="screen,projection" /> Incluir aqui los filtros para PNG en CSS
		<![endif]-->
 
			<!--
			Otros (Opcional):
		<link rel="stylesheet" href="CUSTOM-DATA:/css/handhelp.css" type="text/css" media="handheld" />
		<link rel="stylesheet" href="CUSTOM-DATA:/css/tv.css" type="text/css" media="tv" />
		<link rel="stylesheet" href="CUSTOM-DATA:/css/aural.css" type="text/css" media="aural" />
			//
		// Fin Estilos -->
 
		<!-- Enlaces Alternativos:
			Localizacion (Opcional):
		<link rel="alternate" href="CUSTOM-DATA:/es" hreflang="es" xml:lang="es" lang="es" title="Versi&oacute;n en Espa&ntilde;ol." />
		<link rel="alternate" href="CUSTOM-DATA:/en" hreflang="en" xml:lang="en" lang="en" title="English version." />
		<link rel="alternate" href="CUSTOM-DATA:/fr" hreflang="fr" xml:lang="fr" lang="fr" title="Français version." />
			//-->
 
			<!--
			Distribucion de Contenidos (Opcional, depende de la tecnologia usada):
		<link rel="alternate" href="CUSTOM-DATA:rdf1.rdf" type="application/rdf+xml" title="Contenidos en RDF 1.0" />
		<link rel="alternate" href="CUSTOM-DATA:rss092.xml" type="application/rss+xml" title="Contenidos en RSS 0.92" />
		<link rel="alternate" href="CUSTOM-DATA:rss2.rss" type="application/rss+xml" title="Contenidos en RSS 2.0" />
		<link rel="alternate" href="CUSTOM-DATA:atom.xml" type="application/atom+xml" title="Contenidos en Atom 0.3" />
		<link rel="pingback" href="CUSTOM-DATA:pingback.xml" />
			//-->
 
			<!--
			Archivo de Contenidos (es obvio que depende de tus secciones y archivos):
				Elementales de navegacion: -->
		<link rel="contents" href="#menu" title="Menú de contenidos." />
		<link rel="bookmark" href="#navbar" title="Navegación" />
		<link rel="content" href="#content" title="Contenido Principal" />
		<link rel="search" href="#searchform" title="Búsqueda." />
		<link rel="up" href="#header" title="Arriba." />
		<link rel="down" href="#footer" title="Abajo." />
 
				<!--
				Elementales de Estructura -->
		<link rel="accessibility" href="CUSTOM-DATA:accesibilidad.xhtml" title="Accesibilidad." /> <!-- FUNDAMENTAL! -->
		<link rel="home" href="CUSTOM-DATA:home.xhtml" title="Home." /> <!-- Home es un termino que se entiende en cualquier idioma. -->
		<link rel="start" href="CUSTOM-DATA:index.xhtml" title="Inicio." />
		<link rel="index" href="CUSTOM-DATA:mapa.xhtml" title="Mapa web." />
		<link rel="help" href="CUSTOM-DATA:ayuda.xhtml" title="Ayuda." />
		<link rel="bookmark" href="#navbar" title="Navegación" />
 
				<!--
				Navegacion de Archivos
		<link rel="first" href="CUSTOM-DATA:A.xhtml" title="Primera entrada." />
		<link rel="previous" href="CUSTOM-DATA:A-1.xhtml" title="Entrada anterior." />
		<link rel="next" href="CUSTOM-DATA:A+1.xhtml" title="Entrada siguiente." />
		<link rel="last" href="CUSTOM-DATA:An-A.xhtml" title="&Uacute;ltima entrada." />
				//-->
 
					<!--
					Secuencia de Archivos
		<link rel="archive" href="CUSTOM-DATA:/mes1/" title="CUSTOM-DATA:mes1" />
		<link rel="archive" href="CUSTOM-DATA:/mes...n-1/" title="CUSTOM-DATA:mes...n-1" />
					//-->
 
					<!-- Secciones y Capitulos
		<link rel="section" href="CUSTOM-DATA:/section1/" title="CUSTOM-DATA:Secci&oaucte;n 1" />
		<link rel="section" href="CUSTOM-DATA:/section...n-1/" title="CUSTOM-DATA:Secci&oaucte;n ...n-1" />
			<link rel="subsection" href="CUSTOM-DATA:/section...n-1/SubSection...n-1/" title="CUSTOM-DATA:SubSecci&oaucte;n ...n-1" />
 
		<link rel="chapter" href="CUSTOM-DATA:/capitulo1/" title="CUSTOM-DATA:Cap&iacute;tulo 1" />
		<link rel="chapter" href="CUSTOM-DATA:/capitulo...n-1/" title="CUSTOM-DATA:Cap&iacute;tulo ...n-1" />
					//-->
 
					<!--
					Informativos:
		<link rel="author" href="CUSTOM-DATA:/autor/" title="Autor del Sitio" />
		<link rel="contact" href="CUSTOM-DATA:contacto.xhtml" title="Contacto" />
					// Nuestros padres nos ense&ntilde;aron que COMPARTIR ES BUENO ;)
			Creative Commons:
		<link rel="copyright" href="http://creativecommons.org/licenses/by-sa/2.5/es" xml:lang="es" /> Para ESP
		<link rel="copyright" href="http://creativecommons.org/licenses/by-sa/2.5" xml:lang="en" /> Global
			GPL:
		<link rel="copyright" href="http://www.gnu.org/licenses/gpl.html" xml:lang="en" />
					// Recomendado:
		<link rel="copyright" href="CUSTOM-DATA:http://www.gnu.org/licenses/gpl.html" title="GNU Public License (GPL)" xml:lang="en" />
		<link rel="glossary" href="CUSTOM-DATA:glosario.xhtml" title="Glosario." />
		<link rel="ToC" href="CUSTOM-DATA:contenidos.xhtml" title="Tabla de Contenidos" />
					//-->
 
					<!--
					Frikis ^^!
						OpenId
		<link rel="openid.server" href="http://openid.blogs.es/index.php/serve" />
		<link rel="openid.delegate" href="http://openid.blogs.es/CUSTOM-DATA:tu-nick" />
					//-->
 
		<!--// Fin Enlaces Relacionales -->
 
		<!-- Scripts: -->
		<!--
			Inclusion de otros Scripts, librerias... pej: SCriptaculous, Prototype, JQuery, MooTools...
		<!--
			Que no te encierren en frames (Si no lo deseas) -->
		<script type="text/javascript">
		//<![CDATA[
			if (parent.frames.length > 0) parent.location.href = self.document.location
		//]]>
		</script>
 
			<!-- Muy recomendable:
			Google Analytics
		<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
		<script type="text/javascript">
		//<![CDATA[
		_uacct = "CUSTOM-DATA:TuClave";
		urchinTracker();
		//]]>
		</script>
			//-->
 
			<!--//
			end Google Analytics -->
 
		<!--// Fin Scripts -->
	</head>
 
	<!-- Cuerpo Principal -->
	<body>
 
		<!-- Accesos Directos, opcionalmente se pueden ocultar: NO USAR EL ESTILO INCRUSTADO (style=""), solo es un ejemplo, USAR CSS!
		Tambien se puede ocultar a la vista, por ejemplo con le mismo color que el fondo, seguira siendo valido porque es accesible. -->
		<ul id="hidden_links" style="display:none;">
			<li><a href="CUSTOM-DATA:home.html" title="Home" accesskey="H" tabindex="1">Home</a></li> <!-- Importante! -->
			<li><a href="#content" title="Contenido / Content (Skip Navigation / Saltar Navegacion)" accesskey="S" tabindex="2">Contenido / Content (Skip Navigation / Saltar Navegacion)</a></li> <!-- Muy Importante!! -->
			<li><a href="CUSTOM-DATA:accesibilidad.html#accesskeys" title="Teclas de Acceso / AccessKeys" accesskey="K" tabindex="3">CUSTOM-DATA:Teclas de Acceso / AccessKeys</a></li> <!-- Muy Importante!! -->
			<li><a href="#header" title="Arriba" accesskey="T" tabindex="4">Subir</a></li> <!-- Muy Importante!! -->
			<li><a href="#footer" title="Abajo" accesskey="D" tabindex="5">Bajar</a></li> <!-- Muy Importante!! -->
			<!-- Opcionales -->
			<li><a href="#navbar" title="Navegacion: Secciones Principales" accesskey="N">Navegacion: Secciones Principales</a></li>
			<li><a href="#menu" title="Menu" accesskey="M" tabindex="6">Menu</a></li>
		</ul>
 
		<!-- Cabecera -->
		<div id="header">
			<h1>CUSTOM-DATA: Encabezado Principal</h1>
			<h2>CUSTOM-DATA: Encabezado Secundario</h2>
		</div>
		<!-- end Header -->
 
		<!-- Navegacion -->
		<ul id="navbar">	
			<li><a href="CUSTOM-DATA:A.html" title="CUSTOM-DATA:A..." accesskey="CUSTOM-DATA:A" tabindex="7">CUSTOM-DATA: Item uno</a></li>
			<li><a href="CUSTOM-DATA:B.html" title="CUSTOM-DATA:B..." accesskey="CUSTOM-DATA:B" tabindex="8">CUSTOM-DATA: Item ...n</a></li>
		</ul>
		<!-- end Navegacion -->
 
		<!-- Container -->
		<div id="container">
 
			<!-- Menu Secundario 
			La posicion de este menu es opcional, incluido como hijo de CONTAINER tenemos mas control, o incluso como hijo de CONTENT
			//-->
			<ul id="menu">
		    	<li>CUSTOM-DATA:Item Uno</li>
				<li>CUSTOM-DATA:Item dos</li>
			</ul>
			<!-- end Menu Secundario -->
 
			<!-- Contenido -->
			<div id="content">
			CUSTOM-DATA: Contenido
			</div>
			<!-- end Content -->
		</div>
		<!-- end Container -->
 
		<!-- Footer -->
		<div id="footer" class="clear">
		CUSTOM-DATA: Pie de pagina
		</div>
		<!-- end Footer -->
 
	</body>
	<!-- end Cuerpo -->
 
</html>

1 comentario en “Proyecto: Plantilla Maestra XHTML” »

  1. Pingback Cultura Digital#Blog » Plantilla maestra XHTML opinó:

    [...] InformaciónAdicionalmente, he incluido la plantilla a mis proyectos desde donde se puede copiar directamente y ver con sintaxis coloreada. Aquí [...]

Dejar un comentario

XHTML: Puedes usar estas etiquetas: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Aunque no estamos sujetos a la LOPD, igualmente informamos que los datos que se introduzcan en el presente formulario serán tratados y protegidos de acuerdo a dicha ley. El propietario actual de este sitio web es el responsable del tratamiento de los datos.

No se garantiza la publicación del comentario.