I'm getting some problems with XSL generated because say that DOCTYPE not found. I created a little patch for add the doctype.

Comments

dave reid’s picture

I'm curious about what was complaining about the doctype not found? A certain browser? A certain validator?

web226’s picture

I get a 'no doctype found' warning when running my site http://toyrider.com/sitemap.xml through the the W3C Validator at https://validator.w3.org

After applying the patch, deleting the old sitemap.xml, rebuilding a new one and clearing caches I still don't get a doctype? This time the sitemap is at http://best-table-tennis-tables.com/sitemap.xml

Here is the document head:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="//best-table-tennis-tables.com/sitemap.xsl"?>

dave reid’s picture

Gotcha.

It looks like based on http://stackoverflow.com/questions/3387127/set-html5-doctype-with-xslt that we actually might want to use the following instead?

<xsl:output method="html" doctype-system="about:legacy-compat" encoding="UTF-8" indent="yes" />

dave reid’s picture

Status: Needs review » Needs work
thechanceg’s picture

Status: Needs work » Needs review
StatusFileSize
new561 bytes

Updated patch with Dave's xsl suggestion from Stack Overflow.

W3 gives a passing grade to my very simple sitemap test.

  • Dave Reid committed da1ae7b on 7.x-2.x authored by thechanceg
    Issue #2395397 by fastangel, thechanceg, Dave Reid: Fixed doctype not...

  • Dave Reid committed 0d85903 on 6.x-2.x authored by thechanceg
    Issue #2395397 by fastangel, thechanceg, Dave Reid: Fixed doctype not...

  • Dave Reid committed 97d1291 on 8.x-1.x authored by thechanceg
    Issue #2395397 by fastangel, thechanceg, Dave Reid: Fixed doctype not...
dave reid’s picture

Status: Needs review » Fixed

Thanks, tested and committed #5 to all branches!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.