Got it with "distinct-values" :) { let $a := doc("http://www.bn.com/bib.xml")//author for $last in distinct-values($a/last), $first in distinct-values($a[last=$last]/first) return {$last}{$first} }
DIMPLE_R
Posts
-
XQuery : Filter out duplicates [modified] -
XQuery : Filter out duplicates [modified]I have an XML file which stores information of authors and books written by them. The following XQuery returns me a list of authors:- { for $b in doc("http://www.bn.com/bib.xml")//author return } However the resultset returned is:- - (since there could be more than 1 book written by an author) How do I change the above query to filter out duplicates? I saw a few sites which suggested using 'intersect'.I also came across the distinct-values function But I do not know how to use it in this example. Pls suggest:~ -- modified at 7:47 Thursday 13th July, 2006
-
write the xml contents into text box [modified]Try this in your code-behind file: string strPath = "xmlFolder/MyXMLFile.xml"; StreamReader objSR = new StreamReader(Server.MapPath(strPath), Encoding.Default); string strSRcontent = objSR.ReadToEnd(); Textbox1.Text = strSRcontent; --Dimple
-
Line Control in vb.netDon't know if its the right way of doing it but you can try this;) Take a panel control set the height to 1 set backcolor to black Try it out :)
-
Generating HTML FROM XML FileHi, Refer to the following example and see if it helps with your code: Myxml.xml:- 8 Wily Widgets 9 Willy Wonka Myxsl.xsl:-
Create the above 2 files and view the Myxml.xml in the browser ...See if this example helps you with your problem --Dimple -- modified at 4:49 Thursday 6th July, 2006
-
catching return value from javascript function in asp.net code behindYou can try something like this: Javascript Code: function confirmdissociation () { //alert("In Code"); if (confirm("Are you sure to perform this action?")==true) { document.getElementById("TextBox1").innerText ="true"; return true; } else { document.getElementById("TextBox1").innerText ="false"; return false; } } In Code Behind: private void Page_Load(object sender, System.EventArgs e) { Button1.Attributes.Add("onclick", "confirmdissociation();"); } --Dimple
-
TreeView in javascripting.See if this helps http://www.codeproject.com/jscript/tree\_view.asp
-
How to use textbox value in sql statementHi.. The part of the SQL statement that you've sent seems correct...You need to get a specific error to understand what exactly is going wrong.. You can do one thing, use Try-Catch to handle the exception. Try //code Catch ex as OleDbException' MessageBox.Show(ex.Message) End Try
-
Line Control in vb.netUse "Horizontal Rule" from the HTML section from your toolbox :) or just insert an HR tag in your HTML code as follows
-- modified at 3:10 Thursday 6th July, 2006
-
Shedding Light on Stored Procedures -
How to use textbox value in sql statementWhat's the error that you are getting? -- modified at 2:52 Thursday 6th July, 2006
-
how to use Find mothod of DataView object in C#?Finds a row in the DataView by the specified sort key value. You may want to refer to: http://www.akadia.com/services/dotnet\_find\_methods.html
-
How to Make text box to aceept numeric values only?Use client-side code to validate the data entered..a javascript function will work fine... Refer to: http://www.shiningstar.net/articles/articles/javascript/checkNumeric.asp?ID=AW
-
Generating a Typed DataSet from an XSD-file in VS 2005 -
how to display a gif image in vb.net and vb?Select the imageurl property of an image control and go. It even animates in the designer. :) Also refer to http://www.a1vbcode.com/vbtip.asp?ID=6 --Dimple
-
How to send values from one page to another asp.netThere are various ways..Through Session objects,Query Strings ..All depends on your requirement Check this : http://msdn2.microsoft.com/en-us/library/50x35554.aspx
-
getting next row data into focusHi Glen, You may want to check this link http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkwalkthroughdisplayingdatainwindowsformusingparameterizedquery.asp Hope it helps --Dimple
-
Playing video files with in a .aspx page -
Datagrid item count while paging........Why can't you just derive the number of rows from the returned dataset? something like: ds.Tables(0).Rows.Count
-
java script problemhi, I'm not sure what you are trying to do..and i think there may be a problem with your syntax: I tried something similar as follows: function check() { var al=new Array(); al[0]=1; al[1]=2; for(var j=0;j<=3;j++) { //alert(window.document.Form1.Text3.value); alert(al[j]); if(window.document.Form1.Text3.value==al[j]) { //alert("in"); return true; } else { alert("else"); //return false; } } }