Hi there,
I once asked this in an older thread, but the answer I got was "maybe" - it would be good to know for sure what version of XSLT the XML preview function supports. My xls file works nicely with Saxon, but Studio throws an error.
Daniel

Hi there,
I once asked this in an older thread, but the answer I got was "maybe" - it would be good to know for sure what version of XSLT the XML preview function supports. My xls file works nicely with Saxon, but Studio throws an error.
Daniel
<SDLErrorDetails time="07/12/2021 14:59:40"> <ErrorMessage>An error occurred when applying the stylesheet to the XML file</ErrorMessage> <Exception> <Type>Sdl.FileTypeSupport.Framework.FileTypeSupportException, Sdl.FileTypeSupport.Framework.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888</Type> <HelpLink /> <Source>Sdl.FileTypeSupport.Filters.Xml_2</Source> <HResult>-2146233088</HResult> <StackTrace><![CDATA[ at Sdl.FileTypeSupport.Filters.Xml.Preview.Common.PreviewXsltTransformation.Transform(String directoryPath, String xmlContent, String transformationPath, String outputFilePath, XsltArgumentList transformArguments, DtdProcessing dtdProcessing) at Sdl.FileTypeSupport.Filters.Xml.Preview.XmlPreviewFileTweaker`1.Transform(INativeOutputFileProperties outputFileProperties, String transformPath) at Sdl.FileTypeSupport.Filters.Xml.Preview.XmlPreviewFileTweaker`1.Tweak(INativeOutputFileProperties outputFileProperties) at Sdl.FileTypeSupport.Framework.Core.Utilities.NativeApi.AbstractFilePostTweaker.TweakFilePostWriting(INativeOutputFileProperties outputFileProperties) at Sdl.FileTypeSupport.Framework.Integration.FileGenerator.ExecuteTweakers(PostGenerationMessageReporterAdapter messageAdapter) at Sdl.FileTypeSupport.Framework.Integration.FileGenerator.RunPostWritingOperations() at Sdl.FileTypeSupport.Framework.Integration.FileGenerator.FileComplete() at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.FileComplete() at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.FileComplete() at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.FileComplete() at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.FileComplete() at Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReaderImpl.vv_Visit(TmfcReaderImpl* , FrameworkFileContainerField* field) at FrameworkFileContainerField.vv_AcceptFrameworkVisitor(FrameworkFileContainerField* , FrameworkFieldVisitor* visitor) at Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReaderImpl.vv_VisitStartEndField(TmfcReaderImpl* , StartEndField* startEnd) at Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReaderImpl.b_VisitNext(TmfcReaderImpl* ) at Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReader.ParseNext() at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext() at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext() at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse() at Sdl.TranslationStudio.Editor.Previews.GeneratePreviewJobRequest.CreatePreviewFile(IFileTypeManager fm, IAbstractGenerator generator, GenerateType generateType) at Sdl.TranslationStudio.Editor.Previews.GeneratePreviewJobRequest.Execute(IJobExecutionContext context) at Sdl.Desktop.Platform.Implementation.Services.JobExecuter.Execute(JobData jobData) at Sdl.Desktop.Platform.Implementation.ResourceLoggingInternalCommandExecuter`1.ExecuteWithResourceLogging(TCommandData commandData, String message) at Sdl.Desktop.Platform.Implementation.Services.Job._worker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)]]></StackTrace> </Exception> <Environment> <ProductName>Trados Studio</ProductName> <ProductVersion>Studio16</ProductVersion> <EntryAssemblyFileVersion>16.2.8.9097</EntryAssemblyFileVersion> <OperatingSystem>Microsoft Windows 10 Enterprise</OperatingSystem> <ServicePack>NULL</ServicePack> <OperatingSystemLanguage>1033</OperatingSystemLanguage> <CodePage>1252</CodePage> <LoggedOnUser>danielhug</LoggedOnUser> <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork> <ComputerName>ABCD</ComputerName> <ConnectedToNetwork>True</ConnectedToNetwork> <PhysicalMemory>16568624 MB</PhysicalMemory> </Environment> </SDLErrorDetails>
I believe we support up to version 2.0. Patrik Mazanek would be the best to confirm this.
Paul Filkin | RWS Group
________________________
Design your own training!
You've done the courses and still need to go a little further, or still not clear?
Tell us what you need in our Community Solutions Hub
I get the error as soon as I include a replace() in the code... that's a 2.0 function. But there might be other reasons than version - I just want to exclude the most obvious fist.
Daniel
Hi,
as before we use MS .NET which only support 1.0 - but, you can use API and create your own preview to extend the XML filters.
Regards
Hi,
as before we use MS .NET which only support 1.0 - but, you can use API and create your own preview to extend the XML filters.
Regards
Thanks a lot, so I have to work around the replace function... Which is probably less work than starting to mess around with the API...
I appreciate the quick and clear answer!
Daniel
It would be good to support at least XSLT 2.0 at some point. I found a good workaround, my script is working fine now, but XLST 2.0 became recommended in 2007... that's quite a while ago.
I hope you can support my idea: https://community.rws.com/ideas/translation-productivity-ideas/i/trados-studio-ideas/add-support-for-xslt-2-0-or-3-0-in-xml-preview
Daniel