Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<xml> tag fails page validation

Status
Not open for further replies.

Brackenhurst

Programmer
May 28, 2003
1
GB
I'm trying to validate my web page at It essentially is all HTML and validates OK except for this section in the header:

<xml id=&quot;hpflyout&quot;>
<menu site=&quot;windmill&quot; subsite=&quot;Homepage&quot;>
<submenu handle=&quot;pvc_printers&quot;>
<item href=&quot;j210_card_printer.asp&quot; label=&quot;Javelin J210&quot; />
<item href=&quot;j310_card_printer.asp&quot; label=&quot;Javelin J310&quot; />
<item href=&quot;j320i_card_printer.asp&quot; label=&quot;Javelin J320i&quot; />
<item href=&quot;j420_card_printer.asp&quot; label=&quot;Javelin J420&quot; />
</submenu>
<submenu handle=&quot;retransfer_printers&quot;>
<item href=&quot;cx210_card_printer.asp&quot; label=&quot;DNP CX210&quot; />
</submenu>
<submenu handle=&quot;web&quot;>
<item href=&quot;web_design.asp&quot; label=&quot;Design&quot; />
<item href=&quot;web_seo.asp&quot; label=&quot;Search Engine Optimisation&quot; />
</submenu>
</menu>
</xml>

My menu system relies on this, but being new to XML I'm not sure which DOCTYPE to use to validate the page. Is this even valid syntax? I've tried putting it in an external DTD file, but the validator gets upset when I reference two DTDs in the same page.

Any ideas how to get a clean page validation?

Many thanks in advance.
 
I don't think you're going to be able to get a clean validation with this code in your header. The validator checks for valid HTML syntax, your menu isn't HTML it's XML so the validator is never going to like it.

Presumably you've got some code somewhere (javascript?) that parses this XML fragment and converts it to HTML. Could it not read the XML from an external file instead? That would have the added benefit of putting your menu in a single, centrally managed file rather than duplicated in every web page.

-- Chris Hunt
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top