Php, XML, XSLT, Mysql, and code .? Php (as the mainstream development language) require_onceDB.php (as the mainstream development language); database processing class dataTypeMySQL in PEAR (the best combination with PHP)
Require_once "DB. php (as the mainstream development language)"; // database processing class in PEAR
$ DataType = "MySQL (the best combination with PHP)"; // Database type
$ User = "root"; // user name
$ Pass = "abcd"; // password
$
1. How to Use call-template? How do I pass parameters and define return values?
A: The XSL: withparam element is used in the call-template field to define the parameters to be passed and the XSL: Param Parameter definition form parameter is defined in the called template.
2. How do I convert the input file namespace to the output file?
Use the XSL: namespace-alias element.
3. How does apply-templates select the template? Is it based on the element name, not the Template Name?
As follows:
I
1.
If the select result is null, nothing is actually done.
2. wildcards in xpath
Wildcard
Description
*
Match anyElement Node.
@*
Match any attribute node.
Node ()
MatchAny type of Node.
3.
The code above demonstrates how to insert variables and parameter values in the output document stream. The method is {$ name}
4. performance differences between call-template and apply-templates:
In terms of raw performance XSL:
The system-property () function is used to return the value of a system property. The string parameter specifies the name of the system attribute.
Syntax: system-property (string)
Parameter: string, required
Return Value: XPath expression
Example
Xml:
Xslt:
Result:
version:1vendor:vendor-url:
Current function, returns the current node, returns the node set containing only the current node
Syntax: current ()
Parameter: None
Return Value: Node Set
Example:
Xml:
Xslt:
Result:
Red
Green
Blue
The document (URL) function parses an external XML document (not an XML source document for conversion) into an XML node tree that can be directly referenced. The URL parameter specifies the physical address of the external XML document.
Syntax: document (URL)
Parameter: URL string, required
Return Value: Node Set
Example:
Document. xml:
Xml source document:
Xslt:
Result:
Blue is at 3.
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 record loops, but the assignment of the varia
Simplified version, from: http://stackoverflow.com/questions/982687/how-do-i-display-xml-using-an-xslt-document-in-a-delphi-app
Uses XMLDoc, XMLIntf;function Transform(XMLContent : string; XSLContent : string) : WideString;var XML : IXMLDocument; XSL : IXMLDocument;begin XML := LoadXMLData(XMLContent); XSL := LoadXMLData(XSLContent); XML.DocumentElement.TransformNode(XSL.DocumentElement, Result)end;
I tried it, but it is really easy to use, but
Generating HTM pages with XML and XSLT is what I always want to do,
After all, instead of making the ASPX page access the database every time it accesses the database, open the data connection, and close the data connection,
It is better to save data as an HTM static page.
I have been searching for this information on the Internet. I also went to msdn to look at the class library, one method and one method, and finally managed to gain a glimpse.Co
In the recent project development process, the mentor asked me to make an RSS subscription function. After several hard work, I finally got it, however, it is disappointing that when using IE6 for browsing, it is not as shown in IE8, and IE6 contains all XML code. Finally, we finally found the best solution: using XSLT to convert XML into XHTML. Let's see how to escape ....
The content in the XML file is:
Lt; RSS version = "2.0" gt;
Add this sent
Using PHP+XSLT on the Windows platform
1. Download PHP 4.0.6 to Http://www.php.net
2. Unzip the Php-4.0.6-win32.zip to the c:php
3. Configure PHP on the Web server
3. Copy the following four files under the DLLs directory to Windowssystem (32)
Expat.dll
Sablot.dll
Xmlparser.dll
Xmltok.dll
4. Modify PHP.ini
Modify Extension_dir point to the correct extension directory
Extension_dir = C:/php/extensions
and find the following line.
; Extension=php_sablot
Using PHP+XSLT on the Windows platform
1. Download PHP 4.0.6 to Http://www.php.net
2. Unzip the Php-4.0.6-win32.zip to the c:\php
3. Configure PHP on the Web server
3. Copy the following four files under the DLLs directory to Windows\System (32)
Expat.dll
Sablot.dll
Xmlparser.dll
Xmltok.dll
4. Modify PHP.ini
Modify Extension_dir point to the correct extension directory
Extension_dir = C:/php/extensions
and find the following line.
; Extensio
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 alternating in rows. As shown in the following illustration:
XSL can write this,
Xmlns:xsl= "Http://www.w3.org/1999/XSL/Transform" >
Common operators in XSLT programming are as follows:
! = Not equal"" (Literal) Text''(Literal) Text() (Grouping) Group* (All nodes) All nodes* (Multiplication) wildcard+ Add-Subtraction-(Unary minus). (Self axis short form) Current element... (Parent axis short form) parent Element/(Step separator) Select child element// (Descendant-or-self axis short form) Select the child element, no matter how deep: (Axis specifier) (I don't know how to translate i
elements. Each XML file must have only one element. Elements can be divided into simple elements and composite elements (with lower-level elements ).(3) attributes can be included in an element (attributes)
4. What is a Cascading Style Sheet?The description structure of the common flag language, rather than the format. The style sheet adds the display format without damaging the document structure.
5. What is XSL? What is the relationship with CSS? What is the relationship with
I mentioned some basic XSLT conversion XML knowledge in my previous article. Here I will give a systematic summary. The purpose of learning is to be practical.
Let's talk about the project requirements.Project requirements: 1) The display mode of the page changes frequently, but the data is relatively small. 2) The page displays different places and displays different results. But the data remains unchanged. 3) It is difficult to select data on the p
After reading w3school documents, you can see that XSLT provides two system functions to convert string case formats: upper-case () and lower-case (). However, these two functions are for analyticdb 1.0 and later versions. Microsoft uses XSLT, so when youCodeWhen these two functions are used, the system prompts that they are invalid. Here is an alternative solution, which can be solved by using the translat
:
In the enterprise EP development process, the use of RSS is very common.
In the above example, two webparts are used in Moss (content editing webpart + RSS webpart)
We will not introduce the content editing webpart. Very easy
For RSS webpart, you only need to configure RSS link on the toolbar panel.
For example, http: // 10.5.16.16/ACD/EFG/abcdeff/rss_ldjh.jsp is a standard RSS source.
The RSS style is as follows:
A certain degree of XSL is required.
Version = "1.0" exclude-result-prefixes =
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.