An introduction to XSL
1.XSL---style sheet for XML
HTML Web pages use predefined identities (tags), which means that all tags have a clear meaning, such as However, XML does not have a fixed identity, we can build the identity we need, so browsers can't parse them automatically, for example In order to control the display of XML documents, it is necessary to establish a mechanism, CSS is one of them, bu
Original: Jan Egil Refsnes
Ii. XSL Conversion
1. Convert XML into HTML
How does XSL convert XML files into HTML files? Let's look at an example. below is part of the XML document:
...
Then, we use the following XSL file as an HTML template to convert XML data to an HTML file:
In the above Code, the
In the last period we talked about formatting XML documents with CSS (cascading style sheets), and the effect was not very satisfying. In fact, CSS is a good place to format HTML tags, just because it's simple to use in the example above.XML is just a data file in more time, how can it be changed into the HTML format that we see everyday? If we compare an XML file to a structured raw material, then the XSL is like "sieve" and "die", and the sieve choo
A XSL-FO document is an XML file with output information. The XSL-FO document is an XML file with output information. They contain information about the output layout and output content. XSL-FO documents are stored in files suffixed with. fo or. fob. Take. xml
A XSL-FO document is an XML file with output information.
1. Get started with XSL
1. style sheet of XSL---XML
The HTML webpage uses a pre-defined identifier (TAGS), which means that all the tags have a clear meaning. For example, However, XML does not have fixed identifiers. We can create the identifiers we need, so browsers cannot Parse them automatically. For example, To control the display of XML documents, it is necessary to establish a mechanism. CSS is o
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
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
What is XSL
Full name extensible Style Language, Chinese translation extended style language, used to format XML documents, it consists of two parts.
1 (XSLT): XSL transformation Language (XSLT), which converts an XML document from one format to another. such as converting to HTML, text, or text-based documents.
2 (XPath): XSL Format object, formatting object pro
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
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
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
Original: A Egil refsnes translation: Atzie
Two. Transformation of XSL
1. Convert XML to HTMLHow does XSL convert an XML document into an HTML file? Let's take a look at an example where the following is part of an XML document:
...
We then convert the XML data to an HTML file as an HTML template for the following XSL file:
In the above code, the role of t
Tutorials | transformations
Two. Transformation of XSL
1. Convert XML to HTMLHow does XSL convert an XML document into an HTML file? Let's take a look at an example where the following is part of an XML document:
USA
Columbia
...
We then convert the XML data to an HTML file as an HTML template for the following
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
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
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.