Re[2]: [xep-support] Generating Log Entries From Within XEP

From: Alexander Peshkov <peshkov@renderx.com>
Date: Mon May 23 2005 - 00:54:52 PDT

Hello David, Brian,

Just want to make it clear. David's suggestion refers to the XSLT
transformation. However the original question (as far as I understand
Brian's posting) referred to the XSL-FO rendering (in particular to
the page numbers produced by formatter). XSL-FO rendering stage is
completely independent from XSLT and there is no "tags" you can place
in XSL-FO to make formatter produce special log messages. That's why
I'm saying "no".
Still we need more input from Brian to make further suggestions.

Best regards,
Alexander Peshkov mailto:peshkov@renderx.com
RenderX

DP> The longer answer is "yes."

DP> Use <xsl:message> to send output to the standard error path. Capture the
DP> path and parse it for the information you seek (you may find it helpful to
DP> preface your log items with text such as "--->LOG::" so that they are very
DP> easy to identify.)

DP> Here, for instance, is a means of logging unknown XML tags. Place this at
DP> the very end of an XSL template file, and it'll capture everything that
DP> "fell through" all the possible matches. It spits out a message to
DP> standard error out, identifying the unknown tag, its parent path, and its
DP> value.

DP> <xsl:template match="*">
DP> <xsl:message>
DP> <xsl:value-of select="name(.)" />
DP> <xsl:text> encountered</xsl:text>
DP> <xsl:if test="parent::*">
DP> <xsl:text> in </xsl:text>
DP> <xsl:value-of select="name(parent::*)" />
DP> </xsl:if>
DP> <xsl:text>, but no template matches.</xsl:text>
DP> </xsl:message>
DP> <!-- highlight in red in the output -->
DP> <fo:block >
DP> <xsl:text>&lt;</xsl:text>
DP> <xsl:value-of select="name(.)" />
DP> <xsl:text>&gt;</xsl:text>
DP> <xsl:apply-templates />
DP> <xsl:text>&lt;/</xsl:text>
DP> <xsl:value-of select="name(.)" />
DP> <xsl:text>&gt;</xsl:text>
DP> </fo:block>
DP> </xsl:template>

DP> On Fri, 20 May 2005 05:30:56 -0700, Alexander Peshkov
DP> <peshkov@renderx.com> wrote:

>> Hello Brian,
>>
>> BJB> Is it possible to generate log entries by placing tags in the XSL-FO
>> BJB> file?
>>
>> The short answer is "no".
>>
>> BJB> I want to log item identifiers and page numbers to be used by
>> BJB> external programs. I know I can achieve something similar by using
>> page
>> BJB> citations and creating a separate flow at the end of my document.
>> BJB> However, I would prefer to keep the item/page list external to the
>> document.
>>
>> Hm, I cannot quite grasp what are you trying to do. Could you please
>> describe your goal and requirements in more details? I have a vague
>> feeling that processing of XEP intermediate format is what you are
>> looking for.
>>
>> Best regards,
>> Alexander Peshkov mailto:peshkov@renderx.com
>> RenderX
>>
>>
>> -------------------
>> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>> in the body of the message to majordomo@renderx.com from the address
>> you are subscribed from.
>> (*) By using the Service, you expressly agree to these Terms of Service
>> http://www.renderx.com/tos.html
>>

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
Received on Mon May 23 01:27:33 2005

This archive was generated by hypermail 2.1.8 : Mon May 23 2005 - 01:27:35 PDT