xsl-list
[Top] [All Lists]

RE: [xsl] Example to checkbox in XSL

2007-08-06 15:08:20
Thanks Mike,
So when I right click on the page and view source I have seen this XML
text as below:
        ?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="/vsconsole/xsl/AMTestVoIP.xsl"?>
<AUTOMON_TEST>
                <ACTION>EDIT</ACTION>
                <TESTID>1</TESTID>
                <SUITEID>1</SUITEID>

So I didn't see how to view/generate the html file on this page.
-Thanks,
Jp
-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com] 
Sent: Monday, August 06, 2007 1:44 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Example to checkbox in XSL

An XSLT stylesheet typically takes XML as input and HTML as output. The
browser takes the HTML as input and produces a particular effect on the
screen. So if you want to produce a particular effect on the screen, you
first have to work out what HTML will create this effect, and then you
have
to work out how to create this HTML from your XML (by using XSLT).

XSLT is a programming language, and as with any program, you shouldn't
start
coding until you know (at least in outline) what output you want it to
produce, which in this case means the HTML.

You can't automatically generate the XSLT from the HTML - but in simple
cases, having done an HTML mockup of your page, you can ask yourself
"which
fields in the HTML depend on which fields in the source XML", and then
you
can work backwards by replacing parts of the HTML with bits of XSLT
code,
for example changing

<tr><td>green</td><td>230</td></tr>

to

<xsl:template match="product">
  <tr>
    <td><xsl:value-of select="color"/></td>
    <td><xsl:value-of select="height"/></td>
  </tr>
</xsl:template>

- something I call "fill-in-the-blanks" coding, and which accounts for
the
name "template".

Of course once you get the hang of this you won't usually need to write
the
HTML down first - but it's important to have it clearly in your head as
your
code your XSLT. Certainly the design approach of working backwards from
your
output (rather than forwards from your input) is important when working
with
XSLT, because if ever there's a structure clash between the input and
the
output, your XSLT code will need to follow the output structure rather
than
the input.

Michael Kay
http://www.saxonica.com/
 

-----Original Message-----
From: Pham, Joanne (Joanne) [mailto:jpham(_at_)alcatel-lucent(_dot_)com] 
Sent: 06 August 2007 21:08
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Example to checkbox in XSL

Thanks Mike,
I am very new to XSLT world. So we can convert to XSL from 
HTML. If I have the HTML file I can generate the XSL using 
HTML file? Could you please provide more detail how to 
convert the HTML to xsl.
Thanks a ton,
JP

-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com]
Sent: Monday, August 06, 2007 12:35 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Example to checkbox in XSL


Are you asking what the HTML should look like to achieve this 
appearance
on
the screen, or are you asking how to generate this HTML using XSLT?
Don't
start to think about the XSLT coding until you know what HTML you want
your
stylesheet to generate. Ideally, write the HTML "by hand" 
first. If you
need
help writing HTML, then someone here might advise you, but it's
off-topic
for this list.

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Pham, Joanne (Joanne) [mailto:jpham(_at_)alcatel-lucent(_dot_)com] 
Sent: 06 August 2007 20:28
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Cc: Pham, Joanne (Joanne)
Subject: [xsl] Example to checkbox in XSL


Hi All,
I would like to have an example how to hide the text fields 
in xsl. For example I have the following GUI

            Application
                        <Radio Checkbox> User following dial 
connection
                                    User name
                                    Password
                                    Domainname
                                    .....


                        <Radio checkbox> Use a default connection

In this case I would like to have all  field Username, 
Password, DomainName are hidden unless the < Radio Checkbox> 
User following dial connection is check So in the GUI it only shows
            
                        Application
                        <Radio Checkbox> User following dial 
connection
                        <Radio checkbox> Use a default 
connection When the <Radio Checkbox> User following dial 
connection is check the field Username, Password, DomainName 
are showing on GUI but not otherwise.
Thanks,
JP



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--