Hi

Need some suggestion to build UI from Facet

I want to restructure my Facet UI code, just want to make sure I am taking 
right approach

Search:search will give result + facet result

I have a XML which contains all meta data of facet. XML file name is Taxonomy

This algorithm I am planning to follow


let $result:=search:search('policy', $config:OPTIONS, 
1)/search:facet/search:facet-value

                                for $taxonomyItem in 
fn:doc($TAX_DOC)/taxonomy/taxonomyItem
<div><B> $taxonomyItem/@name </B>
<UL>
                                                                                
for $level1 in $taxonomyItem/level1
                                                                                
                if($result/@name eq $level1/@name) then (: compare result facet 
value text and XML file value TEXT:)
                                                                                
                <LI> $level1/@name   {xdmp:quote($result[@name eq 
$level1/@name]/@count)} (:Showing Facet value and count:)
                                                                                
                                if (fn:exists($level1/level2)) then
<UL>
                                                                                
                                                for $level2 in $level1/level2
                                                                                
                                                                
if($result/@name eq $level2/@name) then
                                                                                
                                                                
<LI>$level2/@name  {xdmp:quote($result[@name eq $level2/@name]/@count)}    
</LI> els()
</UL> else()
</LI>
</UL>
</DIV>


________________________________

NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or 
views contained herein are not intended to be, and do not constitute, advice 
within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and 
Consumer Protection Act. If you have received this communication in error, 
please destroy all electronic and paper copies and notify the sender 
immediately. Mistransmission is not intended to waive confidentiality or 
privilege. Morgan Stanley reserves the right, to the extent permitted under 
applicable law, to monitor electronic communications. This message is subject 
to terms available at the following link: 
http://www.morganstanley.com/disclaimers If you cannot access these links, 
please notify us by reply message and we will send the contents to you. By 
messaging with Morgan Stanley you consent to the foregoing.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to