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

XML and XSL to HTML: Problems with well formed structure

Status
Not open for further replies.

cthaxter

Programmer
Aug 2, 2001
71
US
I'm trying to transform XML via XSL to HTML using xslt_process(), but I'm getting an error saying the XML or XSL is not well formed, but I don't get any further information than that.

Does anyone do this successfully? It's likely that my headers need to be set up a certain way, but I have no reference for this. If you have some sample XSL and even XML that you can paste here that you know works, I'd be grateful.

FYI, here's the exact error I'm getting:

Code:
Warning: Sablotron error on line 1: XML parser error 4: not well-formed (invalid token) in C:\htdocs\marketing\request_send.php on line 879

Here is the code snippet around Line 879:

Code:
$xslprocessor = xslt_create();
//line 879 follows:
$emailHtml = xslt_process($xslprocessor, 'C:\htdocs\marketing\request_mail.xml', 'C:\htdocs\marketing\request_mail.xsl');

Here are the current headers in the XSL file:

Code:
<xsl:stylesheet xmlns:xsl=&quot;[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform&quot;[/URL] version=&quot;1.0&quot;>
  <xsl:output encoding=&quot;utf-8&quot; method=&quot;html&quot; indent=&quot;yes&quot; />

Here are the current headers in the XML file:

Code:
<?xml version=&quot;1.0&quot;?>

I have no schema set up. This would be a big project. Is it required?

Thanks in advance for any help,

Christopher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top