473,382 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

XSL Display Attributes

Q) How to display table attributes in XSLT?

Solution applied -->
have a table s0Test1 attached to a class s0Test. The table has 4-5 attributes. I want to display them in HTML. I used:

Expand|Select|Wrap|Line Numbers
  1. <xsl:template match="DBE:Object" mode="s0Test"> 
  2.   <table>
  3.     <tr>Test1</tr>
  4.     <tr>
  5.       <td><font size="2">*<xsl:apply-templates select="DBE:Attribute[@name='s0Test1']"/></font></td>
  6.     </tr>
  7.   </table>    
  8. </xsl:template>
Please let me know how should I go ahead to display the attributes?
Sep 14 '09 #1
5 3205
Dormilich
8,658 Expert Mod 8TB
@prao2005
how else will you get the solution?

nevermind. to get an unknow amount of attributes use the attribute axis.
Sep 14 '09 #2
Here the problem is that
class "s0Test" contains an attribute "s0Test1" which itself is a table
and has 4-5 attributes. I want to show child's child attributes.

At present i am unable to show it using the above mentioned code.
Sep 14 '09 #3
Dormilich
8,658 Expert Mod 8TB
@prao2005
that’s impossible, attribute values may only be strings (or numbers).
Sep 14 '09 #4
Suppose for eg. to display the below, what code can suffice in xsl?
s0ShipToTable might contain 25-30 rows.

Expand|Select|Wrap|Line Numbers
  1. <DBE: Attribute name=”s0ShipToTable” type=”Table”>
  2.       <DBE: Table>
  3.             <DBE: TableHeader>
  4.                   <DBE: TableColumn>…</DBE: TableColumn>
  5.                   <DBE: TableColumn>…</DBE: TableColumn>
  6.                   <DBE: TableColumn>…</DBE: TableColumn>
  7.                   <DBE: TableColumn>…</DBE: TableColumn>
  8.                  …
  9.             </DBE: TableHeader>
  10.             <DBE: TableRow>
  11.                   <DBE: TableData>…</DBE: TableData>
  12.                   <DBE: TableData>…</DBE: TableData>
  13.                   <DBE: TableData>…</DBE: TableData>
  14.                   <DBE: TableData>…</DBE: TableData>
  15.                   …
  16.             </DBE: TableRow>
  17.             <DBE: TableRow>
  18.                   <DBE: TableData>…</DBE: TableData>
  19.                   <DBE: TableData>…</DBE: TableData>
  20.                   <DBE: TableData>…</DBE: TableData>
  21.                   <DBE: TableData>…</DBE: TableData>
  22.                   …
  23.             </DBE: TableRow>
  24.             <DBE: TableRow>
  25.                   <DBE: TableData>…</DBE: TableData>
  26.                   <DBE: TableData>…</DBE: TableData>
  27.                   <DBE: TableData>…</DBE: TableData>
  28.                   <DBE: TableData>…</DBE: TableData>
  29.                   …
  30.             </DBE: TableRow>
  31.             …
  32.  
  33.       </DBE: Table>
  34. </DBE: Attribute>
Sep 15 '09 #5
Dormilich
8,658 Expert Mod 8TB
display what thereof how? best is you make an example of how your output shall look like and map that to the input. this should make clear, what to do.

PS. please use [CODE] [/CODE] tags when posting code.
Sep 15 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Raphael A. Bauer | last post by:
Hi, I am just using this Java code: ---------- //Read it => automatically converts it to UTF-8 DocumentBuilderFactory factory = DocumentBuilderFactory .newInstance(); DocumentBuilder...
13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
10
by: DettCom | last post by:
Hello, I would like to be able to display or hide fields based on whether a specific Yes/No radio button is selected. This is in conjunction with a posting a just made here in the same group...
6
by: Sandman | last post by:
I'm having some problem here... I have a javascript I've downloaded that goes through all PNG files and enables the transparency channel in them for IE5.5+ by converting them to SPAN layers with...
6
by: Developer | last post by:
Hello, I'm experimenting with and XmlTextReader sample, and don't understand how the attributes are being processed. Here's the input: <xsd:element name="AA" type="BB"...
5
by: David Elliott | last post by:
I need a control on a Web Page that can accept an HTML Document and will display it. Any help would be appreciated. Thanks, Dave Here is what I was trying...
2
by: ringo | last post by:
I've come accross an interesting problem populating an asp.net datagrid. I am trying to bind XML data to a datagrid as I've done in countless other applications, the only difference this time being...
0
by: saravanaVijayakumar | last post by:
I'm new to xml .. I had created a application such a way that I have to display the xml file in treeview control in C#.Net Application ... If I select the particular Node it should display the...
5
by: asciz | last post by:
Hi I'm having a problem with an XML file, most likely because of my lack of understanding of XML schemas I have the following XML file: <?xml version="1.0" encoding="ISO-8859-1"?>...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.