473,386 Members | 1,803 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,386 software developers and data experts.

how can I add next line?

Hi all,

I'm creating a table and need to add few lines in a row. But I can not
find which syntax I have to use.

For instance, I have this string,

<ItemDef OID = "Automobile" Name = "Sedan" def:Label = "Car Size"
DataType = "text" Length = "20" Comment = "Camry Accord Azera
Maxima">
</ItemDef>

and this will output in a table (in a cell) as

Camry Accord Azera Maxima
But now I want the comment to output in a cell as

Carmy
Accord
Azera
Maxima

Is there any syntax to return the value within a cell or a row?

Thank you.

Nov 10 '08 #1
11 3048
qwerty007 wrote:
Hi all,

I'm creating a table and need to add few lines in a row. But I can not
find which syntax I have to use.

For instance, I have this string,

<ItemDef OID = "Automobile" Name = "Sedan" def:Label = "Car Size"
DataType = "text" Length = "20" Comment = "Camry Accord Azera
Maxima">
</ItemDef>

and this will output in a table (in a cell) as

Camry Accord Azera Maxima
But now I want the comment to output in a cell as

Carmy
Accord
Azera
Maxima

Is there any syntax to return the value within a cell or a row?
What kind of cell is that? A HTML table cell? How do you generate the
HTML table cell, with XSLT? Is that XSLT 1.0 or 2.0? With 2.0 you can
easily do e.g.
<td>
<xsl:for-each select="tokenize(@Comment, '\s+')">
<xsl:value-of select="."/>
<xsl:if test="position() != last()">
<br/>
</xsl:if>
</xsl:for-each>
</td>
--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 10 '08 #2
Thank you for your fast reply.

To answer your question, I'm using XSLT 1.0. What I use if pure XML
code with .css and .xsl. I don't use HTML at all. My purpose is to
report data from Excel files. But when I import data from Excel, and
put them into a table defined in .xsl from CDISC (http://cdisc.org/
standards/index.html)

In my excel file, I have a COMMENT column for the data. At the comment
cell for each date, I put a sentence or lines of data. I think there
may be a syntax to line break so that list of data comes out like

Carmy
Accord
Azera
Maxima

instead of

Camry Accord Azera Maxima

Thank you.
Nov 10 '08 #3
I should say, "how should I line break within the quotation mark?"
Nov 10 '08 #4
qwerty007 wrote:
To answer your question, I'm using XSLT 1.0. What I use if pure XML
code with .css and .xsl. I don't use HTML at all.

Well if you use XSLT to transform XML to HTML then you do use HTML. Or
do you use XSLT to transform XML to XML? What is the target XML format?
To suggest how to introduce line breaks we need to know.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 11 '08 #5
Thanks Martin,

I'm using XSLT to trasform XML to XML. I have this excel file
containing specifications of SAS coding. When I submit this to my
client, I have to submit in .xml so they can read it from Internet
Explorer. But my client want me to follow the styles (.XLT, .CSS) from
CDISC

