This example illustrates how to use the Extensible transform class to apply an XSLT file to an XML document. This class implements the W3C XSL conversion (XSLT) Version 1.0 specification of the WWW Federation (W3C. (For more information, see W3C W3C extensible style sheet language (XSL) 1.0 specifications .)
VB transformxml. aspx
Let's take a look at an example:For an xml template, the name attribute is critical. The name of the call-template/apply-template must be the same as the name of the template.Correspondingly. The template is equivalent to a function, which can be viewed for the moment. The name is equivalent to the function name.Using xsl: with-param in call-template is equivalent to function parameter input.The parameter declaration is equivalent to the
Http://msdn.microsoft.com/zh-cn/library/ms256045.aspx
Template is one of the most important concepts in XSLT. An XSLT file is composed of one template. Any XSLT file contains at least one template. The concept of a template is like building blocks.ProgramYou can also think of a template as a method, a class, or a module. They can be assembled and combined, or separate into blocks. Different templates control different output formats.
A template consists of two parts: Match pattern and execut
Original: JanEgilRefsnes translation: 2. XSL conversion 1. how does one convert XML to HTMLXSL to convert XML to HTML files? Let's look at an example. below is part of the XML document :? Xmlversion = 1.0 encoding = ISO8859-1? CATALOG
Original: Jan Egil RefsnesII. XSL conversion
1. Convert XML into HTML
How does XSL convert XML files into HTML files? Let's look a
OpenGL uses camera simulation to realize the most basic 3D transformations in computer graphics, including geometric transformations, projection transformations, cropping transformations, and viewport transformations. At the same time, OpenGL also implements matrix stacks. Understanding the content of coordinate transformation, even if it truly enters the wonderful 3D world.
I,OpenGLDisplay of 3D objects in
(1) Coordinate System
In the real world, all
Original article: JanEgilRefsnes translation: Jiajie VI. XSL filtering and query if we look forward to seeing only the XML data that meets certain conditions, how should we do it? In the preceding example code, we only need to participate in the parameter in the select attribute of the xsl: for-each element.
Original: Jan Egil Refsnes
VI. XSL filtering and query
After a few days of learning, we learned about the authoring of XHTML documents and three of XSL elements that have been able to write fairly flexible XSL documents, and today we will learn about the writing of XSL templates. As we all know, short documents and programs are very readable, but when scaled up, their complexity increases at a faster rate.
We have l
addresses the part of an XML document. Design XPath is for XSLT to use. Formatting is the process of turning the result of an XSL transformation into an output format appropriate for the reader or audience.November 16, 1999, XSLT and XPath are published as two separate recommended standards for the consortium. There are currently no separate documents for the document for the
This is called the separation of data and display, which is very good. When we want to change the wind, we only need to change the XSL and do not need to add a new copy of data. But sometimes there are special cases. For example, we have this strange requirement-writing XMLXSL to a file. There was no result after Baidu; suddenly, there was no popular Q A website
This is called the separation of data and display, which is very good. When we want to ch
XSL is for XML, just like CSS for HTML. EXtensibleStylesheetLanguage ). This is a language used to display XML data in a readable format. XSL actually contains two parts: * the language in which XSLT is used to convert XML documents
XSL is for XML, just like CSS for HTML. It refers to EXtensible Stylesheet Language ). This is a language used to display XML data i
A major feature of the xml| display of XML documents is that they can be converted to documents in multiple formats. For example, from a logical structure of XML to another logical structure of the XML conversion, or to the conversion of the HTML document can be browsed. The data format conversion functionality of this XML document is accomplished by an extensible Style single language (XSL).
Beijing posts and telecommunications Zhang Jian
--------
-each loop starts when the program encounters a tag. This loop ends when the program encounters a tag. Once this loop is run, this template will be applied every time the tag appears.
4. generate html
In the future, the browser will integrate the xml parsing engine. At that time, you can directly send xml and xsl files to the browser, while the browser displays xml data according to the rules listed in the style sheet. However, before that, developers
Original: Jan Egil refsnes
5. XSL Index
If I want to arrange the display of elements in a certain order, how should I create an XSL index?
Let's take a look at the previous example.Code:
.
.
.
When an XML document is converted to an HTML file, the index should be created at the same time. The simple method is to add an order-by attribute to your for-each e
Tutorials | index
Five. The index of the XSL
How do I establish an XSL index if I need to arrange the display of the elements in a certain order?Let's take a look at the previous example, or the code:
USA
Columbia
.
.
.
When an XML document is converted into an HTML file, the index should be established
In the last period we learned about the XSL element Grammar:Properties: None, representing the start of a multiple-selection test
Grammar:Property:expr── a script language expression that evaluates to True or false, and if the result is true, and the content is displayed in the output (this property can be omitted).The script language type of an expression in the Language──expr property, with the same value as the Language property of the HTML tag sc
How do I define attributes in an HTML tag in XSL using the value of XSL??[XML]XML version= "1.0"?>xml-stylesheet type= "text/xsl" href= "exam.xsl "?>Test> Test_type>ExamTest_type> TestIDID= "1"> say>What's the matter?say> Answers> AnswerID= "00001">I knowAnswer> AnswerID= "00002">I understandAnswer> AnswerID= "00003">YesAnswer> AnswerID= "00004">Go
XSL
XSL is for XML, just like CSS for HTML. It refers to the Extensible Stylesheet Language ). This is a language used to present XML data in a readable format. XSL actually contains two parts:
* XSLT-language used to convert XML documents
* XPath-language used for navigation in XML documents
XSLT refers to XSL
the conditions, true is returned"
$ Any $
Set operator. If any item in the Set meets the conditions, "true" is returned"
|
Set operator, returns the union of two sets
Example 1:
Find the name and e-mail of the person with "Web development" skills from his/her resume. Assume that the document structure is as follows:
.........
Find out the names of all persons with web development skills and e-mail's
This section describes the methods and attributes added by multiple XSL for VBScript and JScript to give full play to the advantages of XML, which are used for
1. absolutechildnumber
Meaning: return the sequence number of the node relative to all its brothers (regardless of whether the name is the same.
Syntax: absolutechildnumber (node)
Parameter: node-object. The node number to be returned.
Example:
1. Assume that the document struc
Original: A Egil refsnes translation: Atzie
Six. XSL filtering and querying
What should we do if we want to show only the XML data that satisfies certain criteria? Or the example code above, we just need to add parameters to the Select attribute of the Xsl:for-each element, like this:The logical choices for parameters are:= (equal To)=! (Not equal to)> greater than or equal
The same example as before (cd_catalog_sort.xsl):
You can test for yours
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.