-
XML & XSL = HTML (well sort of)
I'm having a bit of a problem generating tables using XML & XSL. I get my
XML from the ADO 2.5 recordset and I'm trying to generate an HTML table.
Everything works fine except, empty when the recordset returns null values
in the result set. This means that my <TD> elements are generate as <TD></TD>
and so don't appear with cell borders in the browser. I think I need at
least a non-breaking space between the cell but my XSL parser (MS DOM) complains.
Does any know how to get XSL to insert a
Thanks
rob.
-
Re: XML & XSL = HTML (well sort of)
I've been struggling with the same issue myself. No one has yet offered any
suggestions that work. There are at least 2 other requests in here for the
exact same help. Good luck.
"rob" <EvolutionComputing@hotmail.com> wrote:
>
>I'm having a bit of a problem generating tables using XML & XSL. I get
my
>XML from the ADO 2.5 recordset and I'm trying to generate an HTML table.
> Everything works fine except, empty when the recordset returns null values
>in the result set. This means that my <TD> elements are generate as <TD></TD>
>and so don't appear with cell borders in the browser. I think I need at
>least a non-breaking space between the cell but my XSL parser (MS DOM) complains.
> Does any know how to get XSL to insert a
>
>Thanks
>
>rob.
-
Re: XML & XSL = HTML (well sort of)
Have you tried <![CDATA[" "]]> in the XSL?
Alternatively, what about IsNull(<dbfield>, " ") in the SQL?
"Ken Myers" <Ken.Myers@Frontstep.com> wrote:
>
>I've been struggling with the same issue myself. No one has yet offered
any
>suggestions that work. There are at least 2 other requests in here for
the
>exact same help. Good luck.
>
>
>"rob" <EvolutionComputing@hotmail.com> wrote:
>>
>>I'm having a bit of a problem generating tables using XML & XSL. I get
>my
>>XML from the ADO 2.5 recordset and I'm trying to generate an HTML table.
>> Everything works fine except, empty when the recordset returns null values
>>in the result set. This means that my <TD> elements are generate as <TD></TD>
>>and so don't appear with cell borders in the browser. I think I need at
>>least a non-breaking space between the cell but my XSL parser (MS DOM)
complains.
>> Does any know how to get XSL to insert a
>>
>>Thanks
>>
>>rob.
>
-
Re: XML & XSL = HTML (well sort of)
already dealt with check out
http://news.devx.com/cgi-bin/dnewswe...md_related.y=8
Sean
"Ken Myers" <Ken.Myers@Frontstep.com> wrote:
>
>I've been struggling with the same issue myself. No one has yet offered
any
>suggestions that work. There are at least 2 other requests in here for
the
>exact same help. Good luck.
>
>
>"rob" <EvolutionComputing@hotmail.com> wrote:
>>
>>I'm having a bit of a problem generating tables using XML & XSL. I get
>my
>>XML from the ADO 2.5 recordset and I'm trying to generate an HTML table.
>> Everything works fine except, empty when the recordset returns null values
>>in the result set. This means that my <TD> elements are generate as <TD></TD>
>>and so don't appear with cell borders in the browser. I think I need at
>>least a non-breaking space between the cell but my XSL parser (MS DOM)
complains.
>> Does any know how to get XSL to insert a
>>
>>Thanks
>>
>>rob.
>
-
Re: XML & XSL = HTML (well sort of)
You may even check for empty elements within the XSL and insert optional cahracters
(e.g. "-") when it is empty
Here's an example that works with the msxml 1.0 spec. Be aware that some
commands are different when using the 3.0 (no "when match" but "if" etc.)
Fieldname is the Tag to check for.
<xsl:choose>
<xsl:when match=".[Fieldname!=' ']">
<TD><FONT FACE="Arial" SIZE="1"><xsl:value-of select="Fieldname"/>
</FONT></TD>
</xsl:when>
<xsl therwise>
<TD><FONT FACE="Arial" SIZE="1">-</FONT></TD>
</xsl therwise>
</xsl:choose>
Hope this helps
Martin
"Ken Myers" <Ken.Myers@Frontstep.com> wrote:
>
>I've been struggling with the same issue myself. No one has yet offered
any
>suggestions that work. There are at least 2 other requests in here for
the
>exact same help. Good luck.
>
>
>"rob" <EvolutionComputing@hotmail.com> wrote:
>>
>>I'm having a bit of a problem generating tables using XML & XSL. I get
>my
>>XML from the ADO 2.5 recordset and I'm trying to generate an HTML table.
>> Everything works fine except, empty when the recordset returns null values
>>in the result set. This means that my <TD> elements are generate as <TD></TD>
>>and so don't appear with cell borders in the browser. I think I need at
>>least a non-breaking space between the cell but my XSL parser (MS DOM)
complains.
>> Does any know how to get XSL to insert a
>>
>>Thanks
>>
>>rob.
>
-
Re: XML & XSL = HTML (well sort of)
>> Does any know how to get XSL to insert a non-blank space?
Instead of instinctively trying to use
(which won't work because you have no entity declaration
for nbsp), use the code  
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|