Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

tag

tag

JSP Standard Label LibraryJSP Standard Tag Library

The tag applies an XSL to an XML document.

Syntax format



property

The tag has the following attributes:

property Description Whether it is required Default value
doc The source XML document No Body
docSystemId The URI of the source XML document No None
xslt The XSLT stylesheet Is None
xsltSystemId The URI of the source XSLT document No None
result The object that receives the transformation result No Print to page
var The variable representing the transformed XML document No Print to page
scope The scope of the var attribute No None

Example Demonstration

style.xsl file:















  

  

   

  

  







  

      

The code of the main.jsp file is as follows:



<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>







  JSTL x:transform 标签





Books Info:

Padam History ZARA 100 Great Mistry NUHA 2000

The running result is as follows:


JSP Standard Label LibraryJSP Standard Tag Library