XSLTファイルを作成しようとしていますが、どちらのファイルにも名前空間を含めなくても機能させることができますが、どちらかに含めるとすぐに機能しなくなります。これが私が使っている例です。
私のXMLファイル
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Empire sdf</title>
<artist>Bob sdf</artist>
<country>2</country>
<company>asdfs</company>
<price>12.90</price>
<year>1935</year>
</cd>
</catalog>
私の変換ファイル。
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<html><body><table border="1">
<tr bgcolor="#9acd32"><th>Title</th><th>Artist</th></tr>
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
</tr>
</xsl:for-each>
</table></body></html>
</xsl:template>
</xsl:stylesheet>
私の結果
<?xml version="1.0" encoding="UTF-8"?>
<html>
<body>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<tr>
<td>Empire Burlesque</td>
<td>Bob Dylan</td>
</tr>
<tr>
<td>Empire sdf</td>
<td>Bob sdf</td>
</tr>
</table>
</body>
</html>
上記をこれに変更した場合はいいえ。私の新しいXMLファイル
<?xml version="1.0" encoding="ISO-8859-1"?>
<catalog
xmlns="http://www.someurl.com/v3.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.someurl.com/v3.0 ../someschema.xsl"
>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Empire sdf</title>
<artist>Bob sdf</artist>
<country>2</country>
<company>asdfs</company>
<price>12.90</price>
<year>1935</year>
</cd>
</catalog>
私の新しい変換ファイル。
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.someurl.com/v3.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.someurl.com/v3.0 ../someschema.xsl">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<html><body><table border="1">
<tr bgcolor="#9acd32"><th>Title</th><th>Artist</th></tr>
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
</tr>
</xsl:for-each>
</table></body></html>
</xsl:template>
</xsl:stylesheet>
変換されたファイルにデータがありませんか?この質問が基本的なものである場合は、失礼します。私はXSLTの経験がなく、現在、XSLTに頭を悩ませようとしています。