Chapter 5 of the basic XSL tutorial

Source: Internet
Author: User
Tags xsl
The IFXSL condition can use an IF statement to filter information from XML documents. Where can I place the IF condition? now let's take a look at the XML document you have read multiple times: the reference content is as follows :? Xmlversion = 1.0? CATALOGCDTITLEEmpireBurlesque/TITLEA

XSL condition IF

XSL can use an IF statement to filter information from XML documents.

Where to place the IF condition

Now let's take a look at the XML documents that you have read multiple times:
  
Reference content is as follows:
    
  
    
  
    
  
       Empire Burlesque
  
Bob Dylan
  
       USA
  
       Columbia
  
       10.90
  
       1985
  
    
  
.
  
.
  
.
  
To place a conditional test if command for file content, you only need to add an XSL: if element to the xsl document, as shown below:
  
Reference content is as follows:
    
  
... Some output...
  
    
  
Now let's take a look at the slightly adjusted XSL style sheet:
  
Reference content is as follows:
    
  
    
  
    
  
    
  
    
  
      












  
      
  
      











                                                                                                                     
TitleArtist

  
    
  
    
  
    
  
    
  
Convert in a browser

The following is the simple code needed to convert an XML file into HTML in a browser:
  
Reference content is as follows:
    
  
    
  
    

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.