Thread: trouble styling xml with xsl

  1. #1
    Registered User
    Join Date
    Apr 2010

    trouble styling xml with xsl

    I've got an xml file
    <?xml version="1.0" standalone="yes"?>
    <?xml-stylesheet type="text/xsl" href="corporation.xsl"?>
    <!DOCTYPE Corporation [
    <!ELEMENT Corporation (name, employee, location)>
    <!ELEMENT name (#PCDATA)>
    <!ELEMENT employee EMPTY>
    	<!ATTLIST employee name CDATA #REQUIRED>
    	<!ATTLIST employee id_number CDATA #REQUIRED>
    	<!ATTLIST employee email CDATA #REQUIRED>
    	<!ATTLIST employee phonenumber CDATA #IMPLIED>
    <!ELEMENT location EMPTY>
    	<!ATTLIST location postal_code CDATA #REQUIRED>
    	<!ATTLIST location city CDATA #REQUIRED>
    	<!ATTLIST location province CDATA #REQUIRED>
    	<!ATTLIST location address CDATA #REQUIRED>
    	<!ATTLIST location size CDATA #IMPLIED>
    <name>Scott's Company</name>
    <employee name="Scott" id_number="34C23a" email="" phonenumber="2503358293" />
    <location postal_code="A1B 2C3" city="Victoria" province="B.C." address="2530 Broadway" size="20" />
    I've got an xsl file

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    <xsl:template match="/">
    	<!DOCTYPE html>
    		<html lang="en">
    			<meta charset="utf-8" />
    			<title>Sample Corporation #1</title>
    		Hello this is a test<br />
    		Have a great day!
    and Firefox gives me "XML Parsing Error: not well-formed
    Location: file:///E:/XSLT-XML-Shema/corporation.xsl
    Line Number 6, Column 4: <!DOCTYPE html>
    Last edited by c_weed; 06-12-2011 at 03:34 PM. Reason: changed xsl

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trouble with eof()
    By waterborne in forum C++ Programming
    Replies: 3
    Last Post: 06-23-2010, 03:54 PM
  2. Trouble with I/O
    By Dae in forum C++ Programming
    Replies: 15
    Last Post: 07-03-2005, 09:10 PM
  3. trouble
    By firefly in forum C++ Programming
    Replies: 4
    Last Post: 06-28-2005, 04:21 PM
  4. Trouble
    By The New Guy in forum C Programming
    Replies: 2
    Last Post: 01-28-2003, 06:02 AM
  5. trouble
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 05-25-2002, 04:47 PM