Hi,
Using TS 6.5 on Solaris
Using XML Parser, I need to read the replicant <item> <values> of the DCR. my req is i need to populate a list based on the value in the replicant items in DCR
Can anyone let me know how to read this in the wft file
use TeamSite::Config;
use TeamSite:

irwalk;
use Fidelity::Log;
use Fidelity::Utils;
use XML::XQL;
use XML::XQL:

OM;
use TeamSite:

CRparser;
use TeamSite:

CRnode;
$parser = new XML:

OM:

arser;
$doc = $parser->parsefile ("/iwmnt/default/main/www/wdp/uk/dev/WORKAREA/content/templatedata/Config/Microsite/data/microsites.xml") or die "Cannot parse microsites";
$microsite_read_html = microsite_read();
sub microsite_read
{
$selectHTML = "<select style=\"width: 50%;\">";
@micrositeTitles = $doc->xql ("microsites/Microsite/value/ShortName/\
@value");
foreach $title (
@micrositeTitles) {
$title = $title->xql_toString;
$selectHTML .= "<option value=\"$title\">$title</option>";
}
$selectHTML .= "</select>";
return $selectHTML;
}
TAG_info(
config_files=>[
html=>"$microsite_read_html",
is_required=>'true',
label=>'Select source microsite',
error_msg=>'Please select a microsite from the list',
],
);
CGI_info();
]]></template_script>
The DCR is looks like the following....
<?xml version="1.0" encoding="UTF-8"?>
<record name="microsites" type="content">
<item name="Microsite">
<value>
<item name="ShortName">
<value>abbey</value>
</item>
and the DCT is
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE datacapture SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content" name="microsites">
<ruleset name="Microsites">
<container name="Microsite" min="1" max="100">
<item name="ShortName">
<label>Short Name</label>
<text size="20" maxlength="20" required="t" validation-regex="^[a-z0-9]{2,20}$" ></text>
</item>
Thanks in adv....
RG