Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: xml in, xml out

From: Wendell Piez <wapiez@---------------->
To:
Date: 6/1/2000 1:34:00 PM
Toby--

Also, in the XSLT spec 7.5, there's a template-driven identity transform
you could borrow (if you need something less straightforward than Mike's
elegant solution below). It's what you would adapt if you needed to provide
for some exception to your mimicking ("mimic all but the x elements...").

I'm not copying it in since I'm assuming all the list readers have a copy
of the XSLT Recommendation on their desks -- it's not such a huge document,
nor so difficult as all that. (Get XPath while you're at it. :-)

Looking at 7.5 also illuminates a point we came across last week -- that
attributes are disinherited, not being the children of their parents.
Notice that the identity transform must specify

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

to get the attributes into the result tree. Otherwise, they would not be
processed (the default is, only recognized child elements -- select="*" --
get invited to the wedding).

Just in case:
http://www.w3.org/TR/xslt
http://www.w3.org/TR/xpath

Enjoy,
Wendell

At 12:48 PM 6/1/00 +0100, Mike wrote:
>> wanted:
>> an xsl stylesheet that mimics/recreates the xml it receives as input.>
><xsl:template match="/">
>   <xsl:copy-of select="."/>
></xsl:template>
>
>Mike Kay
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>

======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent