XML parameters and conditions

S

Shaldaman

I have an XML document with the following layout:

<committees>

<committee>
<title>COMMITTEE 1</title>

<member>
<name>Person A</name>
<org>Organization A</org>
<address>Address A</address>
<phone>Telephone: (123) 456-7890</phone>
<fax>Fax: 123) 456-7890</fax>
<email>E-mail:[email protected]</email>
</member>

<member>
<name>Person B</name>
<org>Organization B</org>
<address>Address B</address>
<phone>Telephone: (123) 456-7890</phone>
<fax>Fax: 123) 456-7890</fax>
<email>E-mail:[email protected]</email>
</member>
</committee>

<committee>
<title>COMMITTEE 2</title>

<member>
<name>Person C</name>
<org>Organization C</org>
<address>Address C</address>
<phone>Telephone: (123) 456-7890</phone>
<fax>Fax: 123) 456-7890</fax>
<email>E-mail:[email protected]</email>
</member>

<member>
<name>Person D</name>
<org>Organization D</org>
<address>Address D</address>
<phone>Telephone: (123) 456-7890</phone>
<fax>Fax: 123) 456-7890</fax>
<email>E-mail:[email protected]</email>
</member>
</committee>

</committees>

The root node is <committees>. There are currently 2 <committee> nodes
under this. In each committee, there are members.

In my XSL file, I have written for-each statements to display each
committee with its respective members. I have 2 problems I need help
with:

1. These committees should all not show up at once. There are
supposed to be links on an ASP page that when the user clicks on one
of the committee's links, the XML page will only display that
committee and not the entire list in the XML page. How do i do that?
2. This is related to the previous question. My XML file is going to
be dynamic - a user can add committees and members. This would append
the data to the XML file. Is there a way to generate like an ID or
something to associate with each new committee? If we had something
like that, clicking on the link would pass the corresponding ID to the
XML file to pull up only that specific committee's details.

Thanks for any help you can provide on this...
 
J

Joseph Kesselman

Shaldaman said:
1. These committees should all not show up at once. There are
supposed to be links on an ASP page that when the user clicks on one
of the committee's links, the XML page will only display that
committee and not the entire list in the XML page. How do i do that?

Depending on the framework you're using, you may be able to make the ASP
layer call XSLT with different stylesheet parameters. See the XSLT spec
for info about how to declare stylesheet parameters; once declared, they
behave like stylesheet variables whose value is set from outsite.
2. This is related to the previous question. My XML file is going to
be dynamic - a user can add committees and members. This would append
the data to the XML file. Is there a way to generate like an ID or
something to associate with each new committee?

Sure, in your application code that is editing the XML. There's nothing
built into XML or the standard XML APIs which will help you with
generating those unique values.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top