Khi sử dụng trình duyệt để chuyển đổi XML (Google Chrome hoặc IE7), bạn có thể chuyển tham số vào biểu định kiểu XSLT thông qua URL không?Có thể chuyển tham số cho XSLT thông qua URL khi sử dụng trình duyệt để chuyển đổi XML không?
dụ:
data.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="sample.xsl"?>
<root>
<document type="resume">
<author>John Doe</author>
</document>
<document type="novella">
<author>Jane Doe</author>
</document>
</root>
sample.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="html" />
<xsl:template match="/">
<xsl:param name="doctype" />
<html>
<head>
<title>List of <xsl:value-of select="$doctype" /></title>
</head>
<body>
<xsl:for-each select="//document[@type = $doctype]">
<p><xsl:value-of select="author" /></p>
</xsl:for-each>
</body>
</html>
</<xsl:stylesheet>
Phần hai của câu hỏi sẽ là nó có thể client-side chỉ? – user9547