Hello, I'm a bit new to XSLT and Xalan. I'm trying to do an example transformation from a book I have on XSLT. I've tried it using both the command line tool and programmatically from a C++ program using the Xerces and Xalan libraries, and in both cases, the output is simply the XSL file.
Here is the original XML file to transform, titled "people.xml": <?xml version="1.0"?> <people> <person born="1912" died="1954"> <name> <first_name>Alan</first_name> <last_name>Turing</last_name> </name> <profession>computer scientist</profession> <profession>mathematician</profession> <profession>cryptographer</profession> </person> <person born="1918" died="1988"> <name> <first_name>Richard</first_name> <middle_initial>P</middle_initial> <last_name>Feynman</last_name> </name> <profession>physicist</profession> <hobby>playing the bongos</hobby> </person> </people> Now here is the transform rule, titled "minimal.xsl": <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3c.org/1999/XSL/Transform"> <xsl:template match="person">A person</xsl:template> </xsl:stylesheet> If I try to apply the transform to the original document with the following command: >xalan -in people.xml -xsl minimal.xsl -out out.txt out.txt just contains the following: <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3c.org/1999/XSL/Transform" version="1.0"><xsl:template match="person">A person</xsl:template></xsl:stylesheet> Which is just the original xsl document, minus the whitespace between tags. I've tried doing this same task programmatically and get the same results. Also, I've tried this with a different stylesheet, and again, the general pattern is that the output is simply the stylesheet, minus whitespace. By the way, the book tells me that what I should expect as output is simply the input with the tags stripped away, and the "person" tag replaced with the text "A person". I figure there's probably something I'm missing. Any help anyone could give me would be very much appreciated. Thanks, Cooper -- View this message in context: http://www.nabble.com/Xalan-doesn%27t-seem-to-be-doing-transforms-tp18458604p18458604.html Sent from the Xalan - C - Users mailing list archive at Nabble.com.