[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: display parts of XML tree with xsl:copy ?
Hi Robert, > But unfortunately I forgat to mention that I need a generic solution. > > I cannot include e.g. an extra template for issue because I do not > know the complete supertree. This XSL should generally work with > nearly all kinds of XML docs. Maybe I forgat also to mention that > this is part of an XML Wrapper program which submit standardized > queries to heterogenious XML sources. An attched source description > helps to map to query to xslt, but i definitivly don't want the uses > to note there that the (e.g. issue supertree) must be traversed and > how. This shouldn't be a problem, but I need to understand more about what you're aiming for. Do you think you could give a bit more detail about what you want this generic solution to do? Obviously you've got a source document that contains some data, which contains nested structures - you want this to work with all XML documents, so the names of the elements in that document don't matter, and the structure might change from XML document to XML document. You must have some way of indicating the nodes that you want to pull out from the source document - how do you intend, or want, to do that? Do you want a general stylesheet that you import into a more specific stylesheet that selects the nodes you want to retain? How does the stylesheet that you want help with fit into the bigger picture of what you're doing? Finally, there's the question of what you want from the result. You want the selected nodes, obviously; I think that you want their ancestors as well; and it seems like you want certain other nodes in addition. How can you tell which nodes you want and which you don't? In the example you gave, what's special about the volume and number elements? Is it that they're children of an ancestor *and* don't have child elements themselves? In the general case, what are the characteristics of the nodes that you want to copy as opposed to those that you want to ignore? If you can describe what you want, I'm sure that we can help you achieve it. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|