xsl-list
[Top] [All Lists]

RE: More newbie questions

2005-03-22 01:52:02
I tried assigning the value to a variable with
xsl:variable, but the transformation fails. Any help
appreciated...

Show us what you did, and we'll tell you where you went wrong.

You don't really need a variable here: you can get the value by navigation.
Depending where you are when you start, an expression like
ancestor::Response/preceding-sibling::Database/@DatabaseName should do the
trick.

2- How would I create multiple CITY tags in the output
when faced with a response like that in record # 2,
where the value is Toronto, Montreal?  I don't want a
comma separated value in the body of the tag.

XSLT 2.0 has a tokenize() function. The EXSLT library of extensions, and
also the FXSL library, have library routines to do the same job. If you want
to code it yourself in XSLT 1.0, you need to learn how to write recursive
templates.

3- You may have noticed the escaped angle brackets for
the HTML tags in the TEXT tag value. How do I have them
display properly? I played with the output="html" and
the escape attribute to no avail.

It would be better not to generate them like that. Check the options
available for extracting XML from your database.

Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>