[XML4Lib] straight xml dump

Jon Gorman jonathan.gorman at gmail.com
Thu Aug 7 12:17:37 EDT 2008


Use the Identity transformation and only the identity transformation...

>From the XSLT faq (http://www.dpawson.co.uk/xsl/sect2/identity.html)


f you base your stylesheet on the identity template rule

 <xsl:template match="node()|@*">
   <xsl:copy>
   <xsl:apply-templates select="@*"/>
   <xsl:apply-templates/>
   </xsl:copy>
 </xsl:template>

Then you can define any special processing in additional templates, e.g.

 <xsl:template match="@fred">
   <xsl:attribute name="bill">
   <xsl:value-of select="."/>
   </xsl:attribute>
</xsl:template>


On Thu, Aug 7, 2008 at 7:47 AM, Eric Lease Morgan <emorgan at nd.edu> wrote:
>
> How can I get a straight XML dump from my Google Appliance? Use some
> incantation of xsl:copy or xsl:copy-of?
>
> We have a Google Appliance here at Notre Dame. It slices. It dices. It makes
> French toast. It works just fine.
>
> To get output the Appliance searches its local index, creates some flavor of
> XML, transforms the XML with a stylesheet under my control, and ultimately
> returns (poorly formed) HTML. But the default stylesheet that comes with the
> Appliance is overly complicated. You might say it is Baroque.
>
> Is there a way I can write a very short XSLT file that simply takes the
> Appliance's XML input and copies it to output. Once I get this raw dump of
> the Appliance's XML I can see the structure of the file and possibility
> create a more streamlined XSLT file for display.
>
> --
> Eric Lease Morgan
> University of Notre Dame
>
>
>
> _______________________________________________
> XML4Lib mailing list
> XML4Lib at webjunction.org
> http://lists.webjunction.org/mailman/listinfo/xml4lib
>
>




More information about the XML4Lib mailing list