Subject: [xsl] Can someone explain why XSL script is not working? From: "Uslu, Cihan Y (MED)" <Cihan.Uslu@xxxxxxxxxx> Date: Tue, 31 Jul 2001 09:32:19 -0500 |
Hi, I have this XSL script to output a plain HTML page from the attached XML file. I also attached my not working output to the e-mail, If you could look at script and xml file and tell me what amI doing wrong I'd appreciate your help, many thanks in advance... I call it : http://localhost:81/my.xml?SectionNum=010 (Thanks to Kevin for his help ) xsl:This is my XSL script: ------------------------------- <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="SectionNum"/> <xsl:template match="/"> <xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction> <html> <head> <title><xsl:value-of select="Module/Task[@SectionNum = $SectionNum]/Title"/></title> </head> <body> <xsl:apply-templates select="Module/Task[@SectionNum = $SectionNum]"/> </body> </html> </xsl:template> <xsl:template match="/Module/Task"> <p> <b><xsl:value-of select="./Title"/></b></p> <p><xsl:value-of select='./Intro/para' /></p> <xsl:choose> <xsl:when test="count(./Step)>0"> <ol> <xsl:for-each select='./Step'> <li> <xsl:apply-templates select="guilabel | emphasis" /> </li> </xsl:for-each> </ol> </xsl:when> <xsl:when test="count(SubTask)>0" > <xsl:for-each select='SubTask' > <p><b><xsl:text> </xsl:text><xsl:value-of select='./title'/></b></p> <p><xsl:value-of select='./Intro' /></p> <ol> <xsl:for-each select='./Step' > <li> <xsl:apply-templates select="guilabel | emphasis" /> </li> </xsl:for-each> </ol> </xsl:for-each> </xsl:when> </xsl:choose> </xsl:template> XML:This is the XML file ----------------------------------- <?xml version="1.0"?> <Module ModuleNum="004"> <title> <para>Daily Maintenance</para> </title> <Intro> <para>These procedures provide the step-by-step instructions for performing the daily maintenance tasks of warming-up the tube and performing air (fast) calibrations. </para> </Intro> <Competency>Perform daily maintenance procedures.</Competency> <Task SectionNum="010"><Title>Tube Warm-Up</Title> <Intro> <para>For optimum performance and consistent image quality, perform a tube warm-up if your system has been inactive for two or more hours. The system will notify you at the two hour time limit with a warning dialog box. It is desirable to perform a tube warm-up procedure along with fast calibrations once per 24 hours.</para> </Intro> <Objective> Tube warm-up.</Objective> <Step> <QuickStep> <para>From the scan monitor, click <guilabel>[Daily Prep]</guilabel>.</para> </QuickStep> </Step> <Step> <QuickStep> <para>Click <guilabel>[Tube Warm-Up]</guilabel>.</para> </QuickStep> </Step> <Step> <QuickStep> <para> Click <guilabel>[Accept & Run Tube Warm-up]</guilabel> to proceed.</para> </QuickStep> </Step> <Step> <QuickStep> <para> Press <emphasis>Start Scan</emphasis>.</para> </QuickStep> </Step> <Step> <QuickStep> <para> Select <guilabel>Quit</guilabel> or proceed to Fast Calibrations.</para> </QuickStep> </Step> </Task> <Task SectionNum="020"><Title>Air Calibrations</Title> <Intro> <para>Air calibrations, also called Fast Cals, must be performed following a tube warm-up procedure. These calibrations ensure consistent image quality and radiation exposure.</para> </Intro> <Objective>Perform Air Calibrations.</Objective> <Step> <QuickStep> <para>After completing the tube warm-up, click <guilabel>[Fast Cals]</guilabel>.</para> </QuickStep> </Step> <Step> <QuickStep> <para>Press <emphasis>Start Scan</emphasis>.</para> </QuickStep> </Step> <Step> <QuickStep> <para>Click <guilabel>[Quit]</guilabel>.</para> </QuickStep> </Step> </Task> </Module> Output: I am getting this list from my XSL script process, but I dont want to have 1 , 2 and 3 not to show up..I just want my <Step> tags and their content to show up after Title and Intro/para.How Can I do that? thanks for your help... ------------------------------------------------------------ Tube Warm-Up For optimum performance and consistent image quality, perform a tube warm-up if your system has been inactive for two or more hours. The system will notify you at the two hour time limit with a warning dialog box. It is desirable to perform a tube warm-up procedure along with fast calibrations once per 24 hours. 1. 2.For optimum performance and consistent image quality, perform a tube warm-up if your system has been inactive for two or more hours. The system will notify you at the two hour time limit with a warning dialog box. It is desirable to perform a tube warm-up procedure along with fast calibrations once per 24 hours. 3. 4.From the scan monitor, click [[Daily Prep]]. 5.Click [[Tube Warm-Up]]. 6.Click [[Accept & Run Tube Warm-up]] to proceed. 7.Press Start Scan. 8.Select [Quit] or proceed to Fast Calibrations. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Interpretting XSL..., Mulberry Technologie | Thread | [xsl] Copying into additional attri, john smith |
Re: [xsl] XSL output method="text" , selva | Date | RE: [xsl] possible value-of return , alex reuter |
Month |