Code Monkey home page Code Monkey logo

Comments (14)

kwin avatar kwin commented on September 26, 2024

by what process was the list of namespaces defined? manually or in some automatic process?

This is explained in

// being generated from http://localhost:4502/crx/de/exportnodetype.jsp

I don't know why the crx namespace is not contained in that dump. @stefanseifert Do you have any idea how to get the full dump?

from aem-nodetypes.

kwin avatar kwin commented on September 26, 2024

I just checked http://localhost:4502/crx/explorer/nodetypes/list.jsp?view=cnf&selection= and also that does not have the crx namespace....

It seems that the CND for some reason always only includes those namespaces which are used in node type definitions, but not those which are just used with property names/node names outside of NT definitions....

That is a shame as CND actually stands for "Compact Namespace and(!) Node Type Definition" (https://jackrabbit.apache.org/jcr/node-type-notation.html)

from aem-nodetypes.

stefanseifert avatar stefanseifert commented on September 26, 2024

it's there if you look at http://localhost:4502/crx/explorer/ui/namespace_editor.jsp?ck=1606407982435&Path=&Callback=reload

probably the export contains only namespaces defined by CND files, and not those that are added dynamically during the livetime of a repository? (iirc this happens e.g. when uploading assets, they may contain namespaces not known before)

from aem-nodetypes.

kwin avatar kwin commented on September 26, 2024

The code behind http://localhost:4502/crx/explorer/nodetypes/list.jsp?view=cnf&selection= looks like this

...
 if (req.getParameter("view", "").equalsIgnoreCase("cnf")) {
        response.setContentType("text/plain; charset=utf-8");
        CompactNodeTypeDefWriter cnd = new CompactNodeTypeDefWriter((Writer)out, repSession, true);
        if (ntMgr == null) {
          NodeTypeIterator<NodeType> nodeTypeIterator = repSession.getWorkspace().getNodeTypeManager().getAllNodeTypes();
          while (nodeTypeIterator.hasNext()) {
            NodeType ntImpl = nodeTypeIterator.next();
            if (nodeTypeFilter == 1 && !ntImpl.isMixin())
              continue; 
            if (nodeTypeFilter == 2 && ntImpl.isMixin())
              continue; 
            cnd.write((NodeTypeDefinition)ntImpl);
          } 
        }
...

Probably one would need to call http://jackrabbit.apache.org/api/2.20/org/apache/jackrabbit/commons/cnd/CompactNodeTypeDefWriter.html#write-java.util.Collection-org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefWriter.NamespaceMapping-java.io.Writer- instead internally to also include namespaces not bound to a node type definition. I will investigate, whether there is a servlet exposing that. Otherwise I fear I have to come up with my own implementation for doing a full export.

from aem-nodetypes.

stefanseifert avatar stefanseifert commented on September 26, 2024

namespaces defined in bundle headers like

Sling-Namespaces: wcmio=http://wcm.io/ns

are also not contained in the output of exportnodetype.jsp.

from aem-nodetypes.

kwin avatar kwin commented on September 26, 2024

Are those used in nodetypes?
I would rather assume that only namespaces used in nodetypes are exported, the others not. Compare with #2 (comment)

from aem-nodetypes.

stefanseifert avatar stefanseifert commented on September 26, 2024

no - but the namespace may by used by properties stored in content packages

from aem-nodetypes.

kwin avatar kwin commented on September 26, 2024

Just to clarify: I do agree that this is a bug and we must export all namespaces, the only question is how to achieve this easily.

from aem-nodetypes.

kwin avatar kwin commented on September 26, 2024

This version:
aem-2020.11.4506.20201112T235200Z.cnd.txt has been created with a custom servlet now (I will push that later as well).
@stefanseifert WDYT?

from aem-nodetypes.

stefanseifert avatar stefanseifert commented on September 26, 2024

looks good!
it think this line should be omitted:

<''=''>

from aem-nodetypes.

kwin avatar kwin commented on September 26, 2024

All future versions will be based on the export from https://issues.apache.org/jira/browse/SLING-9945 which contains all namespaces.

from aem-nodetypes.

stefanseifert avatar stefanseifert commented on September 26, 2024

thanks!
maybe you should publish an updated version of the AEM 6.5 node type set as well with all namespaces?

from aem-nodetypes.

kwin avatar kwin commented on September 26, 2024

@stefanseifert Would you be able to provide a PR for 6.5.7?

from aem-nodetypes.

stefanseifert avatar stefanseifert commented on September 26, 2024

done, created 2 PRs

from aem-nodetypes.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.