[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Can someone explain why XSL script is not working?

Subject: 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
tube warm up
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 &amp; 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.