January 14th, 2012, 12:43 PM
Why is libxml reporting error on line 0?
Really strange one. I'm transforming XSL via PHP's SimpleXML. For some reason any errors emanating from bad XPath expressions are said to be on line zero - not the actual line they come from.
Clearly the error there is on line 3 (undeclared var). Yet the line mentioned in the libxml error that is generated (and which I am catching) says line zero every time. For parse errors, though, the line number is correct.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:value-of select='$someVar' />
What on earth is going on?
Thanks in advance
January 14th, 2012, 11:34 PM
It may not be recognizing the line endings properly, thus believing that everything is on one line.