[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Transformation Grouping Problem (XSLT 2.0, Saxon-
At 2011-09-16 14:44 +0000, Raymond Lillibridge wrote:
I'm in need of some assistance with group logic using XSLT 2.0. I don't think you need group logic for what you are asking. Given the following sample xml file as input: If you are at the root: book/* except book/level1 If you are at book: * except level1 For instance, I'd like to create an XML result-document that contains only: You don't have mixed content in your paragraphs or titles. If that can be relied upon, then you can generalize the solution to: <xsl:template match="*[*]"> <xsl:result-document ...> <xsl:copy/> <xsl:copy-of select="@*,node() except *[*]"/> </xsl:result-document> <xsl:apply-templates select="*[*]"/> </xsl:template> I hope this helps. . . . . . . . . . . Ken -- Contact us for world-wide XML consulting and instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|