Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 22nd, 2011, 06:16 AM
Registered User
 
Join Date: Jul 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSL-Dynamic Drop Down

Hi Mike and others,

I am a newbie, trying to create a webbased User Guide.
I am trying to make it interactive by making the user click on a drop down and read/learn of a command(s) and the options available with the command.

For Example:
User selects a command from a drop down a table appears below the drop down and shows some info about the command.

My issue is, when it comes to commands with subcommands.
I have a Directory structure for a Particular command as follows
----------------------------------- drive:\\mysxml_proj\objectgroup\testappsobjgroups. ditamap
The ditamap file will be renamed to xsl before publishing the webpage.

drive:\mysxml_proj\objectgroup\concept\intro.html and MainCommand.html

drive:\mysxml_proj\objectgroup\reference\MainComma ndAgentCommunity.xml and MainCommandAgentEnable.xml

where MainCommandAgentCommunit and MainCommandAgentEnable are subcommands.

-----------------------------------
So MainCommand will be part of a Dropdown, when user selects it and the command has subcommands, a new drop down will appear and if the user chooses subcommand 1 then he see the table below update accordingly.

How can I dynamically create Drop downs? I see the following page has something similar but its done with umbraco.

http://www.atagverwarming.nl/home.aspx


Please suggest.

Content of my xmls

Main Command:
-----------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
"http://docs.oasis-open.org/dita/dtd/concept.dtd">
<concept id="MainCommand">
<title>MainCommand</title>

<conbody>
<p>This group contains parameters to configure the Protocol agent and trap
capabilities of BOARD. One instance of the group is allowed.</p>

<p>The BOARD Protocol agent supports the standard Stuff.</p>

<note>For BOARD, use this object with the config or getconfig
subcommands.</note>
</conbody>
</concept>
----------------------------------
Subcommand1:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
"http://docs.oasis-open.org/dita/dtd/reference.dtd">
<reference id="referencetopic">
<title>MainCommandAgentCommunity (Read/Write)</title>

<refbody>
<section><table>
<tgroup cols="2">
<tbody>
<row>
<entry><b>Description</b></entry>

<entry>Specifies the Protocol Community Name (identical to community
string) used for Protocol traps. The community string acts as a
password shared between different hosts over the network. This
community string value must match with that of the other hosts
for any kind of communication through Protocol.</entry>
</row>

<row>
<entry><b>Legal Values</b></entry>

<entry>A string of up to 31 characters.</entry>
</row>

<row>
<entry><b>Default</b></entry>

<entry>public</entry>
</row>

<row>
<entry><b>Example</b></entry>

<entry>This is an example.</entry>
</row>
</tbody>
</tgroup>
</table></section>
</refbody>
</reference>
------------------------------------------
Subcommand 2:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
"http://docs.oasis-open.org/dita/dtd/reference.dtd">
<reference id="referencetopic">
<title>MainCommandAgentEnable (Read/Write)</title>

<refbody>
<section><table>
<tgroup cols="2">
<tbody>
<row>
<entry><b>Description</b></entry>

<entry>Enables or disables the Protocol agent in BOARD or
BOARD.</entry>
</row>

<row>
<entry><b>Legal Values</b></entry>

<entry><ul>
<li>1 (TRUE)</li>

<li>0 (FALSE)</li>
</ul></entry>
</row>

<row>
<entry><b>Default</b></entry>

<entry>public</entry>
</row>

<row>
<entry><b>Example</b></entry>

<entry>NA</entry>
</row>
</tbody>
</tgroup>
</table></section>
</refbody>
</reference>
------------------------------------

-Ranga
 
Old July 26th, 2011, 04:11 AM
Registered User
 
Join Date: Jul 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

56 views and no replies.
Whats this Forum for?
 
Old July 26th, 2011, 04:51 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

This forum is to help people with XSLT.

You haven't posted any XSLT, nor have you posted any expected output.

From what you have posted I can't tell how the MainCommand and its sub commands are linked - is this purely based on filename (i.e. MainCommand.xml + MainCommandXXX.cml for sub commands?)

What XSLT processor are you using? Are you using XSLT 1.0 or 2.0?

Also, you just say "dynamic drop down". WTF? Are you talking ASPX, JSP, pure HTML, or maybe even a Winforms application? If you want HTML then surely some form of javascript would be involved perhaps?

We are not here to make these decisions for you, so you tell us what you want and we will try to help you get from your input to your expected output.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 
Old July 26th, 2011, 05:03 AM
Registered User
 
Join Date: Jul 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

"This forum is to help people with XSLT" - Thats where I posted and thats what I wanted to use. Thanks for the Commonsense check.

""Also, you just say "dynamic drop down". WTF?"
My Post's subject says - XSL-Dynamic Dropdown doesn't it.... So WTF?

MainCommand-Subcommand relation as far as xsl-xml are concerned is purely based on filename

"MainCommand will be part of a Dropdown, when user selects it and the command has subcommands (my folder structure description shows that there are subcommands), a new dynamic drop down should appear and if the user chooses subcommand 1 then he/she sees the table below update accordingly.
 
Old July 26th, 2011, 05:15 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

There is no such thing as an XSLT Dynamic Drop Down, so I don't know what you mean.

If you want user interaction when they select the initial drop down then you would need to use some javascript or something to show or hide the second drop down, or call some server code to check to see if another drop down is required and what values it should have. This is the bit that we have no idea what you want to do, nor is this forum the right place for you to find the answer if you don't know how to do this already.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with dynamic drop down lists MarkGT Classic ASP Basics 3 April 29th, 2008 06:05 PM
Dynamic drop down list bart.moons Classic ASP Databases 9 January 25th, 2005 10:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.