将自定义属性添加到现有WordML元素 [英] Add custom attributes to existing WordML elements
问题描述
您好,
我想为xslt生成的WordML文件添加自定义属性。这些属性将分配给现有的WordML元素,稍后由其他xslt文件使用,以进一步转换文件及其数据。当我添加属性 这种
方式时,在创建并保存单词UI后,自定义属性将被删除。
I would like to add custom attributes to my xslt generated WordML files. These attributes will be assigned to existing WordML elements and used later by other xslt files to further transform the files and their data. When I add attributes this way, after edits through the word UI are made and saved, the custom attributes get removed.
<w:tr myCustomAttributeRecordNumber="1" wsp:rsidR="005D5AD2" wsp:rsidRPr="002D4099" wsp:rsidTr="00A5102B">
<w:trPr><w:jc w:val="center" /></w:trPr>
<w:tc myCustomAttributeColumnName="Item Name"> <w:tcPr> <w:vAlign w:val="center" /> </w:tcPr>
<w:p wsp:rsidR="005D5AD2" wsp:rsidRPr="002D4099" wsp:rsidRDefault="005D5AD2" wsp:rsidP="00A5102B">
<w:pPr> <w:spacing w:before="60" w:after="60" /> <w:jc w:val="center" /> <w:rPr> <w:rFonts w:ascii="Arial" w:h-ansi="Arial" w:cs="Arial" /> <wx:font wx:val="Arial" /> <w:sz w:val="20" /> </w:rPr> </w:pPr>
<w:r> <w:rPr> <w:rFonts w:ascii="Arial" w:h-ansi="Arial" w:cs="Arial" /> <wx:font wx:val="Arial" /> <w:sz w:val="20" /> </w:rPr> <w:t>Test Name</w:t> </w:r>
</w:p>
</w:tc>
</w:tr>
包含将在文档生命周期内保留的自定义属性的相应方法是什么? ?
What is the appropriate method to include custom attributes that will be retained for the lifetime of the document?
感谢您的帮助。
推荐答案
您好Paradisp,
Hi Paradisp,
您是如何添加自定义属性的?你是如何通过UI这个词进行编辑的?我对此并不十分清楚。您能告诉我有关您问题的可重现步骤吗?
How did you add the custom attributes? And how did you edit through the word UI? I am not very clear about this. Could you show me the reproducible steps about your problem?
据我所知,我们可以根据这篇文章添加自定义属性:
http://msdn.microsoft.com/en-us/library/ff936167.aspx 其中包含详细步骤关于添加或设置自定义属性。
As far as I know, we can add custom attributes according to this article: http://msdn.microsoft.com/en-us/library/ff936167.aspx which contains the detail steps about adding or setting the custom attributes.
希望这可以为您提供有关您的问题的提示
Hope this can give you the hint about your problem
最好的问候,
这篇关于将自定义属性添加到现有WordML元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!