Trouble with xsl and html

  • Thread starter =?ISO-8859-1?Q?Oll=A1maX=21?=
  • Start date
?

=?ISO-8859-1?Q?Oll=A1maX=21?=

Hi, all you fine people!

I have this xml -file, which roughly looks like this:
<categories>
<category name = "009478">
<name>009478</name>
<description xml:lang = "fi-FI">writing paper
14-11-15-00</description>
<display-name xml:lang =
"fi-FI">kirjoituspaperit</display-name>
<parent refid = "thvD" name = "009074"/>
<custom-attribute>
<custom-attribute name = "level" dt =
"int">4</custom-attribute>
</custom-attribute>
</category>
</categories>

I'm trying to sew an xsl -stylesheet to produce a html page. I can use 'xt'
as a

parser.


Question is this:
In the xml file, on line #8 there is an element 'custom-attribute'.
What should I do with this attribute, if I wanted to be able to define the
amount of indent of the corresponding element in the html-file?
This value is an integer between 1-6, and if it is 4,5 or 6 it will be used
to
tell how much the category should be indented.(and/or if it's 3 or less it
should be indented only a little bit...)

In html-file it should look like this:

This would be an element, whose custom-attribute is 3 or less
This would be an element, whose custom-attribute is 4
This would be an element, whose custom-attribute is 5
This would be an element, whose custom-attribute is 4
This would be an element, whose custom-attribute is
6
This would be an element, whose custom-attribute is 4
This would be an element, whose custom-attribute is 5


I would like to use css, because the file might be delivered via an
application
that doesn't usually require JS.

Any ideas, anyone?

Oll¡maX!
 
J

Jukka K. Korpela

Oll¡maX! said:
Hi, all you fine people!

You had posted to one group (alt.html) and set followups to another
(comp.text.xml). That's very bad Usenet behavior. The good people in
the other group will only see the replies.

Not surprisingly, the problem was probably off-topic for both groups.
You effectively asked how to indent in HTML. The short answer is that
you don't. Try reformulating your question, and selecting _a_ group for
it, and writing a descriptive Subject line. Hint: How should the
document content be spoken? That's often a useful clue for deciding
what the logical structure of the data is, as opposite to possible
visual renderings.

I would have reported your mistake in private E-mail, but your E-mail
address is forged (nonexistent TLD).
 
O

OllimaX

Hi!
I did notice very soon that there was something wrong in my question -
again, and that it was only a matter of time befoe somebody tells me that.

Anyway, thank's for your advice, Jukka. I will find a more exact way to
describe my problem.

Have a nice weekend!

Oll¡maX!

(e-mail address removed) is the real address.(I guess I will be spammed anyway
no matter did I spoil my address or not)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,575
Members
47,207
Latest member
HelenaCani

Latest Threads

Top