IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: vov
About
User Name: vov
Forum Rank: Newbie
Real Name:
Location
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Tuesday, January 24, 2012
Last Visit: Wednesday, February 8, 2012 4:31:48 AM
Number of Posts: 2
[0.01% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: AltovaXML
Posted: Wednesday, February 8, 2012 4:18:02 AM
My last working сode, with function doc :)

Code:

xquery version "1.0";
declare variable $my_doc := doc("d:\my.xml");
declare variable $dlm := codepoints-to-string((9));
let $ x:=
    for $i in $my_doc//Parcels/Parcel
            for $j at $n_c in $i//Spatial_Element
                    for $k at $n_v in $j/Spelement_Unit
    return concat(data($i/@CadastralNumber), $dlm,
                   $n_c, $dlm,
                   $n_v, $dlm,
                   normalize-space($k/Ordinate[1]/@X), $dlm,
                   normalize-space($k/Ordinate[1]/@Y)
                  )
return string-join ( $x, codepoints-to-string((10)) )

This is my new variant, thats much better.

Code:

xquery version "1.0";
declare variable $dlm := codepoints-to-string((9));
let $ x:=
    for $i in //Parcels/Parcel
        for $j .....



Thank you so much
Topic: AltovaXML
Posted: Tuesday, January 24, 2012 4:18:50 AM
Hi.
I try to work with command string AltovaXML.

> AltovaXML -xquery my.xq -in my.xml -out my.txt

How can I use the name of input file (key -in), in XQUERY programme
File my.xq (begining of the file)

xquery version "1.0";
declare variable $my_doc := doc(??????);
...

What should I write instead of question mark?
Thank you for your attention.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.