[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Mixed content variation

Subject: Mixed content variation
From: "Fox, Michael" <michael.fox@xxxxxxxx>
Date: Fri, 7 Apr 2000 15:59:55 -0500
content variation
How does one identify the text node and some child nodes but not other child
nodes of an element with mixed content?  I cannot formulate an expression
that works or find one in any FAQ.

Here's the situation:
<foo> is an element with mixed content.

It may contain text and/or any number of child elements such as <bar>,
<bob>, <betty>, and <date>

Text and children may appear in any sequence except that when <date> is
present, it is always last.

Examples

<foo>some text
<bar>some different kind of text</bar>
</foo>

<foo>
<bob>blah, blah, blah</bob>
<date>1975</date>
</foo> 

Objective:

1.  Select the text node and all child nodes of <foo> except for the <date>
child

2.  if  <date>  is present, then
 
3.  insert a comma and a space with <xsl:text>

4.  select the child <date>

This would result in something like

Galley proofs of The Great Gatsby, 1932. 

Numbers 2, 3, and 4 are easy.   Number 1 has me stumped.

Any suggestions would be appreciated.


Michael

Michael Fox
Acting Assistant Director for Library and Archives
Minnesota Historical Society
345 Kellogg Blvd West
St. Paul MN 55102-1906
phone: 651-296-1014
fax:  651-296-9961
michael.fox@xxxxxxxx


		


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.