Hello all, I have three files in the same folder as follows:
main.xml
<?xml version="1.0"?><--<?xml-stylesheet type="text/xsl" href="apply.xsl" ?>--><msi><table><td>field1</td><td>field2</td> </table></msi>
apply.xml
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:import href="getfield1.xsl"/><xsl:template match="/"><xsl:apply-imports/></xsl:template></xsl:stylesheet>
getfield1.xml
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="msi/table"><xsl:value-of select="td[1]"/></xsl:template></xsl:stylesheet>
By selecting the xml file, I go to XML / Assign XSLT ...
, choose apply.xml, then XML / Run XSLT
, it tells me XSLT compile error with no further indication or explanation. I am testing if xsl:import
works under SharpDevelop. By running the code (uncommenting the comment line) in IE, I get the expected result. Or, when assigning XSLT file, if we choose getfield1, Sharpdevelop delivers the expected result too.
Could you help on this? Thanks.