[basex-talk] dynamic number of attributes

2014-05-06 Thread Erol Akarsu
I would like to create an xml element that will have dynamic number of
attributes, something like this where n will change and $value_1 to
$value_2 will be provided by outside

element book {
 attribute isbn_1 {$value_1}
attribute isbn_2 {$value_2}
attribute isbn_3 {$value_3}
.
.
.
attribute isbn_n {$value_n}
}

Can we do it?

Thanks


Re: [basex-talk] dynamic number of attributes

2014-05-06 Thread Marco Lettere

Sorry for double posting :-D
M.

On 06/05/2014 20:07, Marco Lettere wrote:

Hi Erol,.
try

element book {

  for $i in 1 to 4
  return attribute {xs:QName(isbn_ || $i)} { value || $i}

}

Regards,
Marco.

On 06/05/2014 19:48, Erol Akarsu wrote:
I would like to create an xml element that will have dynamic number 
of attributes, something like this where n will change and $value_1 
to $value_2 will be provided by outside


element book {
 attribute isbn_1 {$value_1}
attribute isbn_2 {$value_2}
attribute isbn_3 {$value_3}
.
.
.
attribute isbn_n {$value_n}
}

Can we do it?

Thanks







Re: [basex-talk] 7.8.2 Updating function items

2014-05-06 Thread Marco Lettere

Nice Christian.
We'll try it asap.
M.

On 04/05/2014 21:57, Christian Grün wrote:

Et voilà...

   https://github.com/BaseXdb/basex/issues/939
   http://files.basex.org/releases/latest/

Your feedback is welcome,
Christian



On Tue, Apr 22, 2014 at 3:31 PM, Christian Grün
christian.gr...@gmail.com wrote:

Hi Marco,


XUST001 Updating function items are not yet supported

when passing an updating function as a value. This used to work neatly from
7.6 at least onwards.
I must admit that I'm pretty surpirsed and I'd like to ask where ni the docs
I could get more info on that.

the behavior in 7.6 was not clean, which is why it was removed in more
recent versions. However, the latest XQUF draft (not public yet) now
provides an updating keyword, which can be used to invoke updating
functions

   UpdatingFunctionCall  ::=  updating PrimaryExpr ( (ExprSingle
(, ExprSingle)*)? )

Issue 939 will be closed as soon as we have implemented this in BaseX
[1]. As an alternative, if you set MIXUPDATES=true in BaseX 8.0, you
won't encounter any restrictions regarding the invocation of updating
and non-updating functions.

Christian

[1] https://github.com/BaseXdb/basex/issues/939




Re: [basex-talk] dynamic number of attributes

2014-05-06 Thread Erol Akarsu
Dirk,

Super duper!


On Tue, May 6, 2014 at 1:55 PM, Dirk Kirsten d...@basex.org wrote:

 Hi Erol,

 Yes, you can.

 Something like the following should work:

 element book {
   for $i in 1 to $n
   return attribute {isbn_ || $i} {get-value($i)}
 }

 Cheers,
 Dirk

 On 06/05/14 19:48, Erol Akarsu wrote:
  I would like to create an xml element that will have dynamic number of
  attributes, something like this where n will change and $value_1 to
  $value_2 will be provided by outside
 
  element book {
   attribute isbn_1 {$value_1}
  attribute isbn_2 {$value_2}
  attribute isbn_3 {$value_3}
  .
  .
  .
  attribute isbn_n {$value_n}
  }
 
  Can we do it?
 
  Thanks
 

 --
 Dirk Kirsten, BaseX GmbH, http://basex.org
 |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
 |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
 |   Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
 `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22



[basex-talk] Rest Access from javascript using AngularJs

2014-05-06 Thread Yoann Maingon
Hi,

After xmlprague and my presentation at the BaseX user group I was told (and
I agree) that it wasn't really smart to use php for what I was building as
it had almost no added value as I could directly query basex using the Rest
Interface.

Does anyone as some example using either angularjs or jquery ? I think I'm
struggling with the login. Even just trying with a Rest test tool, I can
see that I have error messages in Basex telling me theat access was refused.


Yoann Maingon
CEO - mydatalinx
+33664324966