Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I understand correctly, you are thinking about the UI needed to create the xslt you need. I'm making an assumption that this is a web based application. One approach would be to use xslt that renders the input xml as html (the one I tend to use is <a href="http://www2.informatik.hu-berlin.de/~obecker/XSLT/" rel="nofollow noreferrer">xmlverbatim</a>). You could modify this xslt to create links to nodes. Additionally, you could use some xslt to generate the xpath for that element and make this part of the link. I use this (posted by Jeni Tennison to the XSL-List years ago)</p> <pre><code> &lt;xsl:for-each select="ancestor-or-self::*"&gt; &lt;xsl:text /&gt;/&lt;xsl:value-of select="name()" /&gt; &lt;xsl:text /&gt;[&lt;xsl:number /&gt;]&lt;xsl:text /&gt; &lt;/xsl:for-each&gt; </code></pre> <p>Having done that you would have a visual rendering of the xml (rather like the views given by MSIE and Firefox) but with additional links back to your application. Your users could then select the nodes of interest. They have then provided you with the xpaths you need without having to actually write it themselves.</p> <p>Generating the xslt if you have the xpaths is considerably easier. Tomalek's suggestion above seems a valid way. If you don't actually need xml as the final output, you might be better simply using an xml parser that allows you select nodes given an xpath.</p> <p>This would become more complex if the information you are receiving contains an arbitrary number of records of course. If this is the case you could use a multi-stage approach and use the technique I've roughed out above to extract a record from the input and then use the approach to identify the individual fields within the record.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload