日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Infopath入门到精通系列-3 Infopath manifest.xsf文件 解析

發(fā)布時間:2024/8/1 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Infopath入门到精通系列-3 Infopath manifest.xsf文件 解析 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1、Infopath 介紹

Infopath工具保存后默認生成xsn格式的文件。

將上圖中的文件后綴名修改為全國面上廣告申請.zip 并進行解壓。如下圖所示:

效果圖如下:

2、manifest.xsf文件說明

manifest.xsf文件內(nèi)容如下:

<?xml version="1.0" encoding="UTF-8"?> <!-- 此文件由 Microsoft InfoPath 自動創(chuàng)建和修改。 如果在 InfoPath 中修改表單模板,則在 InfoPath 以外對文件所做的更改可能會丟失。 --> <xsf:xDocumentClass trustSetting="automatic" trustLevel="restricted" solutionFormatVersion="15.0.0.0" publishUrl="C:\Users\Administrator\Desktop\全國面上廣告申請.xsn" solutionVersion="1.0.0.10" name="urn:schemas-microsoft-com:office:infopath:XmR-o-cg:-myXSD-2021-08-11T07-06-00" productVersion="15.0.0" xmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition" xmlns:xsf2="http://schemas.microsoft.com/office/infopath/2006/solutionDefinition/extensions" xmlns:xsf3="http://schemas.microsoft.com/office/infopath/2009/solutionDefinition/extensions" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xdUtil="http://schemas.microsoft.com/office/infopath/2003/xslt/Util" xmlns:xdXDocument="http://schemas.microsoft.com/office/infopath/2003/xslt/xDocument" xmlns:xdMath="http://schemas.microsoft.com/office/infopath/2003/xslt/Math" xmlns:xdDate="http://schemas.microsoft.com/office/infopath/2003/xslt/Date" xmlns:xdExtension="http://schemas.microsoft.com/office/infopath/2003/xslt/extension" xmlns:xdEnvironment="http://schemas.microsoft.com/office/infopath/2006/xslt/environment" xmlns:xdUser="http://schemas.microsoft.com/office/infopath/2006/xslt/User" xmlns:xdServerInfo="http://schemas.microsoft.com/office/infopath/2009/xslt/ServerInfo" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2021-08-11T07:06:00"><xsf:package><xsf:files><xsf:file name="myschema.xsd"><xsf:fileProperties><xsf:property name="namespace" type="string" value="http://schemas.microsoft.com/office/infopath/2003/myXSD/2021-08-11T07:06:00"></xsf:property><xsf:property name="editability" type="string" value="full"></xsf:property><xsf:property name="rootElement" type="string" value="myFields"></xsf:property><xsf:property name="useOnDemandAlgorithm" type="string" value="yes"></xsf:property></xsf:fileProperties></xsf:file><xsf:file name="template.xml"></xsf:file><xsf:file name="sampledata.xml"><xsf:fileProperties><xsf:property name="fileType" type="string" value="sampleData"></xsf:property></xsf:fileProperties></xsf:file><xsf:file name="view1.xsl"><xsf:fileProperties><xsf:property name="lang" type="string" value="2052"></xsf:property><xsf:property name="componentId" type="string" value="46"></xsf:property><xsf:property name="xmlToEditName" type="string" value="46"></xsf:property></xsf:fileProperties></xsf:file><xsf:file name="upgrade.xsl"></xsf:file></xsf:files></xsf:package><xsf:importParameters enabled="yes"></xsf:importParameters><xsf:documentVersionUpgrade><xsf:useTransform transform="upgrade.xsl" minVersionToUpgrade="0.0.0.0" maxVersionToUpgrade="1.0.0.9"></xsf:useTransform></xsf:documentVersionUpgrade><xsf:extensions><xsf:extension name="SolutionDefinitionExtensions"><xsf2:solutionDefinition runtimeCompatibility="client server"><xsf2:offline openIfQueryFails="yes" cacheQueries="yes"></xsf2:offline><xsf2:server formLocale="zh-CN" isPreSubmitPostBackEnabled="no" isMobileEnabled="no"></xsf2:server></xsf2:solutionDefinition></xsf:extension></xsf:extensions><xsf:views default="視圖 1"><xsf:view name="視圖 1" caption="視圖 1"><xsf:mainpane transform="view1.xsl"></xsf:mainpane><xsf:editing><xsf:xmlToEdit name="組2_46" item="/my:myFields/my:組1/my:組2" container="/my:myFields"><xsf:editWith caption="組2" xd:autogeneration="template" component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragment innerFragment="my:組1/my:組2"><my:組1><my:組2><my:行項目號></my:行項目號><my:費用類型></my:費用類型><my:媒體大類></my:媒體大類><my:媒體小類></my:媒體小類><my:活動形式></my:活動形式><my:推廣品牌id></my:推廣品牌id><my:推廣品牌></my:推廣品牌><my:數(shù)量></my:數(shù)量><my:單位></my:單位><my:申請金額></my:申請金額><my:廠方支持比例></my:廠方支持比例><my:考核大區(qū)></my:考核大區(qū)><my:考核比例></my:考核比例><my:考核金額></my:考核金額><my:審核金額></my:審核金額></my:組2></my:組1></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing><xsf:menuArea name="msoStructuralEditingContextMenu"><xsf:button action="xCollection::insertBefore" xmlToEdit="組2_46" caption="在前面插入 組2" showIf="immediate"></xsf:button><xsf:button action="xCollection::insertAfter" xmlToEdit="組2_46" caption="在后面插入 組2" showIf="immediate"></xsf:button><xsf:button action="xCollection::remove" xmlToEdit="組2_46" caption="刪除 組2" showIf="immediate"></xsf:button><xsf:button action="xCollection::insert" xmlToEdit="組2_46" caption="插入 組2" showIf="immediate"></xsf:button></xsf:menuArea></xsf:view></xsf:views><xsf:applicationParameters application="InfoPath Design Mode"><xsf:solutionProperties lastOpenView="view1.xsl" fullyEditableNamespace="http://schemas.microsoft.com/office/infopath/2003/myXSD/2021-08-11T07:06:00" lastVersionNeedingTransform="1.0.0.9"></xsf:solutionProperties></xsf:applicationParameters><xsf:documentSchemas><xsf:documentSchema rootSchema="yes" location="http://schemas.microsoft.com/office/infopath/2003/myXSD/2021-08-11T07:06:00 myschema.xsd"></xsf:documentSchema></xsf:documentSchemas><xsf:fileNew><xsf:initialXmlDocument caption="全國面上廣告申請" href="template.xml"></xsf:initialXmlDocument></xsf:fileNew> </xsf:xDocumentClass>

