Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1214

Handle attributes in description subelements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.2.0-RC1
    • 2.2.0
    • Core
    • None

    Description

      Description element in a ivy file is the only part that doesn't contains strong xsd validations. In other words we are able to put any sub elements.

      Let's consider a simple use case where we want to have a short description containing a href link.

      <description>
       This module is designed for .... and based on <a href="http://mysite/">an opensource library</a>
      </description>
      

      Unfortunately, current code base of XmlModuleDescriptorParser silently ignores attributes in description subelements.

              public void startElement(String uri, String localName, String qName, Attributes attributes)
                      throws SAXException {
                  try {
                      if (state == State.DESCRIPTION) {
                          // make sure we don't interpret any tag while in description tag
                          buffer.append("<" + qName + ">");
                          return;
                     }
                  ...
             }
      

      Attachments

        1. ivy-1214.patch
          1 kB
          Jean-Louis Boudart

        Activity

          People

            maartenc Maarten Coene
            jboudart Jean-Louis Boudart
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: