After installing. net2.0, start IIS and enter the URL 'HTTP: // localhost/test. aspx 'in the browser. The following error message is displayed:
The XML page cannot be displayed.XML input cannot be viewed using the XSL style sheet. Correct the error and click Refresh or try again later.--------------------------------------------------------------------------------
The name must start with an invalid character. An error occurred while processing th
to access an XML file using the DOM, you must link the XML file to an HTML Web page.
Sample code
1. Test.xml
2. test.xsl
The key lies in the use of namespaces xmlns:xsl= "Http://www.w3.org/1999/XSL/Transform" and output plus disable-output-escaping= "yes"
What is XPath
XPath (extensible path) is the result of providing a common syntax and semantics for the shared functionality of XSL transformations [XSLT] and XPointer [XPointer]. The main purpose of XPath is to address XML document components. While supporting this primary purpose, it also provides a basic tool for string, digital, and Boolean operations. XPath uses concise, non-XML syntax to manipulate the abstract, logical structure of an XML docume
A small program that used python to process XML transformations a few days ago to convert xml,xsl into HTML.
With the LIBXML2, so you have to install the LIBXML2 module before you can use it.
#-*-Coding:mbcs-*-#!/usr/bin/python import libxml2, Libxslt class Compoundxml:def __init__ (self): self.
_result = None Self._xsl = None Self._xml = None def do (self, xml_file_name, xsl_file_name): Self._xml = Libxml2.parsefile (xml_file_name) if s
Declares a decimal format used to control the format pattern interpretation used by the Formate-number function
Xsl:element
Create an element of the specified name in the output
Xsl:fallback
To invoke a template that provides the appropriate alternative behavior for the behavior of new elements encountered
Xsl:for-each
Apply templates repeatedly to each node in the contact set
Xsl:if
Allow simple conditional template fragments
This issue introduces multiple XSL methods and attributes for VBScript, JScript, to give full play to the XML advantages for
First, Absolutechildnumber
Meaning: Returns the ordinal number of a node relative to all its siblings (regardless of the name)
Syntax: Absolutechildnumber (node)
Parameters: node── object, to return the number of nodes.
Example:
1. Assume that the document structure is:
Absolutechildnumber (This.selectnodes ("/document
1. Remember first that the variable variable is only assigned once in the XSL, and it cannot be changed again. So how to call the variable, do not know draft experts are what to eat rice.
2. The so-called global, because the xsl:variable element is the xsl:stylesheet of the child, so the variables defined in stylesheet can be referenced throughout the instance space............ Is valid in the instance space3. Reference method1. Methods of $vairableNa
xml| style Sheet
Unable to display XML page.XML input cannot be viewed using an XSL style sheet. Please correct the error and click the Refresh button, or try again later.
--------------------------------------------------------------------------------
The name begins with an invalid character. Error processing resource ' http://localhost/Asp.net/Default.aspx '. 1th Line, Location: 2
-^
===================
Workaround: Run the vs2005 command line
display the document like HTML? The answer is in the negative. Take your resume as an example, you need to create a separate format file that describes how each tag is displayed, as follows (assuming the file name is Resume.css):
resume{Display:block;}name{display:block; font-size:120%;}sex{display:block; Text-indent:2em}birthday{display:block; Text-indent:2em}skill{display:block; Text-indent:2em}
Description
All of the above are CSS style, we recommend that readers refer to the relevant inf
Precautions:
※ This article code may have some superfluous parts not removed, please ignore when reading.
Some of the externally included files are not posted here.
※ Small B Write XSL also soon, many statements will not be used, some places to write more wordy,
If you have a better paging code, please talk to them more.
※ Apply to: Use ASP load to enter the XML code, then use this XSL file for paging proce
? The answer is in the negative. Take your resume as an example, you need to create a separate format file that describes how each tag is displayed, as follows (assuming the file name is Resume.css):
resume{Display:block;}name{display:block; font-size:120%;}sex{display:block; Text-indent:2em}birthday{display:block; Text-indent:2em}skill{display:block; Text-indent:2em}
Description
All of the above are CSS style, we recommend that readers refer to the relevant information familiar with CSS, in
One of the advantages of XML technology is the selectivity of data output, that is, to select the required data output. The selection pattern statement:
If in XSL, first, introduce the syntax structure of the XSL element
Grammar:
Property:
expr── a script language expression that evaluates to True or false, and if the result is true, and the content is displayed in the output (this property can be om
Enter the URL in the browser: ' http://localhost/test.aspx ' The following error message appears:The XML page could not be displayed.XML input cannot be viewed using XSL style sheets. Please correct the error and click the Refresh button, or try again later.--------------------------------------------------------------------------------The name begins with an invalid character. An error occurred while processing the resource ' http://localhost/test.as
To talk about these W3C languages or standards, they must all start with the HTML language. I am no exception, and because HTML is simple and easy to understand (of course, it is very difficult to extend it 10 years ago), for these Markup languages such as XML, I don't care too much. recently, there is a module in the project, which is a normal Web page capture. Then, we use XPath to analyze the HTML Script and save the required results in XML, in this way, the data and display are separated, an
Today's AjaxProgramThere is a small problem. I want to use XSL to display the returned XML, but there is always an error when I call the JS transformnode,Prompt "the required data is not ready"At that time, I thought that the readystate of requestobj (xhr object) was not completed yet, but before that, I had a judgment on readystate, so it was wrong.Locate in docstyle. After checking that the style file is correct, the doc has not loaded the data comp
Example
Code
1. Test. xml
Copy code The Code is as follows: Alt = "photograph of a flower, just for show"/> mauris Felis elit, varius
Quis, pulvinar Vel, sodales vehicula, mi. nunc elementum pharetra elit.
2. Test. XSLCopy codeThe Code is as follows:
The key is to use the namespace xmlns: XSL = "http://www.w3.org/1999/XSL/Transform" and add disable-output-escaping = "yes" to the output"
The most common problem with XML data is the case sensitivity of the data, which can cause headaches during data conversion. The following is a solution.
Assume that you have some data to be sent to another system. It also recognizes data in XML format and requires all data in uppercase. The example data is as follows:
Example 1: person. xml
Suppose you want to convert to the following format:
Example 2: newperson. xml
To solve this conversion problem, we usually use the
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.