This document was successfully checked as XHTML 1.1 plus MathML 2.0 plus SVG 1.1!

Result: Passed, 1 warning(s)
:
: utf-8
: XHTML 1.1 plus MathML 2.0 plus SVG 1.1
Root Element: html
Root Namespace: http://www.w3.org/1999/xhtml
Other Namespaces
Options

Help on the options is available.

Notes and Potential Issues

The following notes and warnings highlight missing or conflicting information which caused the validator to perform some guesswork prior to validation, or other things affecting the output below. If the guess or fallback is incorrect, it could make validation results entirely incoherent. It is highly recommended to check these potential issues, and, if necessary, fix them and re-validate the document.

  1. Warning Mismatch between Public and System identifiers in the DOCTYPE declaration

    This document uses an inconsistent DOCTYPE declaration. The Public Identifier -//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN declares the XHTML 1.1 plus MathML 2.0 plus SVG 1.1 document type, but the associated System Identifier http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd does not match this document type.

    The recommended System Identifier for XHTML 1.1 plus MathML 2.0 plus SVG 1.1 is http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd.

    The safest way to use a correct DOCTYPE declaration is to copy and paste one from the recommended list and avoid editing that part of your markup by hand.

Congratulations

The document located at <http://www.w3.org/TR/XHTMLplusMathMLplusSVG/sample.xhtml> was successfully checked as XHTML 1.1 plus MathML 2.0 plus SVG 1.1. This means that the resource in question identified itself as "XHTML 1.1 plus MathML 2.0 plus SVG 1.1" and that we successfully performed a formal validation of it. The parser implementations we used for this check are based on OpenSP (SGML/XML) and libxml2 (XML).

Linking to this result

If you would like to create a link to this page (i.e., this validation result) to make it easier to revalidate this page in the future or to allow others to validate your page, the URI is <http://validator.w3.org/check?uri=http%3A%2F%2Fwww.w3.org%2FTR%2FXHTMLplusMathMLplusSVG%2Fsample.xhtml;ss=1> (or you can just add the current page to your bookmarks or hotlist).

Validating CSS Style Sheets

If you use CSS in your document, you can check it using the W3C CSS Validation Service.

↑ Top

Source Listing

