Recently using Firefox for Web page debugging, I found that some JavaScript XSLT processing XML statements only support IE browsers. Some of the articles in the web that describe JavaScript XSLT processing XML are basically based on Ajax.
In desperation, I wrote a JavaScript XSLT to handle the small functionality of the XML Presentation page. Now posted to share
We know that XML + XSLT can be directly output to browsers that support XML, such as IE 5.0 or later. However, we also need to consider that many Browsers Do not directly support XML. In this case, we need to convert to html output to the browser on the server. I am afraid this temporary transition method will be used for a while. bhd webmaster InformationBhd webmaster InformationUsing Jsp with tablib to identify the library, we can complete this conv
Use php + xslt on windows platforms and use php + xslt on windows platforms
1. Download php 4.0.6 to http://www.php.net
2. Decompress php-4.0.6-win32.zip to c: \ php.
3. Configure php on web server
3. Copy the following four files in the dlls directory to windows \ system (32 ).
Expat. dll
Sablot. dll
Xmlparser. dll
Xmltok. dll
4. Modify php. ini
Modify extension_dir to point to the correct extension
conversion (similar to the foreach statement in programming languages ),In the following example, child elements under pets are selected and the names of child elements are displayed cyclically:Copy codeThe Code is as follows:3) xsl: if element condition display nodes (similar to the if statement in programming languages) should be replaced by Copy codeThe Code is as follows:4) xsl: multi-branch condition display of choose (similar to the switch statement in programming languages)Copy codeThe C
automatically generated code. But now a lot of the use of Div layout, but also involves the invocation of jquery, so the introduction of the following style, template application is mainly focused on dvt_1.body and Dvt_1.rowview two tags.(1) Dvt_1.body is the place to realize the data display, For-each loop output each data. For example, to output Effects after applying a template:Dvt_1.rowview templatesAfter applying: As for other conditional judgments, the specified output can be implemented
1. the XSL style sheet consists of one or more rules called templates.
Each template contains the rules applied when a specified node is matched.2.
The match attribute is used to associate XML elements and templates. The match attribute can also be used to define a template for the entire document. The value of the match attribute is an XPATH expression (for example, match = "/" defines the entire document ).
If multiple processing methods are defined for the same element, use mode to different
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;
The format-number () function of XSLT is really powerful in formatting numbers. Simply specifying a format string can format numbers into any desired format. However, a problem occurs recently. If a number is formatted as a non-numeric string, the output result is a nan string, what I want is to display the "-" character. Before formatting, do you need to determine whether it is Nan? The condition-based judgment Statement of
When using the default namespace in XML, you need to change the namespace when using XSLT for conversion, that is, to name the original default namespace. After one night, I found out that this was the case.
For details about the problem and solution, refer to the following:
Http://bbs.w3china.org/dispbbs.asp? Boardid = 8 id = 50281
In addition, the XML namespace is described in detail in this article:
XML Namespaces and how they affect XPath and
XSD xml schema definition (XML schema definition) can write XML that meets the requirements according to the given Architecture
XPATH (XML query language). The path can be used to access the path.
XSLT (extensible stylesheet language transformation) is a language used to convert XML documents into XHTML documents or other XML documents. Simple tutorial
XQUERY is easier to use than XSLT. It is a query
In the XSLT template, the format of a parameter nodeid is defined as follows:
Generally, the value of the nodeid parameter is in the *** format, and there is no error in using this parameter. However, in some special cases, the format of the passed nodeid parameter is ****, * *** format. In this case, you only need to capture the content before the first Separator in the nodeid. Finally, find the solution to the file, that is, define another parame
XML element name equals the name of the object type and exposes the name of the field property, but you can change this default behavior by adding attributes, preceded by the definition of the type Tableinfo XmlType The XML element name generated for the type Tableinfo is not an object type name Tableinfo, but a table.
[System.Xml.Serialization.XmlType("Table")] public class TableInfo
In the same way, we specified the XML element name field for the type FieldInfo, which shows the application
Summary
Struts is an excellent framework for Java Web development. Struts is one of the Apache projects and now struts has been widely supported in the Java development community. In this article, Julien Mercay and Gilbert Bouzeid will introduce the process of struts, describe the struts framework, and finally put forward the design method of model 2x. Model 2x replaces the JSP page in the original presentation layer with XML/XSLT. Model 2x In this w
Code code as follows:
2) The Xsl:for-each loop shows the transformation of the select= "XPath expression" selection node (similar to a foreach statement in a programming language).The following example selects the child elements below pets and loops through the names of the child elements:
Copy Code code as follows:
3 xsl:if element Condition display node (if statement in similar programming language) Note that the less than number is greater than the
Xml
XSLT command [XML format conversion]1. Cycle 2. Sort 3. Conditional processing 4. Name Template5. Numbering method
XML document [Article.xml] [Sharing] Tens of thousands of levels of paging stored procedures (with effect demo) effect Demo:Http://www.cn5135.com/_App/Opportunities/QueryResult.aspxCREATE PROCEDURE cn5135_sp_pagination/******************************************************************Tens of millions of levels of paging stored proced
application server that is installed with NetBeans IDE 6.0, which includes the JBI runtime. Perform the following steps to determine that the GlassFish V2 application server is installed with NetBeans IDE 6.0 and that the JBI runtime contains the XSLT Service Engine and Transform Shared Library required for this tutorial:
Open the service window.
Expand the Servers node.
Right-click the GlassFish V2 node and choose Start from the pop-up menu.
If
As with database sorting, XSL/XSLT can also achieve random ordering, the principle is very simple, the following is the code.
Xmlns:msxsl= "Urn:schemas-microsoft-com:xslt"Xmlns:emeng= "http://dotnet.aspx.cc/"Version= "1.0" >function Random () {return Math.random ();}
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.