Solved

Resolving errors reported by W3C for Webpage

Posted on 2015-02-09
9
58 Views
Last Modified: 2015-02-24
Hi,
I have been trying to validate a website with W3C, doctype and encoding on autodetection. I've used a functional link to an article on that website.

The errors reported were
1.) Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.)
for <?xml version="1.0" encoding="utf-8"?>
2.) several missing tags or stray start tags...

I have no idea how to fix all of these. The missing start tags do NOT come from the article itself, that much is clear to me.  
Grateful for any hints that can be given.
Other than the information below (links), let me know what files (index.php? TemplateDetails.xml?) would be needed for you to help me.

Thanks
S

The link tested is:
http://www.danischnider.ch/index.php/tipps/training-internetseiten

Used validator:
http://validator.w3.org

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.danischnider.ch%2Findex.php%2Ftipps%2Ftraining-internetseiten&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=0&No200=1&st=1&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices#line-113
0
Comment
Question by:Sabina_Compassi
  • 4
  • 3
  • 2
9 Comments
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
ID: 40598114
Hi,

let's work through this one step at a time:

Remove the first line: "<?xml version="1.0" encoding="utf-8"?>" it's no longer needed and your document is not XML.
0
 

Author Comment

by:Sabina_Compassi
ID: 40598208
Where exactly would I need to remove the line?
0
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
ID: 40598221
I've just realised this is a joomla system right? If so, sorry I'm not familiar with it at all. It would be in the templates or theme you're using.
0
 

Author Comment

by:Sabina_Compassi
ID: 40598237
Yes, it is.
The line is one of the template files, it is the  
TemplateDetails.xml.
file.

That I know. It just sounds strange to me to delete it there. Are you saying that I might not need that file at all?

Sabina
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40598842
The errors in the head are almost certainly a chain of events caused by the xml file.  I don't know if you actually need that in the page if you post the contents of it we can see if it is actually necessary. Joomla is fine if you don't want to step outside of its very restrictive limits, but the second you try an do something custom you better have good programming skills because it will jump up and bite you hard.

Cd&
0
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
ID: 40599840
You DO need that line in that file because it is an XML document.  "The file holds key metadata about the template."  It isn't the template itself but describes how the template should be rendered.

However, any of the files that it references that have the .php extension should NOT have the xml doctype.
0
 

Author Comment

by:Sabina_Compassi
ID: 40625263
I have checked the TemplateDetails.xml file, it references error.pho AND index.php of course:  see screen shot)TemplateDetails.png.
See screenshot of the relevant section of index.php (indexphp.png).
indexphp.png
Any suggestions?
I still have no clue of how to overcome the issue.
I was able to resolve some of the other errors, but not this one.
After we've resolved it, we may still have to look at the error messages claiming that there are missing tags.

Sabina
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 40626859
In the php page code you are outputing the xml tag with an echo.  IThat absolutely cannot be right because the php page file is not an XML document.

Cd&
0
 

Author Closing Comment

by:Sabina_Compassi
ID: 40627674
Short answer, but detailed enough for me to find the mistake and correct it. Thank you.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now