xsl-list
[Top] [All Lists]

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

2022-01-04 22:51:44
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 are 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";>
  <xsl:output method="xml" omit-xml-declaration="yes" indent="no"/>
<xsl:template match="dealt">
  <xsl:copy>
   <xsl:apply-templates select="@*"/>
   <xsl:apply-templates select="entry">
    <xsl:sort select="@ID" order="ascending"/>
   </xsl:apply-templates>
  </xsl:copy>
</xsl:template>

<xsl:template match="@* | node()">
  <xsl:copy>
   <xsl:apply-templates select="@* | node()"/>
  </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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>