Why, after an xslt transformation in the attributes of the Cyrillic alphabet in hexadecimal form?

Actually the question in the title.

What is.
The source code responsible for the transformation is the same, the only difference is the servers.

Not the right attributes:
But not moved in.
October 8th 19 at 02:05
2 answers
October 8th 19 at 02:07
In my case solution was to specify the encoding after importing files

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:import href="../../../Custom/site/media/xsl/default.xsl">
 <xsl:import href="Page.xsl">

 <xsl:output encoding="UTF-8">


Thank you, 1010101001000100110100111, Your example code worked as it should, which allowed to conclude that the problem is in the XSL templates.

The question remains open with default.xsl. In the file defines the output:
 <xsl:output method="xml" version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" indent="yes" omit-xml-declaration="yes">

BUT the import encoding be forgotten.
October 8th 19 at 02:09
1010101001000100110100111, we are Talking about the values of attributes, the rest of the text is displayed correctly. And here the attributes are converted to the hexadecimal representation of the characters.
Sorry, replied instead of clarifying. - Vincent_Terry0 commented on October 8th 19 at 02:12
What is the difference, the rest of the text or attribute values:
<?xml version="1.0" encoding="windows-1251"?>

<!--ELEMENT component (software, title)-->
<!--ELEMENT software (#PCDATA)-->
<!--ELEMENT title (#PCDATA)-->

$xslstr=<<<xsl <?xml version="1.0" encoding="Windows-1251" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" encoding="Windows-1251" omit-xml-declaration="yes" standalone="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" media-type="text-html">
<xsl:template match="/doc/component">
<h1 title="oprst {title}"><xsl:value-of select="software"></xsl:value-of></h1>

<xsl:template match="xsl:stylesheet">

$xml = new DOMDocument;
$xml->loadXML($xmlstr); //$xml->load('1.xml');// Load the XML source
if (!$xml->validate()) die("This document is invalid!");
$xsl = new DOMDocument;
$proc = new XSLTProcessor;// Configure the transformer
$proc->importStyleSheet($xsl); // attach the xsl rules
echo $proc->transformToXML($xml);
//$proc->transformToURI($xml, 'file:///tmp/out.html');

 <meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">

 <h1 title="oprst icooking">Abvgd</h1>

Copy, if you do not mind, here is Your source.
By the way, the extension xsl is not the only way in Windows is. - Leila commented on October 8th 19 at 02:15
1010101001000100110100111, thanks for the example!

And thanks for the attribute omit-xml-declaration="yes", at the time, couldn't get rid of
By the way, about the extension is clear, for servers located both on win platform and unix. Thanks again! - Vincent_Terry0 commented on October 8th 19 at 02:18

Find more questions by tags ApachePHP