Frog recommendation: Use the XSLT style sheet on the client to convert XML documents
I have not provided the source XML document and the two XSLT style sheets. You can write them yourself.
View Details nbsp; Nbsp; or nbsp;
Preface
As earlyWebBefore the standardization trend came, I consideredXML + XSLTI think this is a very elegant, efficient, and low coupling solution that will surely become popular.
However, there are still a few people who use this solution to build websites.WebStandardization is not easy.WebStandardization only showsCss) Separated, and the data and structure are still mixed, it is definitely not our final destination, it is just a transitional product.
XHtmlThe original intention of setting up
XML on the network can often see the background color by row alternately set table, more beautiful. But not necessarily what advanced Server technology, with simple xsl+xml still can be very good to achieve them.
For example, we have an XML document that records the URL:
Now, I would like to classify him as a table with two colors
XSLT/XML/C # (for conversion) This routine shows how to apply xslt to xml format data read from the database. The routine is fully written in C:Using System;Using System. Collections;Using System. Data;Using System. Data. SqlClient;Using System. Xml;Using System.
point on, the process is the same as external TABLE conversion. The last step is to add fields in each file. This time I didn't create any more embedded tables, but added these fields to the current TD.
Once I complete the general layout, I can start to add the user interface function, such as hiding other folders and file lines until the user clicks the relevant tab. This function can be implemented by writing scripts that support this function, adding an onclick xsl: attribute element to the
When you encounter XML files similar to the following, You need to place the different months of each year under the nodes of the year. If you use the C # programming language, it is easy to implement, because there are not many XSLT files, it also took me a bit of thought.
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->The idea was to define a variable to
Release date:Updated on:
Affected Systems:Debian Linux 5.0 xMandrakeSoft Linux Mandrake 2010.0 x86_64MandrakeSoft Linux Mandrake 2009.0 x86-64MandrakeSoft Linux Mandrake 2009.0MandrakeSoft Linux Mandrake 10.0Aleksey Sanin XML Security Library 1.2.16Unaffected system:Aleksey Sanin XML Security Library 1.2.17Description:--------------------------------------------------------------------------------Bugtraq i
1. Let the data and the display separate Test.xml data:
Test title
Test Content
Banner
Sidebar
main body
end
of the page
Test.xslt templates:
test Link rel= "stylesheet" "type=" "Text/css" "href=" "Test.css" ">
]]>
2. The Web page automatically generates a PHP program to read the co
Xml
Write a program need to change the root of XML, feel very inconvenient, so wrote a function, general ideas and implementation as follows:
The first thought is that XSLT can also filter something and then send it back to the client, so it's decided to use XSLTThen you try to write a root-change XSL, as follows
The general meaning is to parse all nodes and
A piece of XSLT conversion code mainly aims to retrieve the XML node name when implementing a dynamic form
I am too lazy to explain the principle. You can understand it.
1. separate data from display. xml data:
Such a split design can make the page more flexible. modifying any part at Will will not affect the rest of the blocks, and can constantly change the data of a specific block, such as the body. xml to generate more new pages, which is especially suitable for news systems or forums.
Generate an XML file ., Generate xml file
The previous project involves reading and writing XML files. Since I have never been familiar with this knowledge before, I found and tested the specific implementation methods on the Internet:
Method 1:1 // dynamically
An XSLT associated with it, word will not apply the XSLT when opening the document.
NoteYou can define a solution to associate XSLT with a specific type of XML document, rather than manually applying XSLT. This association needs to be performed in the "Architecture library"
Use Python to generate an XML Method Instance. Use python to generate an xml instance.
This example describes how to generate XML using Python. We will share this with you for your reference. The details are as follows:
1. booksto
Java uses jdom to generate xml format files, and javajdom to generate xml
The tool used to generate xml in this article is jdom. jar, as follows:Link: https://eyun.baidu.com/s/3slyHgnj password: 0TXFImport java. io. FileOutputStr
find a way to completely remove the XSL operation, but I still found a way to block out when I accidentally clicked XML to run directly. the XML file generation method is to create a fake Java XSLT processor:
1. Open eclipse indigo and execute the menu command window | preferences;
2. Find XML | XSL | Java processor
1.XStream Tool Description:This tool, the jar package for this tool, can help us to generate XML-formatted data such as JavaBean, set (LIST,SET,MAP), etc.Jar Package:Xstream-1.4.4.jar, this is the core package.Xpp3_min-1.1.4c.jar This is a must-depend packageAs long as importing these two jar packages into the build path, you can use the.2.json-lib Introduction:This jar can help us to
-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
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.