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

Handle attributes in description subelements

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-RC1
    • Fix Version/s: 2.2.0
    • Component/s: Core
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: