Alister Pillow | 1 Feb 04:00 2012
Picon

Installation upgrades

Greetings and salutations.

I want to upgrade an installation (v1.4.1) to the latest stable 1.4.x version, and I can see this happening
again when new patches are released. The process of downloading, building and customising on a staging
machine, and then installing and restoring from backup is fairly tedious - so I'm considering a full
checkout and build from source on the Client's server; this would enable me to run svn-update when needed
and rebuild in-situ. 

The disadvantage of this approach is that for the initial install, I can't run the full installer, which
performs some setup tasks like setting the Admin password and choosing a data directory.

Questions:
What are the dangers with this approach? (Other than foolishly running ./build.sh clean or clean-all.)
Is there a script that replicates the behaviour of the installer? 
(and if not, then...) What other tasks are performed by the installer?

Thanks,
Alister.

PS. I wish Prague was a little closer to South Australia!
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Daniel Ebner | 1 Feb 13:10 2012
Picon

Adding a 'xmlns'-attribute to a node

Hi everyone,

I'm writing an xQuery Service using eXist returning a node in a  
namespace. The prefix of the namespace in the node should be able to  
be set dynamically when calling the service. But I have trouble with  
adding a attribute like 'xmlns:pre' to a node

I tried something like this in the Sandbox:

let $uri := 'http://mynamespaceuri.org'
let $prefix := 'pre'
let $xml-ns := concat('xmlns:', $prefix)
return
element pre:div
{
attribute {$xml-ns} { $uri }
}

err:XPST0081: No namespace defined for prefix xmlns

But I can declare the namespace xmlns:
declare namespace xmlns= "http://www.w3.org/2000/xmlns";

err:XQST0070: Namespace predefined prefix 'xmlns' can not be bound

So how can I add a namespace with a prefix to a node?
Any suggestions?

Cheers Daniel

(Continue reading)

Florent Georges | 1 Feb 15:21 2012

Re : Adding a 'xmlns'-attribute to a node

Daniel Ebner wrote:

  Hi,

> let $xml-ns := concat('xmlns:', $prefix)
> [...]
> attribute {$xml-ns} { $uri }

  Namespace declarations are not attributes.  See the following blog entry for a work-around:

http://fgeorges.blogspot.com/2006/08/add-namespace-node-to-element-in.html 

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Jens Østergaard Petersen | 1 Feb 15:56 2012
Picon

Re: Re : Adding a 'xmlns'-attribute to a node

Hi Florent,

This works fine in Saxon, but does nothing in eXist 1.4.2 and trunk, as far as I can see.

Best,

Jens

On Feb 1, 2012, at 3:21 PM, Florent Georges wrote:

> Daniel Ebner wrote:
> 
>   Hi,
> 
> 
>> let $xml-ns := concat('xmlns:', $prefix)
>> [...]
>> attribute {$xml-ns} { $uri }
> 
>   Namespace declarations are not attributes.  See the following blog entry for a work-around:
> 
> http://fgeorges.blogspot.com/2006/08/add-namespace-node-to-element-in.html 
> 
>   Regards,
> 
> -- 
> Florent Georges
> http://fgeorges.org/
> http://h2oconsulting.be/
> 
(Continue reading)

Florent Georges | 1 Feb 16:08 2012

Re: Re : Adding a 'xmlns'-attribute to a node

Jens Østergaard Petersen wrote:
> On Feb 1, 2012, at 3:21 PM, Florent Georges wrote:

>> http://fgeorges.blogspot.com/2006/08/add-namespace-node-to-element-in.html 

> This works fine in Saxon, but does nothing in eXist 1.4.2 and
> trunk, as far as I can see.

  Yes, indeed.  In my humble opinion this is a bug from eXist
then, which does not propagate correctly the namespaces from the
parent to the descendants when copying a tree to a new element.

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Wolfgang Meier | 1 Feb 21:31 2012

Re: Re : Adding a 'xmlns'-attribute to a node

> Yes, indeed.  In my humble opinion this is a bug from eXist
> then, which does not propagate correctly the namespaces from the
> parent to the descendants when copying a tree to a new element.

I think eXist's serializer will strip out the namespace because it is
not used in the resulting fragment and was not explicitly declared
with an xmlns. I'm not sure what behavior I would expect. I can't say
if the example code can be generalized.

Wolfgang

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Florent Georges | 1 Feb 22:56 2012

Re: Re : Adding a 'xmlns'-attribute to a node

Wolfgang Meier wrote:

  Hi,

>> Yes, indeed.  In my humble opinion this is a bug from eXist
>> then, which does not propagate correctly the namespaces from
>> the parent to the descendants when copying a tree to a new
>> element.

> I think eXist's serializer will strip out the namespace because
> it is not used in the resulting fragment and was not explicitly
> declared with an xmlns.  I'm not sure what behavior I would
> expect.  I can't say if the example code can be generalized.

  My understanding of 3.7.1.3 Content [1], §1.e.i.D.II is that
the in-scope namespaces of the parent must be inherited by the
copy of the content when it is added to the output tree, iff
copy-namespaces mode specifies "inherit".  So in that case,

selecting back the content of the parent must return a copy
augmented of the in-scope namespaces of the parent, in this case
the namespace we want to add.  Because copy-namespaces mode is
implementation-defined, a query that MUST return:

    <xxx xmlns:p1="uri2">
        <a/>
    </xxx>

