jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Strasser <tobias.stras...@gmail.com>
Subject Re: namespaces
Date Wed, 16 Mar 2005 22:12:34 GMT
> <?xml version="1.0" encoding="UTF-8"?>
> <site i18n:attr="label" label="Authoring"
>     xmlns="http://apache.org/cocoon/lenya/sitetree/1.0"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation=
>         "http://apache.org/cocoon/lenya/sitetree/1.0
>         ../../../../resources/entities/sitetree.xsd"
>     xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
>  >....
> 
> and attach it to the node "/authoring"
> 
> 3) After the import I take a look at the repository with the dump method
> of the FirstSteps example and see
> 
> Node: /authoring/_pre10:site
> Property: /authoring/_pre10:site/jcr:primaryType = nt:unstructured

well, the problem is, that your
"http://apache.org/cocoon/lenya/sitetree/1.0" namespace is defined on
the element as default namespace but without a prefix. how should
jackrabbit know, what prefix to use? i cannot use the empty prefix,
because this one is already reserved. so it generates automatically
the '_pre10' one.

if you would define a prefix for the site element:

<?xml version="1.0" encoding="UTF-8"?>
<lenya:site i18n:attr="label" label="Authoring"
   xmlns:lenya="http://apache.org/cocoon/lenya/sitetree/1.0"
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
  >

jackrabbit would automatically register the '.../sitetree/1.0'
namespace and use the 'lenya' prefix for it.

-- 
------------------------------------------< tobias.strasser@day.com >---
Tobias Strasser, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97 
-----------------------------------------------< http://www.day.com >---

Mime
View raw message