3、manifest.xsf文件屬性

manifest.xsf文件內(nèi)容有如下幾個標簽構成:
xDocumentClass 標簽,記錄如下幾個比較核心的屬性:

solutionVersion: 方案版本
name:名稱
productVersion: infopath客戶端的版本15.0.0 是infpth2010后的版本。
publishUrl:發(fā)布地址
xmlns:my: 命名空間,系統(tǒng)自動生成。http://schemas.microsoft.com/office/infopath/2003/myXSD/+保存的時間

4、manifest.xsf文件 package標簽

package維其他文件的路徑,包含files和file。
記錄myschema.xsd、template.xml、sampledata.xml、view1.xsl(可能是多個視圖)、upgrade.xsl

<xsf:package><xsf:files><xsf:file name="myschema.xsd"><xsf:fileProperties><xsf:property name="namespace" type="string"value="http://schemas.microsoft.com/office/infopath/2003/myXSD/2021-08-11T07:06:00"></xsf:property><xsf:property name="editability" type="string" value="full"></xsf:property><xsf:property name="rootElement" type="string" value="myFields"></xsf:property><xsf:property name="useOnDemandAlgorithm" type="string" value="yes"></xsf:property></xsf:fileProperties></xsf:file><xsf:file name="template.xml"></xsf:file><xsf:file name="sampledata.xml"><xsf:fileProperties><xsf:property name="fileType" type="string" value="sampleData"></xsf:property></xsf:fileProperties></xsf:file><xsf:file name="view1.xsl"><xsf:fileProperties><xsf:property name="lang" type="string" value="2052"></xsf:property><xsf:property name="componentId" type="string" value="46"></xsf:property><xsf:property name="xmlToEditName" type="string" value="46"></xsf:property></xsf:fileProperties></xsf:file><xsf:file name="upgrade.xsl"></xsf:file></xsf:files></xsf:package>

4、manifest.xsf文件extensions標簽

extensions標簽主要是記錄是否進行了文件的國際化操作。

