Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListI made listboxes in the search form but no result in search I made listboxes in the search form but no result in search
Previous
 
Next
New Post
5/6/2009 12:25 AM
 

Dear Stefan

i studied xsl and at last did the listbox thing in the search form but the problem now

1) i want to put the values of them in consideration with the search engine im so confused in the code.

2)i want to connect the xsl file with a xml file which has the countries names but it gives this error

  XSL Tranformation failed. Switched back to Default Grid Table.
StyleSheet:/Portals/0/XslStyleSheets/BahaaTest.xsl
Error Description:XSLT compile error at file:///D:/Hosting/4088254/html/Portals/0/XslStyleSheets/BahaaTest.xsl(161,17). See InnerException for details.

here is my code:

 <xsl:template match="/Portals/0/XslStyleSheets/" name="Searchform">
    Country:
    <select name="Country"><option> Choose </option>

<xsl:for-each select="EnglishCountries/Country">
      <option> <xsl:value-of select="Name" /> </option>
      </xsl:for-each></select><br />
        Search by:
    <select name="SearchBy"><option>Company Name </option>

<option> Category  </option></select><br />
Search:
<input type="text" name="{$prefix_param}_searchPostback" value="{$search}" />
<input type="submit" name="go" value="{//udt:Context/udt:LocalizedString_Search}" />
<input type="hidden" name="{$prefix_param}_ispostback" value="true" /></xsl:template>

 

hope to hear from u soon
 

 
New Post
5/6/2009 5:02 AM
 

The only available XML for your XSL Transformation is the UDT data, you cannot include other XML files.
You are mixing  XPaths with file paths, that doesn't work.

I always suggest to test any handcrafted modifications offline, for example in VS2008 professional. Place the XML (Available though the module's module action  and your XSL as files into an empty solution. ou will have Intellisense and even debugging support.

 

 
New Post
5/6/2009 5:39 AM
 

Thanks for your reply ,the biggest problem for me is the search

  • I have a column called Country in which i enter my data & it is searchable.
  • I choose from the DropDownList the name of the country.

Now how i can use the value chosen from the user in my search.

Thanks for your patience

 
New Post
5/6/2009 9:26 AM
 

You need to feed the drop down list with the countries from your udt data. What you need is a way to iterate through your countries without adding some countries twice. The most common way doing that is called Munchian Grouping, and I always uses Jeni's excellent description as guide: http://www.jenitennison.com/xslt/grouping/muenchian.html

I copied the last code blog from here page and modified it to return a list of countries:

<xsl:key name="data-by-country" match="//udt:Data" use="udt:Country" />
<xsl:template name="CountryList">
	<xsl:for-each select="contact[count(. | key('data-by-country', udt:Country)[1]) = 1]">
		<xsl:sort select="udt:Country" />
		<xsl:value-of select="udt:Country" />,<br />
		
	</xsl:for-each>
</xsl:template>

You can also fill your list items that way.

 
New Post
5/7/2009 3:09 AM
 

Dear Stefan

Thanks for your reply , i tried your code but it seems i don't get something , as i am still getting used to xsl , so here is the code it gives an error if you please guide me through it. Your code in red .

 

  <xsl:template name="Searchform">
Country:
 <select name="CountryList">
<option>
<xsl:key name="data-by-country" match="//udt:Data" use="udt:Country" />
<xsl:template name="CountryList">
<xsl:for-each select="udt:Data[count(. | key('data-by-country', udt:Country)[1]) = 1]">
<xsl:sort select="udt:Country" />
<xsl:value-of select="udt:Country" />,<br />
</xsl:for-each></xsl:template>

</option>
</select><br />
Search:
<input type="text" name="{$prefix_param}_searchPostback" value="{$search}" />

<input type="submit" name="go" value="{//udt:Context/udt:LocalizedString_Search}" />

<input type="hidden" name="{$prefix_param}_ispostback" value="true" /></xsl:template>

 

Thanks i really appreciate your help

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListI made listboxes in the search form but no result in search I made listboxes in the search form but no result in search


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out