1

Topic: How to take only necessary?

Day kind!
It is necessary by means of XSL to take from XML a fragment:

<eventTriggers>
<eventTrigger name = "TriggerBefore" type = "before-data" language = "PLSQL">
<source> Log.fBefore (666:XDO_USER_NAME) </source>
</eventTrigger>
<eventTrigger name = "TriggerAfter" type = "after-data" language = "PLSQL">
<source> Logg.fAfter () </source>
</eventTrigger>
</eventTriggers>

I want to receive only:
Log.fBefore (666:XDO_USER_NAME)
That interests only source that with type type = "before-data"

2

Re: How to take only necessary?

Solved so
All thanks
<trig>
<xsl:for-each select = "xdm:eventTriggers/xdm:eventTrigger">
<xsl:if test = "type ='before-data '">
<xsl:value-of select = "xdm:source"/>
</xsl:if>

3

Re: How to take only necessary?

<xsl:value-of select = "eventTriggers/eventTrigger [@type =" before-data "]/source"/>

4

Re: How to take only necessary?

Confused with inverted commas

<xsl:value-of select = "eventTriggers/eventTrigger [@type ='before-data ']/source"/>