Eric Pement wrote: > file and I'm at a novice level in all of this. So I'd like to build the > .XSL file incrementally, seeing if I can print single tags from the .XML > file, and then successively adding tags until I have a generalized > solution that will work on whatever .XML file we feed it which obeys > the given schema.
That is a sound approach. > Right now, I'm getting an error message, "fo:flow must contain block-level > children", which I don't know what to do with. My input xsl code is this > (with nonessentials removed): > > <fo:flow flow-name="xsl-region-body"> > <xsl:apply-templates select="Title" /> > </fo:flow> > > . . . > > <xsl:template match="[EMAIL PROTECTED]'title_1']"> > <fo:block > font-size="24pt" line-height="28pt" text-align="start" > font-family="Helvetica" font-weight="bold" color="blue" > space-after.optimum="12pt"> > <xsl:value-of select="Title" /> > </fo:block> > </xsl:template> > > I want to insert the value of the <Title> tag if there is a > t_style attribute of "title_1". And as you might guess, later > on if the attribute says "title_2", I select a different font > size, color, and so forth. I'm no XSLT expert, so your approach might be OK. However I would recommend making your template match = "Title", then putting an <xsl:if> inside the template to deal with the difference in attributes, perhaps by pointing to separate templates for the two styles. > I don't know why this error message is occurring, since I think > the "block-level children" are invoked by the match. I would > also like some pointers, web links or ideas on building an > .XSL file in stages, since I seem to be failing even on the > first steps. Thanks in advance. You will benefit first from looking at this page: http://xml.apache.org/fop/running.html#running_xalan By using the xalan script, you can store & later look at the actual FO code that is created by the transformation. This will tell you whether your stylesheet actually did what you intended. Also, check out: http://xml.apache.org/fop/resources.html#specs and http://xml.apache.org/fop/resources.html#articles Victor Mote --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]