GithubHelp home page GithubHelp logo

Comments (4)

rombert avatar rombert commented on June 11, 2024

@patricklwy14 - thanks for the report. I was able to reproduce the error that you mentioned - for the record it is

Failed reading file at /sample004/jcr_root/content/example/comp/.xml
org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 26; The prefix "cq" for attribute "cq:layout" associated with an element type "jcr:root" is not bound.

Now, this simply says that you have added a cq:layout attribute without declaring the cq namespace in the XML file. The error will be avoided by adding that namespace to the XML file. I can see this being a bug if we were to have specific wizards for components and edit configs and those would have missing namespaces. But at the moment I'm not sure what we can do ... it's not 100% safe to 'detect' namespaces from the repository ( and we're not always connected to the repository ) and even that would be awkward to implement.

Thoughts?

from aem-eclipse-developer-tools.

rombert avatar rombert commented on June 11, 2024

Adding @AliShirazi from duplicate issue #62

Some things which we can do better here, in no particular order:

  • validate the vault files and trigger errors in the editor. The standard XML validator from Eclipse is disabled as it generates ( in the vault file scenario ) spurious warnings but we can add a custom one with better messages
  • when adding a (namespaced) property via the properties view, ensure that the prefix is a valid one and add the namespace if needed

Thoughts?

from aem-eclipse-developer-tools.

kwin avatar kwin commented on June 11, 2024

The XML Validation has been enabled now for content-package projects (https://issues.apache.org/jira/browse/SLING-6237) so with the upgrade to Sling IDE 1.2.0 there should be a proper error message once you use an undeclared namespace.

from aem-eclipse-developer-tools.

gabrielwalt avatar gabrielwalt commented on June 11, 2024

Closing this as there hasn't been activity for over a year.

from aem-eclipse-developer-tools.

Related Issues (20)

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.