Ivy
  1. Ivy
  2. IVY-1214

Handle attributes in description subelements

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial 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;
                     }
                  ...
             }
      
      1. ivy-1214.patch
        1 kB
        Jean-Louis Boudart

        Activity

        Hide
        Maarten Coene added a comment -

        Applied your patch in SVN trunk and 2.2.x branch.
        Thanks for the contribution!

        Show
        Maarten Coene added a comment - Applied your patch in SVN trunk and 2.2.x branch. Thanks for the contribution!
        Hide
        Jean-Louis Boudart added a comment -

        Here is a patch to fix it

        Show
        Jean-Louis Boudart added a comment - Here is a patch to fix it

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development