|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] AW: can't display heading in between fields...pls. hel
John,
it's hard to help you without knowing the relevant structure of your
XML input, and all relevant parts of your style sheet.
1.
So I have to guess for the Input XML:
- your XML tree contains only one <HSDataContainerType name="Inputs">
- your XML tree contains only one <HSDataContainerType name="Outputs">
- "Inputs" and "Outputs" are siblings, at least not contained in each other
The XML part you posted in one of your recent mails contained only one
"Outputs" and no "Inputs", so I can't tell, if the above is true.
If it is true then it should be very simple to do.
2.
For your XSL, I guess:
What you are trying to do is:
For every field type <HSString>, <HSDecimal>, <HSInteger>, etc.:
- write a template which outputs the field properties.
- if it is the first "Inputs" or "Outputs" field, regardless of the type,
print the {In|Out}put Descriptions heading.
This seems to be a complicated solution to me. You have to copy
(or call) the code to do this in every type's template.
Better:
Your stylesheet contains some code which looks roughly like:
<xsl:apply-templates select="HSDataContainerType"/>
and which is responsible for processing the "Inputs" and "Outputs"
Container Types. How does it look like in your stylesheet?
(i.e. there may be a mode attribute)
If you found it, change it to (roughly:)
<h5><a name="in">Input Description</a></h5>
<xsl:apply-templates select="HSDataContainerType[@name='Inputs']"/>
<h5><a name="out">Output Description</a></h5>
<xsl:apply-templates select="HSDataContainerType[@name='Outputs']"/>
You can use your tests "[contains(@name, 'Inputs')]" if nescessary.
You may also output the description headings only if there exist at least
input/output field, resp. The easiest way to do this is write templates for
HSDataContainerType[@name='***puts'] and put the heading there,
but you may also do a simple
<xsl:if test="HSDataContainerType[@name='***puts']"> around the above.
The logic behind is:
"Find the part in your XML input which corresponds to the
wanted description heading on HTML output."
This is not the first "Input" field.
It is the <HSDataContainerType name="Inputs"> element.
Hope this helps. I fear that I can't help you more without exact
knowledge of your XML structure (see [1.] above) and all relevant parts
of your stylesheet (not only the templates but also how they are
applied or called).
Regards,
Markus
__________________________
Markus Abt
Comet Computer GmbH
http://www.comet.de
----------
Von: John Liebermann
Gesendet: Mittwoch, 16. Juli 2003 23:19
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: can't display heading in between fields...pls. help
[...]
The highlighted 'Output Description' above is displayed during all times
where there is a <HSString> which has an ancestor 'Output'. I want this to
be displayed ONLY once.
So, what i can't figure out is how to be able to display a heading in
between the descriptions (as marked on the output above). Thank you all for
your help.
Regards,
John
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








