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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please Help XML File Won't Validate

Status
Not open for further replies.

happyfeet2

Technical User
Jun 21, 2010
1
US
Hi everyone,, I hope you can help me. I can not get my xml code to validate. I get the following error message: - end tag must have name compare.xml. reason, its name must match start tage "p"

Code:
?xml version="1.0" encoding="UTF-8"?>
<xml-stylesheet type= "text/css" herf ="format.css">

<document  xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xsi:noNamespaceSchemaLocation="file:///C:/Users/zxfactor/Desktop/note.xsd">
	<compare.xml>
	<frontpage>
	<title>Compare and Comtrast CSS, XSL and XSLT</title>
	<author>Karen D Morrison</author>
	<school>University of Phoenix</school>
	<class>WEB 432 XML</class>
	<professor>Sridevi Manepalli</professor>
	<date>June 21, 2010</date>
	</frontpage>
	<page2>
	<head1>Abstract</head1>
	<p>The purpose of this paper is to review, compare and contrast CSS, XSL, and XSLT stylesheets and the roles they play in the Web Design.  This paper also examines the different components of web design and how CSS, XSL, and XSLT meet the needs of web designers looking to designed web sites for the future. </p>
	</page2>
	<head2>What is CSS?</head2>
	<p>According to the Computer Desktop Encyclopedia, (1981 – 2009) Cascading Style Sheets, (CSS)  is “An extension to HTML to allow styles, e.g. color, font, size to be specified for certain elements of a hypertext  document.”  Web developers’ view cascading style sheets as a markup language that defines the way content is present.  It is placed directly into the head of the web document or as it can exist as a separate style sheet.  Cascading style sheet contain several CSS rules, these rules have elements within the web document. These rules define how the elements will be styles and displayed. There are three types of cascading style sheet, browser style sheets, user style sheets and author style sheets.  All three style sheets determine or influence the presentation of a web page or site. </p>
	<p>
	<head3>What is XSL</head3>
	<p>Extensible Stylesheet Language, (XSL) determine how an XML document will be displayed. According to Computer Desktop Encyclopedia, (1999 – 2009) “the term Extensible Stylesheet Language (XSL) is used to refer to a family of languages used to transform and render XML documents. XSL Transformations, (XSLT)  for transforming XML documents, XSL Formatting Objects (XSL-FO) for specifying the visual formatting of an XML document, and XML Path Language (XPath) which is used by XSLT for addressing the parts of an XML document.”</p>
	<head4>>What is XSLT?</head4>
	<p>According to Tidwell (2001), Extensible Stylesheet Language Transformations (XSLT) “is used for the transformation of XML documents into other XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one.”  XSLT is the easiest way to read data from XML documents and work with that data. With XSLT, a designer can create documents that contain data that can be sorted, search and displayed in a variety of results to the site visitor or designer. </p>	
	<p>The following table will compare and contrast the differance between CSS, XSL and XSLT</p>
<table width="367" border="2" cellpadding="2" cellspacing="2">
  <tr>
    <td colspan="4"><div align="center">Compare and Contrast CSS, XSL and XSLT</div></td>
  </tr>
  <tr>
    <th>Attributes</th>
    <th>CSS</th>
    <th>XSL</th>
    <th>XSLT</th>
  </tr>
  <tr>
    <tr>Style Documents</tr>
    <tr>Yes</tr>
    <tr>Yes</tr>
    <tr>Yes</tr>
  </tr>
  <tr>
    <tr>Use With HTML</tr>
    <tr>Yes</tr>
    <tr>Yes</tr>
    <tr>Yes</tr>
  </tr>
  <tr>
    <tr>Can Store Data</tr>
    <tr>No</tr>
    <tr>Yes</tr>
    <tr>Yes</tr>
  </tr>
  <tr>
    <tr>Use With XML</tr>
    <tr>Yes</tr>
    <tr>Yes</tr>
    <tr>Yes</tr>
  </tr>
  <tr>
    <tr>Is a Programming Langiuage</tr>
    <tr>No</tr>
    <tr>Yes</tr>
    <tr>Yes</tr>
  </tr>
  <tr>
    <tr>Can Perform Calculations</tr>
    <tr>No</tr>
    <tr>Yes</tr>
    <tr>Yes</tr>
  </tr>
</table>
	<head4>Conclusion</head4>
	<p>According to Williams (2008), "CSS can be applied to both XML and HTML documents to indicate how you want those documents to look in a Web browser." Using XSLT, you can transform an XML document into any text-based format, including HTML, plain text, or another schema of XML. As technology continues to head into the twenty-first century, web developers need to have a good understanding of all the tools available to produce the best web sites for their clients.</p>
	<p>	
</compare.xml>
 </document>
 
[0]
[tt] <[red]/[/red]p>
</compare.xml>
[/tt]
[1]
[tt]<[red]?[/red]xml-stylesheet type= "text/css" h[red]re[/red]f ="format.css"[red]?[/red]>
[/tt]
[2]
[tt][red]<[/red]?xml version="1.0" encoding="UTF-8"?>[/tt]
 
That, and:
Code:
[red] <p>[/red]
    <head3>What is XSL</head3>


[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top