Jump to content

juanmf

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by juanmf

  1. You are THE MAN! :Shock:Thanks a lot! I was struggling with this since 2 days ago.. :good:You helped me making a better php report tool https://github.com/juanmf/sfPlugins/tree/master/reportPlugin We couldn't make bullet lists until now https://github.com/juanmf/sfPlugins/issues/1
  2. Hi, I've been trying to find a way to force MSWord to save a word 2003 XML document, applying a XSLT stylesheet. But whenever I use special chars it triggers a document('') function that breaks the process with the following error: Operation aborted: AllowDocumentFunction constraint violated I've seen lost of posts recommending something like: xsl.setProperty('AllowDocumentFunction', true); But I obviously cant use this trick in a Word "save as with transform" context. Also tried to put an embedded script : <msxsl:script language="JScript" implements-prefix="my">Document.setProperty("AllowDocumentFunction", true); </msxsl:script> but it was silly to think that one could hack it from inside the stylesheet... [color=#333333][font=Arial][size=3]Security settings do not allow the execution of script code within this stylesheet[/size][/font][/color] Which led me to this post: http://forums.ni.com...de/td-p/1003028 I tried setting the XSLSecurityLevel for Word in the registry with no luck. So the last option I see is a fix in the styesheet that's be able to avoid the use of document(): <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my="dummy.namespace" version="1.0"> <my:recoding-table font="Symbol"> <my:char code="!" value="21" altvalue="F021" entity="!"/> <!--EXCLAMATION MARK--> <my:char code=""" value="22" altvalue="F022" entity="∀"/> <!--FOR ALL-->...... </my:recoding-table>...... <xsl:if test="string-length($string)"> <xsl:value-of select="substring(document('')//my:recoding-table[@font=$font-family]/my:char[substring(@code, 1, 1)=substring($string, 1, 1)]/@entity, 1, 1)"/> </xsl:template>... See how the stylesheet opens '' (this sheet) to make a XPATH query in its own my:recoding-table node. Question: How can I put my:recoding-table in a variable and query in it, or HOW can I get the same result without using document('')? Thanks!
×
×
  • Create New...