Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Simple Sort [Thread Next] Re: Simple SortTo: NULL Date: 5/2/2008 12:43:00 PM Techno_Dex wrote: > I'm not sure I agree with you on the <xsl:copy> issue as when using the > <xsl:copy-of> the element is copied as is from the inport node list to the > output node list and if it were a serializer issue then this would have been > converted over to contain both the start and end tags as well which is not > the case. I am using the simple XslTransform class to perform the > conversion using the .NET 3.5 framework which by default will use the MSXML > 6 parsing engine which doesn't add an end element tag unless an empty value > has been added to the node which is what I suspect the xsl:copy function is > doing. The attributes on this function don't appear to to contain any > formating instructions as well to indicate not adding an empty value to the > element. Is there a way to do a deep copy on the current node() since there > are no children in order to obtain the desired results? I'm assuming I > might have to use a xsl:foreach to obtain this functionality which is not > very generic. Am I missing something on the XslTransform perhaps which will > convert the empty value elements to empty element instead? > > XslTransform xtXslTransform; > xtXslTransform = new XslTransform(); > xtXslTransform.Load(asXSLTPath); > xtXslTransform.Transform(asXMLInputPath, asXMLOutputPath); Note that XslTransform is obsolete since .NET 2.0, you should use XslCompiledTransform instead, unless you have a stylesheet originally run with XslTransform and you have compatibility issues with XslCompiledTransform. And MSXML 6 is a completely different software, it has nothing to do with either XslTransform or XslCompiledTransform. I think with XslCompiledTransform the issue with the Record elements goes away. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
