Referencing inside of an xi:included xml file from debugger

Are you missing a feature? Request its implementation here.
ggorman
Posts: 25
Joined: Mon Aug 01, 2005 10:45 pm

Referencing inside of an xi:included xml file from debugger

Post by ggorman »

When I use <xi:include/> to pick up xml from another file, the debugger doesn't show the source of data. That is, when I click a line in the Output pane, it highlights the xsl line that created that data and it highlights the <xi:include/> statement that points to the xml file that contains the data element referenced for that output.

I use this syntax for instance in my input xml file
<?xml version="1.0" encoding="UTF-8"?>
<top xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="some_clocks_tb.xml" />
<xi:include href="tempRgmVerilogStage1.xml" />
<xi:include href="tempClkArcSynSYNTHESIS.xml" />
</top>

Can we get the debugger to show the line in included file that contains the element referenced? In the meantime, to debug, I copy/paste the included file over the <xi:include/> statement.

GeorgeG
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

That is not possible. Both the Saxon and Xalan transformers report the location inside the main XML input source for all the XML input elements and they are right. They cannot report a location inside an included file because such a location is not always accurate. The process of resolving the XInclude reference enhances the content of the included file so the processed elements are not exactly the same as the included ones. For example resolving the XInclude reference adds the xml:base attribute. If you output the value of the xml:base attribute and click on it in the output view what should be the location in the source XML input which generated that part of the output ?

Create the complete document by applying the following stylesheet on your document

Code: Select all

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:copy-of select="/"/>
</xsl:template>
</xsl:stylesheet>
and debug your stylesheet on the complete document.

Regards,
Sorin
ggorman
Posts: 25
Joined: Mon Aug 01, 2005 10:45 pm

Post by ggorman »

Hi Sorin,

Good explaination. And thanks for the solution. I thought of something like that to replace my copy/paste; but didn't imagine just 5 lines of xsl -- thanks!

GeorgeG
Post Reply