<xsf:extensions><xsf:extension name="SolutionDefinitionExtensions"><xsf2:solutionDefinition runtimeCompatibility="client server"><xsf2:offline openIfQueryFails="yes" cacheQueries="yes"></xsf2:offline><xsf2:server formLocale="zh-CN" isPreSubmitPostBackEnabled="no" isMobileEnabled="no"></xsf2:server></xsf2:solutionDefinition></xsf:extension></xsf:extensions>

5、manifest.xsf文件documentVersionUpgrade標簽

documentVersionUpgrade標簽記錄當前文件是infopath哪個版本繪制的(minVersionToUpgrade),并可能使用的最新的infopath版本(maxVersionToUpgrade)。

<xsf:documentVersionUpgrade><xsf:useTransform transform="upgrade.xsl" minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.9"></xsf:useTransform></xsf:documentVersionUpgrade>

6、manifest.xsf文件views標簽

views 通俗的理解就是infopath最終生成的html文件名稱和位置、元數(shù)據(jù)信息等。
name 視圖名稱,一個文件可以有多個視圖。每一個視圖就是一個html文件,里面包含了元數(shù)據(jù)信息等。

<xsf:view name="視圖 1" caption="視圖 1"><xsf:mainpane transform="view1.xsl"></xsf:mainpane><xsf:editing><xsf:xmlToEdit name="組2_46" item="/my:myFields/my:組1/my:組2" container="/my:myFields"><xsf:editWith caption="組2" xd:autogeneration="template" component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragment innerFragment="my:組1/my:組2"><my:組1><my:組2><my:行項目號></my:行項目號><my:費用類型></my:費用類型><my:媒體大類></my:媒體大類><my:媒體小類></my:媒體小類><my:活動形式></my:活動形式><my:推廣品牌id></my:推廣品牌id><my:推廣品牌></my:推廣品牌><my:數(shù)量></my:數(shù)量><my:單位></my:單位><my:申請金額></my:申請金額><my:廠方支持比例></my:廠方支持比例><my:考核大區(qū)></my:考核大區(qū)><my:考核比例></my:考核比例><my:考核金額></my:考核金額><my:審核金額></my:審核金額></my:組2></my:組1></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing><xsf:menuArea name="msoStructuralEditingContextMenu"><xsf:button action="xCollection::insertBefore" xmlToEdit="組2_46" caption="在前面插入 組2"showIf="immediate"></xsf:button><xsf:button action="xCollection::insertAfter" xmlToEdit="組2_46" caption="在后面插入 組2"showIf="immediate"></xsf:button><xsf:button action="xCollection::remove" xmlToEdit="組2_46" caption="刪除 組2"showIf="immediate"></xsf:button><xsf:button action="xCollection::insert" xmlToEdit="組2_46" caption="插入 組2"showIf="immediate"></xsf:button></xsf:menuArea></xsf:view>

7、manifest.xsf文件java解析

下面代碼包含上述代碼結構中屬性的解析 String fManifest = loadResource("manifest.xsf");public String loadResource(String aResourceName) {if (this.fResourceProvider != null) {return this.fResourceProvider.loadResource(aResourceName);}return null;}try {Document xsfdocument = DocumentHelper.parseText(fManifest);PaseXMLMain(xsfdocument.getRootElement());convertViewList(getViewList());} catch (Exception e) {logger.error(e.getMessage(), e);throw new BusinessException(e.getMessage());}for (Iterator<Attribute> a = aelement.attributeIterator(); a.hasNext(); ) {Attribute tattribute = a.next();if (tattribute.getName().equals("publishUrl")) {this.publishUrl = fCurrentCharSet.selfXML2JDK(tattribute.getValue());continue;}if (tattribute.getName().equals("solutionVersion")) {this.solutionVersion = fCurrentCharSet.selfXML2JDK(tattribute.getValue());continue;}if (tattribute.getName().equals("productVersion")) {this.productVersion = fCurrentCharSet.selfXML2JDK(tattribute.getValue());continue;}if (tattribute.getName().equals("solutionFormatVersion")) {this.solutionFormatVersion = fCurrentCharSet.selfXML2JDK(tattribute.getValue());}}

infopath地址:https://gitee.com/pangu-dm/infopath

上面文章來自盤古BPM研究院:http://vue.pangubpm.com/
文章翻譯提交:https://github.com/qiudaoke/flowable-userguide
了解更多文章可以關注微信公眾號:

總結

以上是生活随笔為你收集整理的Infopath入门到精通系列-3 Infopath manifest.xsf文件 解析的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。