Sponsored Content
Top Forums Programming [Xquery] How to do a increment in a For loop Post 302581315 by m.d.ludwig on Monday 12th of December 2011 08:42:48 PM
Old 12-12-2011
I do apologize, I skipped right over the 'XQuery' requirement.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Increment date in 'for' loop?

Hi Guys, My first post..:) Right...I want to move existing files (with some date in their name) currently in $mainftp, to $mainfolder/$foldate/system1. I'd like to be able to increment date in the for loop? Is this possible or should I use a different technique. The script return the... (4 Replies)
Discussion started by: SunnyK
4 Replies

2. Shell Programming and Scripting

the given code goes in infinite loop and does not increment variable i

code is as #!/bin/sh i=1; while do welcome $i times; i='expr $i+1'; done exit 0; (6 Replies)
Discussion started by: mrityunjay22
6 Replies

3. Shell Programming and Scripting

Increment nested for loop parllely

Hi , I am trying to increment the nested for loops parellely,but i cant ,i used continue 2 but the second loop not getting increment. no1="1 6 5 4 8" no2="4 7 8 0 1" for var1 in $no1 ; do for var2 in $no2 ; do line1 line 2 line 3 continue 2 done done Please help on this (4 Replies)
Discussion started by: nmahendran
4 Replies

4. Programming

[XQuery] How to Convert from JSON Message to XML Message with XQuery

Hi guys, I'm in a job of converting a restful webservice to soap. Tool for convertation uses XQuery. Now i need to convert a message like this: { "firstName": "John", "midName": null, "lastName": "Smith", "married": false, "address": { "streetAddress": "21 2nd... (5 Replies)
Discussion started by: tien86
5 Replies

5. Shell Programming and Scripting

For/While Loop to Increment Filenames in a Script

Daily stupid question. I want to increment the file name everytime the script is run. So for example if the filename is manager.log and I run the script, I want the next sequence to be manager.log1. So to be clear I only want it to increment when the script is executed. So ./script... (10 Replies)
Discussion started by: metallica1973
10 Replies

6. Shell Programming and Scripting

How to increment date using "for loop" in format MMDDYY inside the shell script?

Need to increment the date from "currentdate + 90days" inside the for loop (i=1 to i=50) (5 Replies)
Discussion started by: aroragaurav.84
5 Replies

7. Shell Programming and Scripting

[Solved] How to increment and add variable length numbers to a variable in a loop?

Hi All, I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies

8. Shell Programming and Scripting

Find and increment at each occurence of string (loop)

I created script (sh shell) to generate vlc playlist based on some data files. All works fine so far except one string I do not know how to handle with. VLCSTART='<vlc:id>' VLCV=0 VLCEND='</vlc:id>' echo -e $'\n'$'\t'$'\t'$'\t'$'\t'\$VLCSTART$VLCV$VLCENDOutput file contains several occurences... (10 Replies)
Discussion started by: TiedCone
10 Replies

9. Windows & DOS: Issues & Discussions

Batch file loop and increment value for condition

I am trying to have the below batch file do following two things: 1. only allow the values YES,yes,Y,y, or NO,no,N,n 2. increment the counter %var1 only if answer to question 2 is "y" and not able to get the syntax correct. If %var1%=1 then I am trying to display function :end. Thank you :).... (0 Replies)
Discussion started by: cmccabe
0 Replies

10. Shell Programming and Scripting

Parallel increment of nested for loop

Hi, I am using solaris 5.10 environment and need help on doing parallel increment of nested for loop. Samples #inside the code the values assigned to a variable by another awk command will be like a=/xyz/pg/as /xyz/pg/as2 /xyz/pg/as3 b=/xyz/sd/fd1 /xyz/sd/fd2 /xyz/sd/fd3 for q in... (1 Reply)
Discussion started by: ananan
1 Replies
basex(1)							 The XML Database							  basex(1)

