0 Replies Latest reply on Jan 12, 2010 3:35 AM by digital biscuit

    CPD log ecoding and xslt on OSX

    digital biscuit

      I've just been playing around with the output from FlexCPD by trying to parse it using the xsl stylesheet that's available in the PMD download. I'm on a mac so the output was formatted as MacRoman which doesn't work with the xlst tool. To get round this you can pipe the ouput through lint like so:

       

       

      <!-- =================================

            target: cpd-to-html

           ================================= -->

      <target name="cpd-to-html" description="Converts the Flex CPD log file to HTML">

       

           <!-- WARN: Fails by default because cpd output encoding is MacRoman,

                              convert it to UTF-8 -->

           <exec executable="xmllint">

                <arg line="--format"/>

                <arg line="--encode UTF-8"/>

                <arg line="-o ${flex.cpd.report.xml}"/>

                <arg value="${flex.cpd.report.xml}"/>

           </exec>

       

       

           <xslt in="${flex.cpd.report.xml}"

                   style="${flex.cpd.report.style}"

                   out="${flex.cpd.report.html}"

           />

       

       

      </target>