View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/

Update of /cvsroot/dqsd/dqsdweb
In directory usw-pr-cvs1:/tmp/cvs-serv27238

Added Files:
        faq.xml faq.css faq.xsl 
Log Message:
First hack at an XML FAQ

--- NEW FILE: faq.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="faq.xsl"?>
<faqs>

        <category name="General">
                <faq>
                        <question>Can I assign a hotkey to it so I don't need to mouse 
to it?</question>
                        <answer>This feature was added in version 3.0.</answer>
                </faq>
                <faq>
                        <question>Why doesn't the DEL or the ctrl-insert key 
work?</question>
                        <answer>This feature was added in version 3.0.</answer>
                </faq>
        </category>

        <category name="Installation">
                <faq>
                        <question>I've installed it, but I want to uninstall it, and I 
can't figure out how! Help!</question>
                        <answer>Right-click on the shoe to the left and choose 'Close 
Toolbar'. Then find the uninstaller under the control panel. Some people find the 
control panel entry, but they don't know they need to close DQSD before uninstalling. 
</answer>
                </faq>
        </category>

</faqs>

--- NEW FILE: faq.css ---
BODY, P, TD, DIV {
         font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
         font-size: x-small;
}

.category {
        font-weight: bold;
        font-size: 110%;
        margin-top: 1em;
        color: #000080;
}

.question {
        font-weight: bold;
        margin-left: 2em;
        margin-top: 0.2em;
}

.answer {
        font-weight: normal;
/*      text-indent : 5em; */
        margin-left: 3em;
}

.toggle {
        width: 1em;
        text-align: center;
        text-decoration: none;
}
--- NEW FILE: faq.xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
        <xsl:template match="/">
                <HTML>
                        <HEAD>
                                <TITLE>Dave's Quick Search DeskBar FAQ</TITLE>
                                <LINK REL="stylesheet" TYPE="text/css" HREF="faq.css" 
/>
                                <script>
                                        <xsl:comment>
                                        function toggleVisible()
                                        {
                                                var answer = 
event.srcElement.parentElement.parentElement.all['answer'];
                                                var toggle = 
event.srcElement.parentElement.all['toggle'];
                                                if ( answer )
                                                {
                                                        answer.style.display = ( 
answer.style.display == "none" ? "block" : "none" );
                                                        toggle.innerText = ( 
answer.style.display == "none" ? "+" : "-" );
                                                }
                                        }
                                        </xsl:comment>
                                </script>
                        </HEAD>
                        <BODY>
                                <xsl:apply-templates select="/faqs/category"/>
       </BODY>
                </HTML>
        </xsl:template>
        
        <xsl:template match="category">
                <div class="category">
                        <xsl:value-of select="@name"/>
                </div>
                <xsl:apply-templates select="faq"/>
        </xsl:template>
        
        <xsl:template match="faq">
                <div class="faq">
                        <div class="question">
                                <a href="#" class="toggle" id="toggle" 
onclick="toggleVisible();">+</a><xsl:value-of select="question"/>
                        </div>
                        <div id="answer" class="answer" style="display: none">
                                <xsl:value-of select="answer"/>
                        </div>
                </div>
        </xsl:template>

</xsl:stylesheet>




-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/

Reply via email to