(http://cdisc.org/standards/index.html)

I'm adding comments how some date variables were derived from date-
month-year. As a child attribute, I have DADTC as a date variable. If
I use following code for the table (table is specified by XLT and
CSS), Comment will be out as ||STDTD STDTM STDMY|| in the column.

<ItemDef OID = "DADTC" Name = "DADTC" Comment = "STDTD STDTM STDMY"></
ItemDef>

But I need to make it as
|STDTD |
|STDTM |
|STDMY |

in the comment column. So what I assuming is that there might be a
syntax that I can put within the quotation mark to break lines. That
was what I was asking. Is it clearer now?

Thanks in advance.
Nov 11 '08 #6
Sorry. Not XTL above, but XSL.
Nov 11 '08 #7
qwerty007 schrieb:
To answer your question, I'm using XSLT 1.0. What I use if pure XML
code with .css and .xsl. I don't use HTML at all.
So what sort of "tables" and "columns" are you talking about?
My purpose is to
report data from Excel files. But when I import data from Excel, and
put them into a table defined in .xsl from CDISC (http://cdisc.org/
standards/index.html)
Where exatly on this web site is the .xsl defining the table you're
talking about? The resources linked from the one you provided the URL
for seem to be either HTML, PDF or spreadsheet resources, not
transformation style sheets.

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Nov 11 '08 #8
qwerty007 wrote:
Here is the link of xsl.

http://www.cdisc.org/models/def/v1.0/define1-0-0.xsl
That stylesheet has
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"
indent="yes"/>
so it transforms XML to HTML 4.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 11 '08 #10
Oh, Thanks. Since it's my first time making XML upon the client's
request, I'm teaching myself for now.

Then is there no way to break line within quotation marks?

<ItemDef OID = "DADTC" Name = "DADTC" Comment = "STDTD STDTM
STDMY"></
ItemDef>

So output comes out as following instead of output in series within a
column(ex. |STDTD STDTM STDMY|)?

|STDTD |
|STDTM |
|STDMY |
Nov 11 '08 #11
qwerty007 schrieb:
Oh, Thanks. Since it's my first time making XML upon the client's
request, I'm teaching myself for now.

Then is there no way to break line within quotation marks?

<ItemDef OID = "DADTC" Name = "DADTC" Comment = "STDTD STDTM
STDMY"></
ItemDef>

So output comes out as following instead of output in series within a
column(ex. |STDTD STDTM STDMY|)?

|STDTD |
|STDTM |
|STDMY |
If you use <http://www.cdisc.org/models/def/v1.0/define1-0-0.xsl>, the
result will be something like

<td>STDTD STDTM STDMY</td>

Browsers will apply normal line-wrapping behaviour. So this will
probably rendered

|STDTD STDTM STDMY|

or

|STDTD |
|STDTM |
|STDMY |

depending on the width of the table cell.

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Nov 12 '08 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Kiteman - Canada | last post by:
I have the following: a form called Form1 an image called Image1 twelve lines that have been drawn and superimposed on the image I wish to have a command button that will toggle the lines on...
19
by: les_ander | last post by:
Hi, suppose I am reading lines from a file or stdin. I want to just "peek" in to the next line, and if it starts with a special character I want to break out of a for loop, other wise I want to...
2
by: Bengt Richter | last post by:
Is this a well known bug that's been fixed? I couldn't find any discussion of it, but maybe my googling's off today ;-/ >>> def foo(): ... it = iter(range(10)) ... while True: ... ...
1
by: Rocketman | last post by:
I am trying to find out when i reach the next line when multiline is switched on and i DON'T PRESS ENTER TO GO TO THE NEXT LINE(lines method is there for that purpose). Is there any other method i...
11
by: Neo Geshel | last post by:
I have an Access DB, from which I am going to pull images. Each image has an associated ID, but the ID's are not necessarily sequential (some images may have been deleted, leaving gaps in the list...
13
by: Joseph Garvin | last post by:
When I first came to Python I did a lot of C style loops like this: for i in range(len(myarray)): print myarray Obviously the more pythonic way is: for i in my array: print i
7
by: fniles | last post by:
In VB 6.0 in the error trapping, we can do "resume next" to continue on the next code. How can we do that in .NET with "Try", "Catch","End Try" ? Thanks
6
by: Jacob Rael | last post by:
Hello, I have a simple script to parse a text file (a visual basic program) and convert key parts to tcl. Since I am only working on specific sections and I need it quick, I decided not to...
22
by: ashkaan57 | last post by:
Hi, I am trying to put text on left and right side of the page and used: <div> <span>blah blah</span> <span style="float:right">blah blah</span> </div> The 2nd text does go to the right but the...
0
by: Semajthewise | last post by:
Hi all. I'm starting on my next part of my teach myself vb program. What I am trying to do is on button click open a textfile showing the math as it would be done long hand. I started writing the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.