[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Combining XSL with DTDs
Lisa-- So far so good. BUT... At 06:44 PM 2/11/00 -0700, you wrote: >I'm still confused here. I though I had done that like in the following: > ><font size="2" face="Georgia, Times New Roman, Times, serif" color="#000000"> ><xsl:for-each select="AddressLine2" /> ></font> Here, something like <xsl:for-each select="OE/AddressOERole/AddressLine2"> <xsl:apply-templates/> </xsl:for-each> Would likely work better. It: * selects the nodes you are targetting relative to the context node (in this case, the root node), through an XPath expression, and * applies templates for each of the child nodes of the selected nodes (which happen to be text nodes processed by the default template -- which you may have to include explicitly if you are using IE, one of several IE traps!) >and > >-<td width="134"> >-<p> > <font size="2" face="Georgia, Times New Roman, Times, serif" >color="#000000"> ><xsl:value-of select="AccountName" /> ></font> ></p> ></td> In this case, <xsl:value-of select="OE/AccountOERole/AccountName"/> would do it. Again, the node is selected relative to a context node (still your root node). If I've botched it and the root is not your context node, alter your select attribute values accordingly. This is pretty basic XPath stuff, and it's somewhat difficult to get you on track on the list, mainly because there come to be larger stylesheet design issues (viz.: writing everything relative to the root node template is not always the best approach) that, in turn, are based on a core understanding of the way templates work. Keep working with this and with the resources, and you should come to an "Aha!" point -- then it will all make sense and be much easier. If you have further questions, why don't we take them off list? A good look at E.R. Harold's chapter on XSL at http://metalab.unc.edu/xml/books/bible/updates/14.html (from his XML Bible, also recommended) might be helpful to you and any other readers who are still mystified by this. -- Wendell ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== 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
|