accessing attributes in xml
Hi all, I've an xml like: ... defaultContactPerson type="PROOF"/defaultContactPerson type="BILL"/defaultContactPerson type="SALES"Hans Friedrich Mueller/defaultContactPersondefaultContactPerson type="MAIL"/defaultContactPerson type="KEY"/ Now I've to check inside the xsl this: xsl:if test="??? //[EMAIL PROTECTED] != '' ???" !--do something here if the sales contact isn't empty-- xsl:value-of select="??? //[EMAIL PROTECTED] ???"/ /xsl Can anyone help me how to check the valuefor the tagwhere the attribute is 'SALES' and how to access this value. ThanX in Advance cu Torsten
AW: accessing attributes in xml
I'd guess xsl:value of select="[EMAIL PROTECTED] = 'SALES']"/ Hope this helps Cheers Mirko -Ursprüngliche Nachricht-Von: Torsten Erler [mailto:[EMAIL PROTECTED]Gesendet: Donnerstag, 24. April 2003 15:03An: Fop-User (E-mail)Betreff: accessing attributes in xml Hi all, I've an xml like: ... defaultContactPerson type="PROOF"/defaultContactPerson type="BILL"/defaultContactPerson type="SALES"Hans Friedrich Mueller/defaultContactPersondefaultContactPerson type="MAIL"/defaultContactPerson type="KEY"/ Now I've to check inside the xsl this: xsl:if test="??? //[EMAIL PROTECTED] != '' ???" !--do something here if the sales contact isn't empty-- xsl:value-of select="??? //[EMAIL PROTECTED] ???"/ /xsl Can anyone help me how to check the valuefor the tagwhere the attribute is 'SALES' and how to access this value. ThanX in Advance cu Torsten
AW: accessing attributes in xml
Sorry, i mean xsl:value-of select="[EMAIL PROTECTED] = 'SALES']"/ Cheers Mirko -Ursprüngliche Nachricht-Von: Mirko Sertic [mailto:[EMAIL PROTECTED]Gesendet: Donnerstag, 24. April 2003 15:06An: [EMAIL PROTECTED]; [EMAIL PROTECTED]Betreff: AW: accessing attributes in xml I'd guess xsl:value of select="[EMAIL PROTECTED] = 'SALES']"/ Hope this helps Cheers Mirko -Ursprüngliche Nachricht-Von: Torsten Erler [mailto:[EMAIL PROTECTED]Gesendet: Donnerstag, 24. April 2003 15:03An: Fop-User (E-mail)Betreff: accessing attributes in xml Hi all, I've an xml like: ... defaultContactPerson type="PROOF"/defaultContactPerson type="BILL"/defaultContactPerson type="SALES"Hans Friedrich Mueller/defaultContactPersondefaultContactPerson type="MAIL"/defaultContactPerson type="KEY"/ Now I've to check inside the xsl this: xsl:if test="??? //[EMAIL PROTECTED] != '' ???" !--do something here if the sales contact isn't empty-- xsl:value-of select="??? //[EMAIL PROTECTED] ???"/ /xsl Can anyone help me how to check the valuefor the tagwhere the attribute is 'SALES' and how to access this value. ThanX in Advance cu Torsten
Re: accessing attributes in xml
How about (loop): xsl:for-each select=[EMAIL PROTECTED]'SALES'] xsl:call-template name=processIt/ /xsl:for-each -Lou Torsten Erler [EMAIL PROTECTED] on 04/24/2003 09:03:20 Please respond to [EMAIL PROTECTED] To: Fop-User \(E-mail\) [EMAIL PROTECTED] cc: Subject: accessing attributes in xml Hi all, I've an xml like: ... defaultContactPerson type=PROOF/ defaultContactPerson type=BILL/ defaultContactPerson type=SALESHans Friedrich Mueller/defaultContactPerson defaultContactPerson type=MAIL/ defaultContactPerson type=KEY/ Now I've to check inside the xsl this: xsl:if test=??? //[EMAIL PROTECTED] != '' ??? !-- do something here if the sales contact isn't empty-- xsl:value-of select=??? //[EMAIL PROTECTED] ???/ /xsl Can anyone help me how to check the value for the tag where the attribute is 'SALES' and how to access this value. ThanX in Advance cu Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing attributes in xml
Thanx - [EMAIL PROTECTED] = 'SALES'] was the pointer I'm looking for - it works well. I tought @ goes directly to the attribute value, but wherefrom should the parser know which attributewas meant ;( { Thinking is hard, if you've turned off your brain ;) } cu Torsten -Original Message-From: Mirko Sertic [mailto:[EMAIL PROTECTED]Sent: Donnerstag, 24. April 2003 15:09To: [EMAIL PROTECTED]Subject: AW: accessing attributes in xml Sorry, i mean xsl:value-of select="[EMAIL PROTECTED] = 'SALES']"/ Cheers Mirko -Ursprüngliche Nachricht-Von: Mirko Sertic [mailto:[EMAIL PROTECTED]Gesendet: Donnerstag, 24. April 2003 15:06An: [EMAIL PROTECTED]; [EMAIL PROTECTED]Betreff: AW: accessing attributes in xml I'd guess xsl:value of select="[EMAIL PROTECTED] = 'SALES']"/ Hope this helps Cheers Mirko -Ursprüngliche Nachricht-Von: Torsten Erler [mailto:[EMAIL PROTECTED]Gesendet: Donnerstag, 24. April 2003 15:03An: Fop-User (E-mail)Betreff: accessing attributes in xml Hi all, I've an xml like: ... defaultContactPerson type="PROOF"/defaultContactPerson type="BILL"/defaultContactPerson type="SALES"Hans Friedrich Mueller/defaultContactPersondefaultContactPerson type="MAIL"/defaultContactPerson type="KEY"/ Now I've to check inside the xsl this: xsl:if test="??? //[EMAIL PROTECTED] != '' ???" !--do something here if the sales contact isn't empty-- xsl:value-of select="??? //[EMAIL PROTECTED] ???"/ /xsl Can anyone help me how to check the valuefor the tagwhere the attribute is 'SALES' and how to access this value. ThanX in Advance cu Torsten