Creating a new query from refinement attribute values

Once refinement values have been retrieved, these values typically are used to create additional refinement navigation queries.

First, consider this request in which the WineType refinement is requested and exposed:
<Request xmlns="http://www.endeca.com/MDEX/conversation/1/0">
 <State/>
 <ContentElementConfig xsi:type="NavigationMenuConfig"
  Id="NavigationMenu"
  HandlerFunction="NavigationMenuHandler"
  HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <RefinementGroupConfig Name="Wine Characteristics" Expose="true">   
    <RefinementConfig Name="WineType" Expose="true"/>
   </RefinementGroupConfig>
  </ContentElementConfig>
</Request>
It returns the following query results. Notice that the query results show the WineType refinement and the refinement values on it — White and Sparkling.
<cs:Results xmlns:cs="http://www.endeca.com/MDEX/conversation/1/0" 
xmlns:mdex="http://www.endeca.com/MDEX/XQuery/2009/09">
 <cs:Request>
  <State xmlns="http://www.endeca.com/MDEX/conversation/1/0">
  <ContentElementConfig xsi:type="NavigationMenuConfig" 
Id="NavigationMenu" 
HandlerFunction="NavigationMenuHandler" 
HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" 
xmlns="http://www.endeca.com/MDEX/conversation/1/0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <RefinementGroupConfig Name="Wine Characteristics" Expose="true">     
    <RefinementConfig Name="WineType" Expose="true" 
xmlns:ns="http://www.endeca.com/MDEX/conversation/1/0">
   </RefinementGroupConfig>  
  </ContentElementConfig>
  </cs:Request>
  <cs:ContentElement xsi:type="cs:NavigationMenu" Id="NavigationMenu" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <cs:NavigationMenuItemGroup Name="Wine Characteristics" 
  HasRefinablePRoperties="true">
    <cs:NavigationMenuItem Name="WineType" DisplayName="WineType" 
     MultiSelect="Or" HasMore="false">
        <cs:ExposureControl Exposed="true">
          <cs:Operator OwnerId="NavigationMenu" 
          xsi:type="cs:RefinementHideOperator" 
              Name="WineType"
              Spec="/" 
              Group="Wine Characteristics"/>
         </cs:ExposureControl>
         <cs:Refinement Name="WineType" Spec="/Red" Label="Red" 
          Count="18">
          <cs:Operator xsi:type="cs:RefinementOperator" 
          Name="WineType" Spec="/Red"/>
         </cs:Refinement>
         <cs:Refinement Name="WineType" Spec="/White" Label="White" 
          Count="40">
          <cs:Operator xsi:type="cs:RefinementOperator" 
          Name="WineType" Spec="/Red"/>
         </cs:Refinement>
         <cs:Refinement Name="WineType" Spec="/Sparkling" 
         Label="Sparkling" Count="50">
          <cs:Operator xsi:type="cs:RefinementOperator" 
          Name="WineType" Spec="/Red"/>
         </cs:Refinement>
      <cs:RootDimensionValue DimensionName="WineType" Spec="/"/>
    </cs:NavigationMenuItem>
   </cs:NavigationMenuItemGroup>
  </cs:ContentElement>
</cs:Results>
Based on this result, a follow-on request creates an additional refinement navigation query. It uses the refinement operator to request Red, to let you further refine to WineType Red.
<Request xmlns="http://www.endeca.com/MDEX/conversation/1/0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <State/>
  <ContentElementConfig xsi:type="NavigationMenuConfig" 
Id="NavigationMenu" 
HandlerFunction="NavigationMenuHandler" 
HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0">
    <RefinementGroupConfig Name="Wine Characteristics" Expose="true">
     <RefinementConfig Name="WineType" Expose="true"/>
    </RefinementGroupConfig>
   </ContentElementConfig>
  <Operator xsi:type="RefinementOperator" Name="WineType" Spec="/Red"/>
</Request>