Subject: RE: xsl question From: "Medina, Edward" <emedina@xxxxxxx> Date: Tue, 4 Apr 2000 07:22:14 -0400 |
Why don't you nest all those tags within one master element (tag) and then all you have to do is put <xs:Lvalue-of select="."/> along with apply-templates. That should capture all the tags under the master tag. The children of the parent element. Or maybe I have no idea what you are trying to do. Eddy -----Original Message----- From: Alankar Chowdhury [mailto:alankar@xxxxxxxxxxxxxxxxx] Sent: Tuesday, April 04, 2000 2:02 AM To: xsl-list@xxxxxxxxxxxxxxxx Subject: xsl question Hey all, I have a xml document which looks something like this : <?xml version="1.0" encoding="UTF-8"?> <dmx> <dmxpsub min="0000000001"> <SubscriberNumber>100000000011113FFF</SubscriberNumber> <ForwardSubscriberNumber>311110000000001FFF</ForwardSubscriberNumber> <DialingPlanID>0</DialingPlanID> <Password>0000</Password> <actual_phone>YES</actual_phone> <esn>0</esn> <dmxpsscfb> <ActivationStatus>OPERATIVE</ActivationStatus> <provision_status>EXPLICIT</provision_status> <world_number>0123456789012345</world_number> </dmxpsscfb> <dmxpssmct> <ActivationStatus>OPERATIVE</ActivationStatus> <provision_status>EXPLICIT</provision_status> <mct_option>0</mct_option> </dmxpssmct> <dmxpssmrsum> <ActivationStatus>OPERATIVE</ActivationStatus> <provision_status>EXPLICIT</provision_status> <pilot_min>100000000011113FFF</pilot_min> </dmxpssmrsum> </dmxpsub> : : </dmx> Now I want to display this information in the form of a table. I can do this using a simple stylesheet with <xsl:value-of> and other elements. The problem I am facing is I am generating this xml document dynamically, so some of the tags from the document might be missing( they are optional) <tr style="text-align:left;position:relative;background-color:pink"> <td style="background-color:lightgreen"><xsl:value-of select="@min"/></td> <td align="center"><xsl:value-of select="SubscriberNumber"/></td> <td align="center"><xsl:value-of select="ForwardSubscriberNumber"/></td> <td align="center"><xsl:value-of select="DialingPlanID"/></td> <td align="center"><xsl:value-of select="Password"/></td> <td align="center"><xsl:value-of select="actual_phone"/></td> </tr> If I use somethinf like this and if the password tag is not included in the document, then the password coloumn in the table is left blank. Can someone suggest me, how to check if a tag is present in the document. please consider that there is more data in the document, so I can not have a <xsl:if> statement to check if each tag is persent or not .. If any doubts about my question pls mail me : Thanks alankar XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: xsl question, Linda van den Brink | Thread | RE: xsl question, Kay Michael |
RE: A very silly question, Medina, Edward | Date | Re: Is it time for an XSLT-list?, David Carlisle |
Month |