Below is the source input I used for this validation:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/css" href="style/xhtml-default.css"?>
  3. <?xml-stylesheet type="text/css" title="ruby" href="style/ruby.css"?>
  4. <?xml-stylesheet type="text/css" href="style/style.css"?>
  5. <?xml-stylesheet type="text/css" href="style/hover.css"?>
  6. <!DOCTYPE html PUBLIC
  7. "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
  8. "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd">
  9. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
  10. <head>
  11. <title xml:lang="en">Sample XHTML + MathML + SVG document</title>
  12. <link rel="stylesheet" type="text/css" href="style/xhtml-default.css"/>
  13. <link rel="stylesheet" type="text/css" title="ruby" href="style/ruby.css"/>
  14. <link rel="stylesheet" type="text/css" href="style/style.css"/>
  15. <link rel="stylesheet" type="text/css" href="style/hover.css"/>
  16. </head>
  17. <body>
  18. <h1 id="title">Sample XHTML 1.1 plus MathML 2.0 plus SVG 1.1 document</h1>
  19. <h2 id="ToC">Contents</h2>
  20. <ul>
  21. <li><a href="#ruby">XHTML 1.1 sample (ruby)</a></li>
  22. <li><a href="#math">MathML sample</a></li>
  23. <li><a href="#svg">SVG sample</a></li>
  24. <li><a href="#mixed">Mixed sample</a></li>
  25. </ul>
  26. <h2 id="ruby">XHTML 1.1 sample (ruby)</h2>
  27. <table border="1" summary="This table shows various ruby examples.">
  28. <thead>
  29. <tr>
  30. <th>Simple ruby, with <code>rp</code> fall-back</th>
  31. <th>Simple ruby, without <code>rp</code> fall-back</th>
  32. <th>Complex ruby</th>
  33. <th>Complex ruby, with multiple ruby texts</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <tr>
  38. <td>
  39. <ruby xml:lang="ja"
  40. ><rb>斎藤信男</rb>
  41. <rp>(</rp><rt>さいとうのぶお</rt><rp>)</rp
  42. ></ruby>
  43. </td>
  44. <td>
  45. <ruby xml:lang="ja"><rb>斎藤信男</rb>
  46. <rt>さいとうのぶお</rt></ruby>
  47. </td>
  48. <td>
  49. <ruby xml:lang="ja"><rbc><rb>斎</rb><rb>藤</rb><rb>信</rb><rb>男</rb></rbc>
  50. <rtc><rt>さい</rt><rt>とう</rt><rt>のぶ</rt><rt>お</rt></rtc></ruby>
  51. </td>
  52. <td>
  53. <p>Multilingual ruby example: Hebrew base (right-to-left)
  54. with Japanese katakana ruby (right-to-left, quite unusual but
  55. occasionally used) and English ruby (left-to-right)</p>
  56. <p dir="rtl">
  57. <ruby>
  58. <rbc>
  59. <rb xml:lang="he" dir="rtl">&#x05D0;&#x05D3;&#x05DD;</rb>
  60. </rbc>
  61. <rtc>
  62. <rt xml:lang="ja"><bdo dir="rtl">アーダーム</bdo></rt>
  63. </rtc>
  64. <rtc>
  65. <rt xml:lang="en" dir="ltr">Adam</rt>
  66. </rtc>
  67. </ruby>
  68. </p>
  69. </td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. <h2 id="math">MathML sample</h2>
  74. <p>Math expression
  75. <math xmlns="http://www.w3.org/1998/Math/MathML">
  76. <mrow>
  77. <mi>y</mi>
  78. <mo>=</mo>
  79. <mfrac>
  80. <mn>1</mn>
  81. <msqrt>
  82. <mrow>
  83. <msup>
  84. <mi>x</mi>
  85. <mn>2</mn>
  86. </msup>
  87. <mo>+</mo>
  88. <mn>1</mn>
  89. </mrow>
  90. </msqrt>
  91. </mfrac>
  92. </mrow>
  93. </math>
  94. inside an XHTML paragraph.</p>
  95. <p>Math expression in display style:</p>
  96. <math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  97. <mrow>
  98. <mo>det</mo>
  99. <mo>|</mo>
  100. <mtable>
  101. <mtr>
  102. <mtd columnalign="center">
  103. <msub>
  104. <mi>c</mi>
  105. <mn>0</mn>
  106. </msub>
  107. </mtd>
  108. <mtd columnalign="center">
  109. <msub>
  110. <mi>c</mi>
  111. <mn>1</mn>
  112. </msub>
  113. </mtd>
  114. <mtd columnalign="center">
  115. <msub>
  116. <mi>c</mi>
  117. <mn>2</mn>
  118. </msub>
  119. </mtd>
  120. <mtd columnalign="center">
  121. <mo>&#x2026;</mo>
  122. </mtd>
  123. <mtd columnalign="center">
  124. <msub>
  125. <mi>c</mi>
  126. <mi>n</mi>
  127. </msub>
  128. </mtd>
  129. </mtr>
  130. <mtr>
  131. <mtd columnalign="center">
  132. <msub>
  133. <mi>c</mi>
  134. <mn>1</mn>
  135. </msub>
  136. </mtd>
  137. <mtd columnalign="center">
  138. <msub>
  139. <mi>c</mi>
  140. <mn>2</mn>
  141. </msub>
  142. </mtd>
  143. <mtd columnalign="center">
  144. <msub>
  145. <mi>c</mi>
  146. <mn>3</mn>
  147. </msub>
  148. </mtd>
  149. <mtd columnalign="center">
  150. <mo>&#x2026;</mo>
  151. </mtd>
  152. <mtd columnalign="center">
  153. <msub>
  154. <mi>c</mi>
  155. <mrow>
  156. <mi>n</mi>
  157. <mo>+</mo>
  158. <mn>1</mn>
  159. </mrow>
  160. </msub>
  161. </mtd>
  162. </mtr>
  163. <mtr>
  164. <mtd columnalign="center">
  165. <msub>
  166. <mi>c</mi>
  167. <mn>2</mn>
  168. </msub>
  169. </mtd>
  170. <mtd columnalign="center">
  171. <msub>
  172. <mi>c</mi>
  173. <mn>3</mn>
  174. </msub>
  175. </mtd>
  176. <mtd columnalign="center">
  177. <msub>
  178. <mi>c</mi>
  179. <mn>4</mn>
  180. </msub>
  181. </mtd>
  182. <mtd columnalign="center">
  183. <mo>&#x2026;</mo>
  184. </mtd>
  185. <mtd columnalign="center">
  186. <msub>
  187. <mi>c</mi>
  188. <mrow>
  189. <mi>n</mi>
  190. <mo>+</mo>
  191. <mn>2</mn>
  192. </mrow>
  193. </msub>
  194. </mtd>
  195. </mtr>
  196. <mtr>
  197. <mtd columnalign="center">
  198. <mo>&#x22EE;</mo>
  199. </mtd>
  200. <mtd columnalign="center">
  201. <mo>&#x22EE;</mo>
  202. </mtd>
  203. <mtd columnalign="center">
  204. <mo>&#x22EE;</mo>
  205. </mtd>
  206. <mtd columnalign="center">
  207. </mtd>
  208. <mtd columnalign="center">
  209. <mo>&#x22EE;</mo>
  210. </mtd>
  211. </mtr>
  212. <mtr>
  213. <mtd columnalign="center">
  214. <msub>
  215. <mi>c</mi>
  216. <mi>n</mi>
  217. </msub>
  218. </mtd>
  219. <mtd columnalign="center">
  220. <msub>
  221. <mi>c</mi>
  222. <mrow>
  223. <mi>n</mi>
  224. <mo>+</mo>
  225. <mn>1</mn>
  226. </mrow>
  227. </msub>
  228. </mtd>
  229. <mtd columnalign="center">
  230. <msub>
  231. <mi>c</mi>
  232. <mrow>
  233. <mi>n</mi>
  234. <mo>+</mo>
  235. <mn>2</mn>
  236. </mrow>
  237. </msub>
  238. </mtd>
  239. <mtd columnalign="center">
  240. <mo>&#x2026;</mo>
  241. </mtd>
  242. <mtd columnalign="center">
  243. <msub>
  244. <mi>c</mi>
  245. <mrow>
  246. <mn>2</mn>
  247. <mi>n</mi>
  248. </mrow>
  249. </msub>
  250. </mtd>
  251. </mtr>
  252. </mtable>
  253. <mo>|</mo>
  254. <mo>&gt;</mo>
  255. <mn>0</mn>
  256. </mrow>
  257. </math>
  258. <h2 id="svg">SVG sample</h2>
  259. <p>
  260. <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="10cm" height="8cm"
  261. viewBox="0 0 500 400" version="1.1">
  262. <svg:title>A star</svg:title>
  263. <svg:polygon style="fill:red; stroke:blue; stroke-width:10"
  264. points="210,46 227,96 281,97 238,129
  265. 254,181 210,150 166,181 182,129
  266. 139,97 193,97"/>
  267. </svg:svg>
  268. </p>
  269. <h2 id="mixed">Mixed sample</h2>
  270. <p>XHTML and MathML inside SVG (via <code>foreignObject</code>):</p>
  271. <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="20cm" height="20cm"
  272. viewBox="0 0 500 500" version="1.1">
  273. <svg:g transform="scale(1.25)">
  274. <svg:polygon style="fill:lime; stroke:blue; stroke-width:10"
  275. points="250,20 466,145 466,395
  276. 250,520 34,395.2 34,145"/>
  277. <svg:switch>
  278. <svg:foreignObject x="70" y="140" width="360" height="340">
  279. <div xmlns="http://www.w3.org/1999/xhtml">
  280. <p>Inside the <code>foreignObject</code> element, math expression like
  281. <math xmlns="http://www.w3.org/1998/Math/MathML">
  282. <mrow>
  283. <mi>y</mi>
  284. <mo>=</mo>
  285. <mfrac>
  286. <mn>1</mn>
  287. <msqrt>
  288. <mrow>
  289. <msup>
  290. <mi>x</mi>
  291. <mn>2</mn>
  292. </msup>
  293. <mo>+</mo>
  294. <mn>1</mn>
  295. </mrow>
  296. </msqrt>
  297. </mfrac>
  298. </mrow>
  299. </math>
  300. can be put inside XHTML as well as ruby like
  301. <ruby>
  302. <rbc>
  303. <rb>W</rb><rb>W</rb><rb>W</rb></rbc>
  304. <rtc>
  305. <rt>World</rt>
  306. <rt>Wide</rt>
  307. <rt>Web</rt>
  308. </rtc>
  309. </ruby>.</p>
  310. <p>The base direction of the following
  311. paragraph is <code>rtl</code>.</p>
  312. <p dir="rtl">
  313. <ruby>
  314. <rbc>
  315. <rb xml:lang="he" dir="rtl">&#x05D0;&#x05D3;&#x05DD;</rb>
  316. </rbc>
  317. <rtc>
  318. <rt xml:lang="ja"><bdo dir="rtl">アーダーム</bdo></rt>
  319. </rtc>
  320. <rtc>
  321. <rt xml:lang="en" dir="ltr">Adam</rt>
  322. </rtc>
  323. </ruby>
  324. </p>
  325. <p>Display math inside SVG:</p>
  326. <math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  327. <mrow>
  328. <mo>det</mo>
  329. <mo>|</mo>
  330. <mtable>
  331. <mtr>
  332. <mtd columnalign="center">
  333. <msub>
  334. <mi>c</mi>
  335. <mn>0</mn>
  336. </msub>
  337. </mtd>
  338. <mtd columnalign="center">
  339. <msub>
  340. <mi>c</mi>
  341. <mn>1</mn>
  342. </msub>
  343. </mtd>
  344. <mtd columnalign="center">
  345. <msub>
  346. <mi>c</mi>
  347. <mn>2</mn>
  348. </msub>
  349. </mtd>
  350. <mtd columnalign="center">
  351. <mo>&#x2026;</mo>
  352. </mtd>
  353. <mtd columnalign="center">
  354. <msub>
  355. <mi>c</mi>
  356. <mi>n</mi>
  357. </msub>
  358. </mtd>
  359. </mtr>
  360. <mtr>
  361. <mtd columnalign="center">
  362. <msub>
  363. <mi>c</mi>
  364. <mn>1</mn>
  365. </msub>
  366. </mtd>
  367. <mtd columnalign="center">
  368. <msub>
  369. <mi>c</mi>
  370. <mn>2</mn>
  371. </msub>
  372. </mtd>
  373. <mtd columnalign="center">
  374. <msub>
  375. <mi>c</mi>
  376. <mn>3</mn>
  377. </msub>
  378. </mtd>
  379. <mtd columnalign="center">
  380. <mo>&#x2026;</mo>
  381. </mtd>
  382. <mtd columnalign="center">
  383. <msub>
  384. <mi>c</mi>
  385. <mrow>
  386. <mi>n</mi>
  387. <mo>+</mo>
  388. <mn>1</mn>
  389. </mrow>
  390. </msub>
  391. </mtd>
  392. </mtr>
  393. <mtr>
  394. <mtd columnalign="center">
  395. <msub>
  396. <mi>c</mi>
  397. <mn>2</mn>
  398. </msub>
  399. </mtd>
  400. <mtd columnalign="center">
  401. <msub>
  402. <mi>c</mi>
  403. <mn>3</mn>
  404. </msub>
  405. </mtd>
  406. <mtd columnalign="center">
  407. <msub>
  408. <mi>c</mi>
  409. <mn>4</mn>
  410. </msub>
  411. </mtd>
  412. <mtd columnalign="center">
  413. <mo>&#x2026;</mo>
  414. </mtd>
  415. <mtd columnalign="center">
  416. <msub>
  417. <mi>c</mi>
  418. <mrow>
  419. <mi>n</mi>
  420. <mo>+</mo>
  421. <mn>2</mn>
  422. </mrow>
  423. </msub>
  424. </mtd>
  425. </mtr>
  426. <mtr>
  427. <mtd columnalign="center">
  428. <mo>&#x22EE;</mo>
  429. </mtd>
  430. <mtd columnalign="center">
  431. <mo>&#x22EE;</mo>
  432. </mtd>
  433. <mtd columnalign="center">
  434. <mo>&#x22EE;</mo>
  435. </mtd>
  436. <mtd columnalign="center">
  437. </mtd>
  438. <mtd columnalign="center">
  439. <mo>&#x22EE;</mo>
  440. </mtd>
  441. </mtr>
  442. <mtr>
  443. <mtd columnalign="center">
  444. <msub>
  445. <mi>c</mi>
  446. <mi>n</mi>
  447. </msub>
  448. </mtd>
  449. <mtd columnalign="center">
  450. <msub>
  451. <mi>c</mi>
  452. <mrow>
  453. <mi>n</mi>
  454. <mo>+</mo>
  455. <mn>1</mn>
  456. </mrow>
  457. </msub>
  458. </mtd>
  459. <mtd columnalign="center">
  460. <msub>
  461. <mi>c</mi>
  462. <mrow>
  463. <mi>n</mi>
  464. <mo>+</mo>
  465. <mn>2</mn>
  466. </mrow>
  467. </msub>
  468. </mtd>
  469. <mtd columnalign="center">
  470. <mo>&#x2026;</mo>
  471. </mtd>
  472. <mtd columnalign="center">
  473. <msub>
  474. <mi>c</mi>
  475. <mrow>
  476. <mn>2</mn>
  477. <mi>n</mi>
  478. </mrow>
  479. </msub>
  480. </mtd>
  481. </mtr>
  482. </mtable>
  483. <mo>|</mo>
  484. <mo>&gt;</mo>
  485. <mn>0</mn>
  486. </mrow>
  487. </math>
  488. </div>
  489. </svg:foreignObject>
  490. </svg:switch>
  491. </svg:g>
  492. </svg:svg>
  493. </body>
  494. </html>

↑ Top