By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,725 Members | 1,088 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,725 IT Pros & Developers. It's quick & easy.

Blank cells XML / XSL

P: n/a
I have a table that is made in XSL that grabs the information from an
XML sheet.

However any cell that is blank in XML the border doesnt show up when
you view it.

Is there a work around for this?

For example in my XML file i have:
<test title='information 1'text cell 1</test>
<test title='information 2'</test>
this will produce a cell that has a border with "text cell" in it but
for the blank cell there is no border.

Thanks

Sep 27 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
RigasMinho wrote:
However any cell that is blank in XML the border doesnt show up when
you view it.
Which border? What do you view the XML with?
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Sep 27 '06 #2

P: n/a


RigasMinho wrote:
I have a table that is made in XSL that grabs the information from an
XML sheet.
this will produce a cell that has a border with "text cell" in it but
for the blank cell there is no border.
Is that a HTML table? Then CSS 2 can help with e.g.

<style type="text/css">
table { empty-cells: show; }
</style>

Or put   into those cells where you XML does not provide any
contents e.g.
<td> </td>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 27 '06 #3

P: n/a
I tried to do the table empty-cells: show but still it doesnt show the
empty cells.

I just want to produce the border around an empty cell.
I have this which go through the xml file and searches for the data to
pass into each table row.

<xsl:for-each select="//infoObject">
<tr><xsl:for-each select="infoObjectDetail">
<td><xsl:value-of select="." /</td>

I tried using:
<td> </td>
but have yet to figure out where to place this.

I'll keep on working on it and if i come up with a solution i'll let
you know - if not that is fine as well.

Martin Honnen wrote:
RigasMinho wrote:
I have a table that is made in XSL that grabs the information from an
XML sheet.

this will produce a cell that has a border with "text cell" in it but
for the blank cell there is no border.

Is that a HTML table? Then CSS 2 can help with e.g.

<style type="text/css">
table { empty-cells: show; }
</style>

Or put   into those cells where you XML does not provide any
contents e.g.
<td> </td>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 28 '06 #4

P: n/a
It sounds like the first thing you need to do is figure out what you
want the output document to be. That's an HTML problem, and should be
debugged by hand-editing HTML until it works the way you intended.

After that, writing XSLT to produce that HTML from XML should be
straightforward.

Solve one problem at a time.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Sep 28 '06 #5

P: n/a


RigasMinho wrote:

<xsl:for-each select="//infoObject">
<tr><xsl:for-each select="infoObjectDetail">
<td><xsl:value-of select="." /</td>

I tried using:
<td> </td>
but have yet to figure out where to place this.
Alike this
<xsl:for-each select="infoObjectDetail">
<td>
<xsl:choose>
<xsl:when test="normalize-space() != ''">
<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
</xsl:choose>
</td>
</xsl:for-each>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 28 '06 #6

P: n/a
I got it:
<xsl:for-each select="//infoObject">
<tr><xsl:for-each select="infoObjectDetail">
<td><xsl:value-of select="." />  </td>
</xsl:for-each>
</tr>
</xsl:for-each>
Thanks i would never have figured out the &#160
Martin Honnen wrote:
RigasMinho wrote:
I have a table that is made in XSL that grabs the information from an
XML sheet.

this will produce a cell that has a border with "text cell" in it but
for the blank cell there is no border.

Is that a HTML table? Then CSS 2 can help with e.g.

<style type="text/css">
table { empty-cells: show; }
</style>

Or put   into those cells where you XML does not provide any
contents e.g.
<td> </td>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 28 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.