I have just gotten thrown into html, xml and xsl code so please ignore my basic knowledge. I have a content management system that creates html, xml and xsl code.
It is a tool where a user will enter data into fields and then an html page will be created. When they enter data and enter nothing in the body field I get
<div xmlns:st1="urn: xmlns="urn: class="rxbodyfield" xmlns:x="urn: xmlns:w="urn:<p></p>
</div>
If there enter something in the body field I get
<div xmlns:st1="urn: xmlns="urn: class="rxbodyfield" xmlns:x="urn: xmlns:w="urn:<p>this is just a test</p>
</div>
On my style sheet I currently have
<!-- start XSL -->
<xslutput method="xml" omit-xml-declaration="yes" />
<xsl:variable name="body_txt" select="whitebox/shared/body/node()" />
<!-- end XSL -->
<!-- begin XSL -->
<xsl:if test="$body_txt">
<!-- end XSL -->
<tr>
<td><span psxedit="body" psxshow="psx-shared/body">This section maybe blank.</span><hr></td>
</tr>
<!-- begin XSL -->
</xsl:if>
<!-- end XSL -->
I need to modify it to say if nothing is in the paragraph tag skip putting the body field and divider line on the output html page. How would I do this?
It was originally the way it was because those div tags were not there if there was no text or picture in the body field. If they didn't enter anything in the body field we use to get.
<p></p>
but now because of another issue we get the div tags everytime which now makes our if statement in the xsl always true.
If you need more info of if this is confussing please let me know.
It is a tool where a user will enter data into fields and then an html page will be created. When they enter data and enter nothing in the body field I get
<div xmlns:st1="urn: xmlns="urn: class="rxbodyfield" xmlns:x="urn: xmlns:w="urn:<p></p>
</div>
If there enter something in the body field I get
<div xmlns:st1="urn: xmlns="urn: class="rxbodyfield" xmlns:x="urn: xmlns:w="urn:<p>this is just a test</p>
</div>
On my style sheet I currently have
<!-- start XSL -->
<xslutput method="xml" omit-xml-declaration="yes" />
<xsl:variable name="body_txt" select="whitebox/shared/body/node()" />
<!-- end XSL -->
<!-- begin XSL -->
<xsl:if test="$body_txt">
<!-- end XSL -->
<tr>
<td><span psxedit="body" psxshow="psx-shared/body">This section maybe blank.</span><hr></td>
</tr>
<!-- begin XSL -->
</xsl:if>
<!-- end XSL -->
I need to modify it to say if nothing is in the paragraph tag skip putting the body field and divider line on the output html page. How would I do this?
It was originally the way it was because those div tags were not there if there was no text or picture in the body field. If they didn't enter anything in the body field we use to get.
<p></p>
but now because of another issue we get the div tags everytime which now makes our if statement in the xsl always true.
If you need more info of if this is confussing please let me know.