xsl

Java面试题(白)XML

北城以北 提交于 2020-01-18 18:57:59
1.XML是什么? 答:XML是一种可扩展标记语言。 2.DTD与Schea有和区别? 答: DTD不使用XML编写而XML Schenma本身就是XML文件,这表示XML解析器等已有的XML工具可以来处理XMLSchema。并且XML Schema是设计与DTD之后的,它提供了更多的类型来映射XML文件不同的数据类型。DTD是文档类型描述是定义XML文件结构的传统方式。 3.XML CDATA是什么? 答: CDATA是指字符数据,它有特殊的指令被XML解析器解析。 XML解析器解析XML文档中所有的文本,比如Thisisname ofpeison. 标签的值也会被解析,因为标签纸也可以包含XML标签,比如FirstName. CDATA补分不会被XML解析器解析。CDATAT部分以结束。 4.XSLT是什么? 答:XSLT也是常用的XML 技术,用于将一个XML 文件转换为另一种XML,HTML或者其*他的格式。XSLT为转换XML 文件详细定义了自己的语法,函数和操作符。通常由XSLT引擎 完成转换,XSLT引擎读取XSLT语法编写的XML 样式表或者XSL 文件的指令。XSLT大量使 用递归来执行转换。 一个常见XSLT使用就是将XML文件中的数据作为HTML页面显示。 XSLT 也可以很方便地把一种XML 文件转换为另一种XML 文档 来源: CSDN 作者: 南京赵子龙

XML Publisher 模板开发小技巧

回眸只為那壹抹淺笑 提交于 2019-12-05 02:39:37
如果debit大于1000,当前单元格背景设置为红色 <?if:debit>1000?><xsl:attribute xdofo:ctx="block" name="background-color">red</xsl:attribute><?end if?> 当前单元格文本对齐方式 <?split-column-data:TestScore?><xsl:attribute name="text-align"><?@align?></xsl:attribute><?ScoreValue?> 实现隔行变色 <?if@row:position() mod 2=0?> <xsl:attribute name="background-color" xdofo:ctx="incontext">lightgray</xsl:attribute><?end if?> 按条件显示 父介取值 判断是否最后一行 <?if:position()!=last()?><?split-by-page-break:?><?end if?> 数值格式化,解决小数点 现成D ,U 等。。。 <?format-number(unit_price,'#,##0.##','GBP')?> 设置表格行高度等 <xsl:attribute name="height" xdofo:ctx="incontext">20px<

enovia plm export to sap

亡梦爱人 提交于 2019-12-04 13:34:24
UPC creation UPC 结构 PLM 使用的UPC 是 14个数字组成的,兼容。 前两位为 0,后12位为有效数字,在SAP中0会被忽略,符合国际UPC通用 规则, 前一位为0,后13 位为有效数字,符合EAN规则 UPC 产生规则 具体规则一:7位 + 5位 + 1 位 13位 算法分解:假设前面固定7位 为 0715799 中间5位0开始计算,每次产生一个新的UPC,需要加一 最后一位的产生规则如下。 * 071579917350 6 -> 0+1+7+9+7+5=29 7+5+9+1+3+0=25*3=75 29+75=104 10-4=6 * 071579917351 3 -> 0+1+7+9+7+5=29 7+5+9+1+3+1=26*3=78 29+78=107 10-7=3 * 071579917352 0 -> 0+1+7+9+7+5=29 7+5+9+1+3+2=27*3=81 29+81=110 10-0=10 * 071579917353 7 -> 0+1+7+9+7+5=29 7+5+9+1+3+3=28*3=84 29+84=113 10-3=7 * 071579917355 1 -> 0+1+7+9+7+5=29 7+5+9+1+3+5=30*3=90 29+90=119 10-9=1 * 071579917356 8 -> 0+1+7+9+7

XSLT remove duplicate nodes based on element value

