[xep-support] Generating Log Entries From Within XEP

Alexander Peshkov peshkov at renderx.com
Mon May 23 00:54:52 PDT 2005


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 at 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 at 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 at renderx.com
>> RenderX
>>
>>
>> -------------------
>> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>> in the body of the message to majordomo at 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 at 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



More information about the Xep-support mailing list