pe3no@N05PAM.o2.pl wrote:
Quote:
Hi,
>
First of all - sorry for my silly question and the horribly strange way
of using XML by me - I'm an XML n00b :) :) :)
|
We all have to start somewhere.
Quote:
I'm trying to write a short guide - putting everything in one file.xml
>
<guide_name>
<element name = "1-prerequisites">
1.1. download iso file
1.2. burn the boot-disk
1.3. boot the pc
</element>
<element name = "2-installation">
2.1. type "install"
2.2. choose your language
2.3. install packages...
</element>
</guide_name>
|
Don't do this. First, give your markup meaningful names. "element" is
unfortunately difficult, because an element type called "element" is
just going to confuse everyone. Second, whenever you have something that
repeats, put it in an element. Linebreaks are not significant in XML:
they are equivalent to spaces: this is why you lose the distinction.
In any case, never encode numbering schemes in the text unless you are
tryin g to do something like make a transcription of an existing text.
Always let the system generate them for you.
Quote:
|
I've been googling for 2 hour and can't find the answer :(
|
Nor will you. Google isn't the right tool for answering this kind of
question.
Don't even think about it. Try something like this instead.
<guide_name>
<procedure name="prerequisites">
<step>download iso file</step>
<step>burn the boot-disk</step>
<step>boot the pc</step>
</procedure>
<procedure name="installation">
<step>type <command>install</command></step>
<step>choose your language</step>
<step>install packages…</step>
</procedure>
</guide_name>
Then use a stylesheet language to add the numbering. That way, if you
change things or move them around, the numbering will auto-adjust.
///Peter
--
XML FAQ:
http://xml.silmaril.ie/