这是我的xsl文件,大家帮我看看有什么不对的,为啥我双击打开xml文件没有显示出应该有的数据?<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http//www.w3.org/1999/xsl/Transform">
<xsl:output method="text" indent="no"/>
<xsl:template match="catalog">
<xsl:apply-templates select="catalog/book">
<xsl:sort select="book/genre" />
</xsl:apply-templates>
</xsl:template> <xsl:template match="book">
<xsl:value-of select="book/author"/>
<xsl:text> </xsl:text>
<xsl:value-of select="book/title"/>
<xsl:text> </xsl:text>
<xsl:value-of select="book/genre"/>
<xsl:text> </xsl:text>
<xsl:value-of select="book/price"/>
<xsl:text> </xsl:text>
<xsl:value-of select="book/publish_date"/>
<xsl:value-of select="@id"/>
</xsl:template>
</xsl:stylesheet>=========================================================================================================
下面是XML文件结构:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="html/xsl" href=".\XML\jw303-task3.xsl"?>
<catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:NamespaceSchemaLocation="jw303-task1.xsd"> <book id="bk101">
<author>Gambardella, Matthew </author>
<title>XML Developer's Guide </title>
<genre>Computer </genre>
<price>44.95 </price>
<publish_date>2000-10-01 </publish_date>
<description>An in-depth look at creating applications
with XML. </description>
</book>
<catalog〉
===========================================================================================================
下面是xalan编译错误:
请问下大家 怎样写xalan命令才能把他们转换呢?出现java虚拟机问题
C:\Users\acer\Desktop\XML>java -classpath".:/usr/share/java/xalan2.jar:/usr/shar
e/java/xerces.jar:/usr/share/java/xml-apis.jar:/usr/share/java/xercesImpl.jar" o
rg.apache.xalan.xslt.Process -IN assignment1.xml -XSL jw303-task2.xsl -OUT jw303
-task2.txt
Unrecognized option: -classpath.:/usr/share/java/xalan2.jar:/usr/share/java/xerc
es.jar:/usr/share/java/xml-apis.jar:/usr/share/java/xercesImpl.jar
Could not create the Java virtual machine.
<xsl:stylesheet version="1.0"
xmlns:xsl="http//www.w3.org/1999/xsl/Transform">
<xsl:output method="text" indent="no"/>
<xsl:template match="catalog">
<xsl:apply-templates select="catalog/book">
<xsl:sort select="book/genre" />
</xsl:apply-templates>
</xsl:template> <xsl:template match="book">
<xsl:value-of select="book/author"/>
<xsl:text> </xsl:text>
<xsl:value-of select="book/title"/>
<xsl:text> </xsl:text>
<xsl:value-of select="book/genre"/>
<xsl:text> </xsl:text>
<xsl:value-of select="book/price"/>
<xsl:text> </xsl:text>
<xsl:value-of select="book/publish_date"/>
<xsl:value-of select="@id"/>
</xsl:template>
</xsl:stylesheet>=========================================================================================================
下面是XML文件结构:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="html/xsl" href=".\XML\jw303-task3.xsl"?>
<catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:NamespaceSchemaLocation="jw303-task1.xsd"> <book id="bk101">
<author>Gambardella, Matthew </author>
<title>XML Developer's Guide </title>
<genre>Computer </genre>
<price>44.95 </price>
<publish_date>2000-10-01 </publish_date>
<description>An in-depth look at creating applications
with XML. </description>
</book>
<catalog〉
===========================================================================================================
下面是xalan编译错误:
请问下大家 怎样写xalan命令才能把他们转换呢?出现java虚拟机问题
C:\Users\acer\Desktop\XML>java -classpath".:/usr/share/java/xalan2.jar:/usr/shar
e/java/xerces.jar:/usr/share/java/xml-apis.jar:/usr/share/java/xercesImpl.jar" o
rg.apache.xalan.xslt.Process -IN assignment1.xml -XSL jw303-task2.xsl -OUT jw303
-task2.txt
Unrecognized option: -classpath.:/usr/share/java/xalan2.jar:/usr/share/java/xerc
es.jar:/usr/share/java/xml-apis.jar:/usr/share/java/xercesImpl.jar
Could not create the Java virtual machine.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货