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
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
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
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
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
xml| Tutorials | Getting Started | showing
By using XSL, you can add display information to an XML document.
Using XSL to display XML
XSL is the preferred XML Stylesheet language.
XSL is far more sophisticated than CSS. One way to use XSL is to convert it to HTML before the
Template Depth xsl (4)
---template
Translation: Sun Yizhong
1 overview
When a rule applied to a source element is determined, the template for that rule is implemented. A template can contain the elements of a literal result, character data, and instructions that produce a tree portion of the result. Directives are represented by elements in the XSL Name field and can be processed by selecting descendant
The combination of XML + XSL and HTML is the current content management system. The methods for presenting specific data to the client are mainly XML + XSL or Html. Take CSDN as an example. Currently, both methods exist. For example, in the forum, we use XML + XSL, and in the document center we use SHTML.
Based on my experiences. XML +
Implementation requirements: In the early stage of work, the Silverlight Workflow Editor should interact with the Web service layer information. Of course, you may not pass the web page, but you must set up a communication service channel, it can be implemented in V2.0.
On the Silverlight and web pages, parse and encapsulate XML based on the XML Information Carrier, and parse and encapsulate XML based on JS on the web pages, because the XML format is
This information needs to be displayed on th
Original: Jan Egil Refsnes
Iii. XSL-implementation on the client
1. JavaScript Solution
In the previous section, we have explained how XSL converts XML into HTML files. The method is to add an XSL style table information to the header of the XML document, and then let the browser execute the conversion process.
This method works well in most cases, but it cannot
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.