NAME
basex - XML database system and XPath/XQuery processor (command line mode) SYNOPSIS
basex [-bcdiLosuvVwxz] [query] DESCRIPTION
basex is a fast and powerful, yet light-weight and platform independent XML database system and XPath/XQuery processor. OPTIONS
A short description of option can be obtained from $ basex -h or by browsing http://docs.basex.org/wiki/Startup_Options#BaseX_Standalone DATABASE COMMANDS
A list of supported Database commands can be obtained from $ basex -c help or by browsing http://docs.basex.org/wiki/Commands EXAMPLES
o XQuery evaluation (no database, no interaction, script mode): $ basex -Lq 19+23 42 $ basex -Lq "<answer>{ 23+19 }</answer>" <answer>42</answer> o Import an XML file into database, output its content (query its root) and be verbose: $ basex -Vc "CREATE DB input /usr/share/doc/basex/examples/input.xml; XQUERY /" Database 'input' created in 136.84 ms. <html> <!-- Header --> <head id="0"> <title>XML</title> </head> <!-- Body --> <body id="1" bgcolor="#FFFFFF" text="#000000" link="#0000CC"> <h1>Databases &amp; XML</h1> <div align="right"> <b>Assignments</b> <ul> <li>Exercise 1</li> <li>Exercise 2</li> </ul> </div> </body> <?pi bogus?> </html> Query: / Compiling: Result: root() Parsing: 5.08 ms Compiling: 27.2 ms Evaluating: 0.87 ms Printing: 13.7 ms Total Time: 46.86 ms Hit(s): 1 Item Updated: 0 Items Printed: 358 Bytes Query executed in 42.52 ms. o XPath evaluation (with existing database): $ basex -Lc "OPEN input; XQUERY //li[1]" <li>Exercise 1</li> o Retrieve XML from the web and perform XPath query: $ basex -Lq "doc('http://files.basex.org/examples/input.xml')//li" <li>Exercise 1</li> <li>Exercise 2</li> o W3C XQuery Full-Text (make use of full-text index and perform fuzzy query with a typing error): $ basex BaseX 7.1 [Standalone] Try "help" to get more information. > SET FTINDEX on Full-Text Index: ON > CREATE DB input /usr/share/doc/basex/examples/input.xml Database 'input' created in 94.42 ms. > XQUERY //b[text() contains text 'Asisgnment' using fuzzy] <b>Assignments</b> Query executed in 8.37 ms. o Update the database and show result: > XQUERY delete node //ul Query executed in 2.79 ms. > XQUERY replace value of node //b with 'Debian rules' Query executed in 2.94 ms. > XQUERY //div <div align="right"> <b>Debian rules</b> </div> Query executed in 1.01 ms. o Open an input xml file, execute a query and write result into file: $ basex -Li /usr/share/doc/basex/examples/input.xml -q //div -o out.xml $ cat out.xml <div align="right"> <b>Assignments</b> <ul> <li>Exercise 1</li> <li>Exercise 2</li> </ul> </div> o Query an already existing database called 'input'. If a file named 'input' exists in current working directory it takes precedence: $ basex -Li input -q //div <div align="right"> <b>Assignments</b> <ul> <li>Exercise 1</li> <li>Exercise 2</li> </ul> </div> o Let basex process query input from standard in: $ echo '19+23' | basex -Lq- 42 o Execute commands from script file: $ cat commands.txt create db debian <debian_db/> xquery / list $ basex -LC commands.txt | grep debian <debian_db/> debian 1 4639 debian.xml o Parse non well-formed HTML (needs libtagsoup-java installed): $ cat bad.html <html> <ul> <li>A <li>B </ul> </html> $ basex -c 'set parser html; set htmlopt method=html,nons=true; create db htmldb bad.html' $ basex -q "doc('htmldb')" <html> <body> <ul> <li>A</li> <li>B</li> </ul> </body> </html> For further documentation on how to configure the HTML Parser refer to http://docs.basex.org/wiki/Parsers#HTML_Parser SEE ALSO
basexgui(1), basexserver(1), basexclient(1) ~/.basex BaseX (standalone and server) properties ~/.basexgui BaseX additional GUI properties ~/.basexperm user name, passwords, and permissions ~/.basexevents contains all existing events ~/BaseXData Default database directory ~/BaseXData/.logs Server logs ~/BaseXRepo Package repository BaseX Documentation Wiki: http://docs.basex.org HISTORY
BaseX started as a research project of the Database and Information Systems Group (DBIS) at the University of Konstanz in 2005 and soon turned into a feature-rich open source XML database and XPath/XQuery processor. LICENSE
New (3-clause) BSD License AUTHOR
BaseX is developed by a bunch of people called 'The BaseX Team' <http://basex.org/about-us/> led by Christian Gruen <cg@basex.org>. The man page was written by Alexander Holupirek <alex@holupirek.de> while packaging BaseX for Debian GNU/Linux. 26 June 2012 basex(1)
All times are GMT -4. The time now is 11:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy