-2
我正在爲MS Word 2007編寫樣式表,我想使用< xsl:template>元素訪問Word 2007文檔的屬性來添加模板。 (模板,總時間等)有人可以提供我的代碼來啓動它?在Word 2007中訪問xml文件的屬性
我正在爲MS Word 2007編寫樣式表,我想使用< xsl:template>元素訪問Word 2007文檔的屬性來添加模板。 (模板,總時間等)有人可以提供我的代碼來啓動它?在Word 2007中訪問xml文件的屬性
在樣式表級別,宣佈要在2007年Word平OPC XML用於命名空間的命名空間前綴:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:ep="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"
xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"
xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
要從什麼是app.xml中刪除<模板>擴展屬性(在壓縮的docx中):
<xsl:template match="ep:Template" />
:)我接受了你的回答。再次感謝那.. – harsh
如果解壓縮docx,則會找到3個或4個屬性部分。如果保存爲「Flat OPC XML」(在Word中,另存爲XML文件),則可以更容易地通過XSL訪問它們。或者你是否嘗試從Word中應用轉換? – JasonPlutext
@JasonPlutext我正在爲Word 2007 xml文件編寫樣式表。是的,我解壓縮文檔。我想用標籤來編寫一個模板來訪問app.xml文件中的元素。一旦樣式表被應用到我的XML文件,我想隱藏在生成的XML文件中的這些屬性。請幫忙.. –
harsh