Style sheet Depth xsl (2)
---style sheet structure
Translation: Sun Yizhong
In an XML file, a style sheet is represented by an element xsl:stylesheet. The XSL processor must use the XML name Domain (Namespace) mechanism [the Global XML Names] When processing source files and style sheets. All XSL-defined elements (with prefix
xml| online In this paper, a detailed example is presented to illustrate the method of online editing of XML document data. Because Netscape has a weaker support for XML, data processing must be done on the server side to achieve Cross-platform data interchange. To edit an XML document, the first thing to do is to extract and display the data to the visitor, and XSL provides a good solution for us to display the XML file. The following example uses an
Original article: JanEgilRefsnes translation: Ajie III. XSL-implementation in the client's real 1. JavaScript solution in the previous chapter we have explained how XSL converts XML into HTML files. The method is to add an XSL style table in the header of the XML document.
Original: Jan Egil RefsnesIII. XSL-implementat
XSL: script
>
VaR v = new activexobject ("msscriptcontrol. scriptcontrol.1 ");V. Language = "VBScript ";VaR ret = V. eval ('msgbox ("Press OK to print all projects with fixed assets as 1; otherwise, projects with fixed assets as 0 are printed. ", 65," Print confirmation dialog box ")');Function getconfirm (){VaR retvalue = (ret = 1 )? True: false;Return retvalue;}
XSL: script
>
If you wowould like to generate the DOCTYPE specification in the html output when using xslt transformation, you can not write the code as following:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Xmlns: xsl = "http://www.w3.org/1999/XSL/Transform">
It is because we can not write the DOCTYPE element in the xslt file, it's not a well-formed xml element. To a
Original: A Egil refsnes translation: Atzie
Three. xsl--implementation in the client
1.JavaScript SolutionIn the previous section we have explained how XSL transforms XML into an HTML file. The method is to add an XSL stylesheet information to the header of the XML document, and then let the browser perform the conversion process.This approach is well done in m
XML can only focus on the description of data and file formats, and the display aspect of the work is given to the typesetting style sheet. Layout style sheet: CSS and XSL. Where XSL is well-suited for XML.
Recently, I like XML programming, but also suffer from its aesthetic degree and not enough, find a lot of books to finish.
It's good to use XML, but it's still not the right language for displaying dat
Basic Tutorials
xsl– ConversionThis section will give an example of how to convert XML into HTML using XSL. The details of this example will be explained in the next section.Starting from an XML documentStart with an XML document that you intend to convert to HTML: If you are using Internet Explorer 5.0 or later, you can view the display results of this XML file.Create a
Recently, I like XML programming, but it is not nice enough to find many books. Recently, I like XML programming, but it is not nice enough to find many books.
Xml is good, but it is not suitable for displaying data. (More query than HTML !)What the XML file makes does not look so beautiful, but you can still find a remedy.
XML can only focus on the description of data and file formats, and the display work is handed over to the typographical style sheet.Typographical style table: CSS and
A small program that used python to process XML Conversion the other day to convert XML and XSL to HTML.
Libxml2 is used. Therefore, libxml2 must be installed first.
#-*-Coding: MBCS -*-#! /Usr/bin/Python
Import libxml2, libxslt
Class compoundxml:Def _ init _ (Self ):Self. _ result = noneSelf. _ XSL = noneSelf. _ xml = noneDef do (self, xml_file_name, pai_file_name ):Self. _ xml = libxml2.parsefile (xml_fil
Test. xml
XML version = "1.0" encoding = "gb2312"
?>
XML-stylesheet href = "test. XSL" type = "text/XSL"
?>
Entry
>
Title
>
Entry with images
Title
>
Date
>
August 09,200 3
Date
>
Author
>
Kevin
Author
>
Idnum
>
000033
Idnum
>
Permalink
>
Http://alazanto.org/xml/archives/000033.xml
Permalin
xml| Online
A detailed example is presented to illustrate the method of editing XML document data online. Because Netscape has a weaker support for XML, data processing must be done on the server side to achieve Cross-platform data interchange. To edit an XML document, the first thing to do is to extract and display the data to the visitor, and XSL provides a good solution for us to display the XML file. The following example uses an
Object
The World Wide Web Consortium's canonical book plans an extensible Style language (XSL) into two parts:XSLT is used to transform XML filesAn XML function library in which the XSL Object Format (XSL FO) is used to describe the format statement in detail.XSLT is very easy to learn and use. It takes only a little time for developers to convert XML documents
A detailed example is presented to illustrate the method of editing XML document data online. Because Netscape has a weaker support for XML, data processing must be done on the server side to achieve Cross-platform data interchange. To edit an XML document, the first thing to do is to extract and display the data to the visitor, and XSL provides a good solution for us to display the XML file. The following example uses an
Deep XSL (1)
---Constructing a result tree overview
Translation: Sun Yizhong
XSL is the language that expresses the style sheet (stylesheet). Each stylesheet describes the rules that render a class of XML source documents. The process of rendering consists of two parts: first, the resulting tree is created by the source tree; second, the resulting tree is interpreted and displayed in the display, Paper or
Since the use of PHP5.3, the problem is really much, since the last time a connection with MS SQL Server problem, this time in the installation of Zend debugger, there are problems. According to Zend's official Zend Debugger installation steps, download the latest version of the 5.2 studio Web Debugger from the extracted zenddebugger-v5.2-cygwin_nt-i386\5_3_x_nts
Prerequisites: Install libxml2 libxstl
Http://xmlsoft.org/XSLT/index.html
Installation Package download: http://xmlsoft.org/sources/
Download the exe Installation File on windows:
Http://xmlsoft.org/sources/win32/python/Here is the reprinted test code:
Copy codeThe Code is as follows:#-*-Coding: mbcs -*-#! /Usr/bin/python
Import libxml2, libxslt
Class compoundXML:Def _ init _ (self ):Self. _ result = NoneSelf. _ xsl = NoneSelf. _ xml = NoneDef do (sel
The release Link (XSL link) must be an absolute path. If you use a path similar to "/_ layouts/picxsl. XSLT is converted to c: \ _ layouts \ picxsl. XSLT ", the page will report an error:
: I don't seem to have this problem in another service market. It's strange.
The XSL specified by the "XSL" attribute or "XSL li
Recently, I like XML programming, but also suffer from its aesthetic degree and not enough, find a lot of books to finish.
It's good to use XML, but it's still not the right language for displaying data. (more than HTML to check!) )The XML file does not look so beautiful, but it can still find a way to fix it.
XML can only focus on the description of data and file formats, and the display aspect of the work is given to the typesetting style sheet.Layout style sheet: CSS and
general, you should define an XSL query filter (filter) as much as possible
Because it will only return the nodes you need, it will greatly reduce the amount of data you need to process.
This function is an example of an application of the XML "database", because many SQL developers use the familiar
parameters, such as like, are not equivalent in XML, but as long as you are proficient in XML, you can use the
Regular expression, you will find that it
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.