A
Adam Wasi
Hi all
This is what I have in mind and I will appreciate any suggestions.
I am trying to create a xml help system for my application. The schema of
the xml file will be
<helpsystem>
<help id="unique id">
<text>text data</text>
<link
href="optional tag which will hold a reference to a uri"
helpanchor="this is also a optional attribute which will point
to a helpid in the same document or a different document"
helpanchorhtmlfile=" this attribute will only be present if the
helpachor attribute is there and basically will include a html file name"
(any number of help tags)
</helpsystem>
At runtime this xml will be read and it will be transform to html. Each help
tag will become a html table and each child of the help tag will become a
row for the html table.
The link tag will either have href attribute or helpanchor attribute but not
both. The link tag trasform to a html <a> tag. The href attribute of the
link tag transform to the href attribute of <a>and the <link> text becomes
the text for the <a> tag. When the helpanchorhtmlfile attribute is present,
the href attribute of <a> will hold the reference given by this tag.
All this is very easy( have already written the xsl stylesheet for it) when
the link tag has the attribute href. My difficulty comes when the link tag
has helpanchor attribute because for this attribute I have to generate a
seperate html file with the name given in the helpanchorhtmlfile attribute.
Since the help id which the helpanchor is pointing itself could have any
number of link, I have to build html files for any number of nested levels.
In a traditional programming I would have accomplish this task using
recursion but how can I do this using xsl. If any of you have any
suggestions please let me know and I will greatly appreciate your help.
Rafia Tapia
This is what I have in mind and I will appreciate any suggestions.
I am trying to create a xml help system for my application. The schema of
the xml file will be
<helpsystem>
<help id="unique id">
<text>text data</text>
<link
href="optional tag which will hold a reference to a uri"
helpanchor="this is also a optional attribute which will point
to a helpid in the same document or a different document"
helpanchorhtmlfile=" this attribute will only be present if the
helpachor attribute is there and basically will include a html file name"
</help>some text data </link>
(any number of help tags)
</helpsystem>
At runtime this xml will be read and it will be transform to html. Each help
tag will become a html table and each child of the help tag will become a
row for the html table.
The link tag will either have href attribute or helpanchor attribute but not
both. The link tag trasform to a html <a> tag. The href attribute of the
link tag transform to the href attribute of <a>and the <link> text becomes
the text for the <a> tag. When the helpanchorhtmlfile attribute is present,
the href attribute of <a> will hold the reference given by this tag.
All this is very easy( have already written the xsl stylesheet for it) when
the link tag has the attribute href. My difficulty comes when the link tag
has helpanchor attribute because for this attribute I have to generate a
seperate html file with the name given in the helpanchorhtmlfile attribute.
Since the help id which the helpanchor is pointing itself could have any
number of link, I have to build html files for any number of nested levels.
In a traditional programming I would have accomplish this task using
recursion but how can I do this using xsl. If any of you have any
suggestions please let me know and I will greatly appreciate your help.
Rafia Tapia