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:
issues.apache.org/jira/browse/XALANC-665
But not moved in.
October 8th 19 at 02:05
2 answers
October 8th 19 at 02:07
Solution
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">

</xsl:output></xsl:import></xsl:import></xsl:stylesheet>


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">
</xsl:output>


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:
<?php
$xmlstr=<<<XML
<?xml version="1.0" encoding="windows-1251"?>

<!--ELEMENT component (software, title)-->
<!--ELEMENT software (#PCDATA)-->
<!--ELEMENT title (#PCDATA)-->
]>
<doc>
<component>
<software>Abvgd</software>
<title>icooking</title>
</component>
</doc>
XML;

$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">
<title>Eklmn</title>
<h1 title="oprst {title}"><xsl:value-of select="software"></xsl:value-of></h1>

</xsl:template>
<xsl:template match="xsl:stylesheet">
</xsl:template></xsl:output></xsl:stylesheet>
XSL;

dl("php_xsl.dll");
$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;
$xsl->loadXML($xslstr);//$xsl->load('1.xsl');
$proc = new XSLTProcessor;// Configure the transformer
$proc->importStyleSheet($xsl); // attach the xsl rules
echo $proc->transformToXML($xml);
//$proc->transformToURI($xml, 'file:///tmp/out.html');
</xsl>
issues:



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


 <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