has to set it explicitly:

(Continue reading)

Dave Finton | 1 Feb 15:56 2012
Picon

Re: Re : Adding a 'xmlns'-attribute to a node

The thing about namespaces is that it's easy to fall into the trap of thinking they are some sort of pseudo-attribute of an XML structure. This is not the case. I like to think of a namespace as a Universe, and the XML structures as galaxies inside of that Universe. Thus, it is no more possible to "add" or "delete" a namespace from XML any more than it is to "add" or "delete" a Universe from a galaxy. It makes more sense to go to your new Universe and build a brand new galaxy over there.


The workaround is to simply construct a new XML structure within the new namespace using the source XML structure as a guide. The link that Florent Georges provided describes exactly how to do that.

On Wed, Feb 1, 2012 at 8:21 AM, Florent Georges <lists <at> fgeorges.org> wrote:
Daniel Ebner wrote:

  Hi,


> let $xml-ns := concat('xmlns:', $prefix)
> [...]
> attribute {$xml-ns} { $uri }

  Namespace declarations are not attributes.  See the following blog entry for a work-around:

http://fgeorges.blogspot.com/2006/08/add-namespace-node-to-element-in.html 

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open



--
David Finton
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Wolfgang Meier | 1 Feb 21:46 2012

Re: Installation upgrades

Hi,

> What are the dangers with this approach? (Other than foolishly running ./build.sh clean or clean-all.)

I would probably choose this approach myself when running the stable
branch on a headless server. The installer is directly generated out
of the branch. We don't change anything in the default settings.

> Is there a script that replicates the behaviour of the installer?
> (and if not, then...) What other tasks are performed by the installer?

The only task the installer performs is to launch the db once to set
the admin password.

Wolfgang

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Alister Pillow | 1 Feb 22:09 2012
Picon

Re: Installation upgrades

Thanks Wolfgang - that's good to know.

On 02/02/2012, at 7:16 AM, Wolfgang Meier wrote:

> Hi,
> 
>> What are the dangers with this approach? (Other than foolishly running ./build.sh clean or clean-all.)
> 
> I would probably choose this approach myself when running the stable
> branch on a headless server. The installer is directly generated out
> of the branch. We don't change anything in the default settings.
> 
>> Is there a script that replicates the behaviour of the installer?
>> (and if not, then...) What other tasks are performed by the installer?
> 
> The only task the installer performs is to launch the db once to set
> the admin password.
> 
> Wolfgang

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Adam Retter | 2 Feb 00:43 2012

Re: Installation upgrades

Likewise I almost always deploy using svn co - then just a build.sh

I never use the installer.

On 1 February 2012 20:46, Wolfgang Meier <wolfgang <at> exist-db.org> wrote:
> Hi,
>
>> What are the dangers with this approach? (Other than foolishly running ./build.sh clean or clean-all.)
>
> I would probably choose this approach myself when running the stable
> branch on a headless server. The installer is directly generated out
> of the branch. We don't change anything in the default settings.
>
>> Is there a script that replicates the behaviour of the installer?
>> (and if not, then...) What other tasks are performed by the installer?
>
> The only task the installer performs is to launch the db once to set
> the admin password.
>
> Wolfgang
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Exist-open mailing list
> Exist-open <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/exist-open

--

-- 
Adam Retter

eXist Developer
{ United Kingdom }
adam <at> exist-db.org
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Alister Pillow | 11 Feb 03:30 2012
Picon

Re: Installation upgrades

Just a minor tip for anyone else as slow as me - 
build.sh svn-update will fail if you have checked out a branch - it attempts to checkout trunk. 

Regards,
Alister.

On 02/02/2012, at 10:13 AM, Adam Retter wrote:

> Likewise I almost always deploy using svn co - then just a build.sh
> 
> I never use the installer.
> 
> On 1 February 2012 20:46, Wolfgang Meier <wolfgang <at> exist-db.org> wrote:
>> Hi,
>> 
>>> What are the dangers with this approach? (Other than foolishly running ./build.sh clean or clean-all.)
>> 
>> I would probably choose this approach myself when running the stable
>> branch on a headless server. The installer is directly generated out
>> of the branch. We don't change anything in the default settings.
>> 
>>> Is there a script that replicates the behaviour of the installer?
>>> (and if not, then...) What other tasks are performed by the installer?
>> 
>> The only task the installer performs is to launch the db once to set
>> the admin password.
>> 
>> Wolfgang
>> 
>> ------------------------------------------------------------------------------
>> Keep Your Developer Skills Current with LearnDevNow!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-d2d
>> _______________________________________________
>> Exist-open mailing list
>> Exist-open <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/exist-open
> 
> 
> 
> -- 
> Adam Retter
> 
> eXist Developer
> { United Kingdom }
> adam <at> exist-db.org
> irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
Dannes Wessels | 11 Feb 14:46 2012

Re: Installation upgrades

Hi alister,,

Hmmmm it think i never had a look at is after i created this. It works for trunk only, indeed.

Probably it is better to remove this function.....

Cheers

Dannes

On 11 feb. 2012, at 03:30, Alister Pillow <gspringtech <at> gmail.com> wrote:

> Just a minor tip for anyone else as slow as me - 
> build.sh svn-update will fail if you have checked out a branch - it attempts to checkout trunk.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

Gmane