匿名 (未验证) 提交于 2019-12-03 09:58:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am newbie to XSLT.can you help me for xslt to achieve below output. In my input xml have duplicate nodes and i have to remove based on element (CustAccId) value should not be re-peat. Inputxml : <Main> <Request> <TypeInd>I</TypeInd> <CustAcctID>505665599</CustAcctID> <ServiceOrderID>1452653</ServiceOrderID> </Request> <Request> <TypeInd>O</TypeInd> <CustAcctID>2011395</CustAcctID> <ServiceOrderID>1452652</ServiceOrderID> </Request> <Request> <TypeInd>I</TypeInd> <CustAcctID>505665599</CustAcctID> <ServiceOrderID>1452653</ServiceOrderID> <

SXXP0003: Error reported by XML parser: Content is not allowed in prolog

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My XML file is <?xml version="1.0" encoding="ISO-8859-1"?> <T0020 xsi:schemaLocation="http://www.safersys.org/namespaces/T0020V1 T0020V1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.safersys.org/namespaces/T0020V1"> <INTERFACE> <NAME>SAFER</NAME> <VERSION>04.02</VERSION> </INTERFACE> <TRANSACTION> <VERSION>01.00</VERSION> <OPERATION>REPLACE</OPERATION> <DATE_TIME>2009-09-01T00:00:00</DATE_TIME> <TZ>CT</TZ> </TRANSACTION> <IRP_ACCOUNT> <IRP_CARRIER_ID_NUMBER>564182</IRP_CARRIER_ID_NUMBER> <IRP_BASE_COUNTRY>US<

Alphanumeric sort on mixed string value

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Given XML snippet of: <forms> <FORM lob="BO" form_name="AI OM 10"/> <FORM lob="BO" form_name="CL BP 03 01"/> <FORM lob="BO" form_name="AI OM 107"/> <FORM lob="BO" form_name="CL BP 00 02"/> <FORM lob="BO" form_name="123 DDE"/> <FORM lob="BO" form_name="CL BP 00 02"/> <FORM lob="BO" form_name="AI OM 98"/> </forms> I need to sort the FORM nodes by form_name alphabetically so all the forms containing 'AI OM' in the form_name are grouped together and then within that they are in numeric order by the integers (same for other forms). The form_name

How to use XPath and XSLT to process a set of sibling nodes and handle a specific subset of siblings based on two of the siblings

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a group of sibling elements in an xml document that need to be processed with XSLT into a table, actually I'm using Apache FOP to transform it into a pdf. Table rows need to be created whenever one of two types of elements are encountered. The cells in the row consist of the element that causes the row to be created in the first cell and then the following siblings in following cells until the next element that causes a row to be created. Here is some example xml to explain it better: <pre class="prettyprint"><code class="language-xml

wmic error (invalid XSL format) in windows7

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: wmic process get /format:csv What is wrong with this command in Windows 7? I get: Invalid XSL format (or) file name. 回答1: It's a bug in the wmic command. It's been suggested to copy XSL files into the %WINDIR%\system32 (or equivalent if 64 bit.) However, the command below works just as well without the need to copy files: wmic process get ProcessId,Description,CommandLine,ExecutablePath,ParentProcessId /format:"%WINDIR%\System32\wbem\en-us\csv" Of course, the "en-us" will be different for different locales. If you want to redirect output to

How to use `xsl:include` with apache fop

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use apache FOP to generate pdf files. I have this xsl code <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output method="xml" indent="yes" /> <xsl:template match="/"> <fo:root font-size="11pt" font-family="serif"> <fo:layout-master-set> <fo:simple-page-master master-name="A4-portrait" page-height="29.7cm" page-width="21.0cm" margin-top="1cm" margin-left="1.5cm" margin-right="1cm" margin-bottom="1cm"> <fo:region-body /> <fo:region-after region-name="footer"

How to transform XML for one XSD into another XML format that is very similar but has a different XSD file?

匿名 (未验证) 提交于 2019-12-03 08:54:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How to transform XML for one XSD into another XML format that is very similar but has a different XSD file? The XSD is quite large and has many complex types, but the actual XML looks very similar. I have two XSD files and two XML files - they both validate successfuly to one of the XSD files. I would like to transform one of the XML files into the other so that I can use only one class for further operations. How do I do this in .NET 4.0 and c# 4.0 ? Do I have to use XSLT or something? If I do have to use XSLT, how do I do this? I