Re: [xsl] Sorting XML data by <entry ID="">

Subject: Re: [xsl] Sorting XML data by <entry ID="">
From: "Charles Muller acmuller@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 5 Jan 2022 04:51:37 -0000
The below XSLT seems to work, but despite the xsl:output method="xml" declaration, the files come out as .html (even though the contents are fine).

I should have said, the files areB output with an HTML extension, even though the XML structure remains intact.


Regards,

Chuck


What am I missing?


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
B <xsl:output method="xml" omit-xml-declaration="yes" indent="no"/>
<xsl:template match="dealt">
B <xsl:copy>
B <xsl:apply-templates select="@*"/>
B <xsl:apply-templates select="entry">
B B <xsl:sort select="@ID" order="ascending"/>
B </xsl:apply-templates>
B </xsl:copy>
</xsl:template>


<xsl:template match="@* | node()">
 B <xsl:copy>
 B  <xsl:apply-templates select="@* | node()"/>
 B </xsl:copy>
</xsl:template>


Regards,


Chuck



---------------------------
A. Charles Muller, Professor

Buddhist Culture Research Center
Musashino University
1-1-20 Shinmachi, Nishitokyo-shi
Tokyo 202-8585, Japan
Office Phone: 042-468-3145

(University of Tokyo, Professor Emeritus)
Web Site: Resources for East Asian Language and Thought
http://www.acmuller.net

Twitter: @ACharlesMuller




--

---------------------------
A. Charles Muller, Professor

Buddhist Culture Research Center
Musashino University
1-1-20 Shinmachi, Nishitokyo-shi
Tokyo 202-8585, Japan
Office Phone: 042-468-3145

(University of Tokyo, Professor Emeritus)
Web Site: Resources for East Asian Language and Thought
http://www.acmuller.net

Twitter: @ACharlesMuller

Current Thread