ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hartman, Shane" <SHART...@thezenith.com>
Subject RE: XML Properties with XSL
Date Thu, 27 May 2004 17:33:47 GMT
Thank you this turned out to be the correct formatting for it:
select="testsuite/properties/property[@name='TODAY']/@value" 
In the books and what I had read didn't lead me to think to add the
"/@value" part...

-----Original Message-----
From: Michael D. Norman [mailto:michael@probusoft.com] 
Sent: Thursday, May 27, 2004 1:10 PM
To: 'Ant Users List'
Subject: RE: XML Properties with XSL


Try something like this (I haven't tested on your XML -- just off the top of
my head):

select="/testsuite/properties/property[@name='TODAY']/@value"

The brackets indicate to do a test inside the current element.

-- Michael D. Norman
   ProbuSoft -- Quality Software Development
   http://www.probusoft.com/
   913-390-6951
   michael@probusoft.com
 

> -----Original Message-----
> From: Hartman, Shane [mailto:SHARTMAN@thezenith.com]
> Sent: Thursday, May 27, 2004 11:56 AM
> To: 'Ant Users List'
> Subject: XML Properties with XSL
> 
> Does anyone know how to access properties attributes in a generated 
> XML file.
> 
> I am running JUnit with Ant to produce xml reports and then running it 
> through the JUnitReport task. Here is an except of the xml produced..
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <testsuite errors="0" failures="0" 
> name="com.ze.athena.business.claim.filestrategy.FileStrategyRulesBDTes
> t"
> tests="30" time="2.515">
>   <properties>
>     <property name="ant.project.name" value="junit"></property>
>     <property name="TODAY" value="27-May-2004"></property>
>     <property name="junitreports"
> value="C:/Inetpub/wwwroot/Athena/R1.3/junit"></property>
>   </properties>
>   <testcase name="testIsDelayedCaseNotificationRequired1"
> time="0.156"></testcase>
>   <testcase name="testIsDelayedCaseNotificationRequired2"
> time="0.0"></testcase>
> </testsuite>
> 
> I wanted to change the style sheet to include the time of run so 
> everyone knew how current the report was. I was going to do this by 
> accessing the "TODAY" property located above. I have tried stuff like 
> <xsl:value-of select="testsuite/properties/@TODAY"/> but this hasn't 
> worked. Any help in pointing out what I am doing wrong would be 
> appreciated. Thanks
> --------------------------------------------------------------------------
> -
> This email and any attachments constitute non-public information for use
> only by intended recipient(s) and may contain confidential information.
> If
> you are not an intended recipient, please notify our Information Security
> Officer immediately at (941) 906-5844 and permanently delete the original
> of
> this email and any attachments, as well as any copies or printouts
> thereof.
> The unauthorized use, dissemination, distribution or reproduction of this
> email and any attachments is prohibited and may be unlawful.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------------
This email and any attachments constitute non-public information for use
only by intended recipient(s) and may contain confidential information.  If
you are not an intended recipient, please notify our Information Security
Officer immediately at (941) 906-5844 and permanently delete the original of
this email and any attachments, as well as any copies or printouts thereof.
The unauthorized use, dissemination, distribution or reproduction of this
email and any attachments is prohibited and may be unlawful.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message