On Wed, Mar 11, 2009 at 11:14 AM, Andreas Hartmann <[email protected]> wrote: > Hi Sling devs, > > sorry if this basic question has been answered before – I didn't find > anything. > > If I want to distinguish JCR item names belonging to my application from > user-generated items, my first idea would be to use a prefix: > > /tutorial > /app:content > nt:resource > /content > /chapter1
I would rather not use namespace prefixes, as they cause all sorts of problems over http and with URs (as you have already seen ;-)). Sling's escaping is "/app:content" => "/_app_content" and you can see it for example with standard nt:files, where the subnode is always "jcr:content" => "_jcr_content". Instead of a prefix, I would use a "reserved" name, such as "appdata", or model the hierarchy in a way that application data and user generated content is never on the same layer. You could also use node types as markers (eg. "my:AppContent" or "my:UserGeneratedContent"), albeit these are not visible by just looking at the path (which can be simpler for a simple parsing routine in client-side javascript, for example). Regards, Alex -- Alexander Klimetschek [email protected]
