xsl

Unable to copy and modify attribute in XSLT when using a namespace

匿名 (未验证) 提交于 2019-12-03 02:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to transform an XML document and modify the attributes of single element but the transform is not getting applied if the root element has a namespace attribute. Simply removing xmlns works fine with my code. My XML: <?xml version="1.0"?> <BIDomain xmlns="http://www.oracle.com/biee/bi-domain"> <BIInstance name="coreapplication"> <SecurityOptions sslManualConfig="false" sslEnabled="false" ssoProvider="Custom" ssoEnabled="false"> <SecurityService> <EndpointURI>bisecurity/service</EndpointURI> </SecurityService> </SecurityOptions> <

xsl:fo retrieve-marker not valid child

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need for my xsl:fo transformation an <fo:retrieve-marker> in an table but I don't know if this is possible because I use FOP Processor for my transformation. If i use the <fo:retrieve-marker> in my table I always get an error message that the tag has to be in an static content. Here is the table with the marker <xsl:call-template name="MMEL-Table-Header"/> <!-- Bottom table Line --> <fo:table-footer> <fo:table-row> <fo:table-cell> <fo:marker marker-class-name="footer-continued"> <fo:inline>(continued)</fo:inline></fo:marker> </fo:table

URL encoding with XSLT 1.0

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a problem writing my XSL. I have a link with the following code: <a> <xsl:attribute name="href"> <xsl:value-of select="concat($myUrl,'&projectNumber=',$projectNumber)"/> </xsl:attribute> <xsl:attribute name="title"> <xsl:value-of select="title"/> </xsl:attribute> LINK </a> So I need to pass a variable projectNumber to the end of myUrl . This works just fine and I get ...myUrl...&projectNumber=...projectNumber... in HTML. The problem is, that the variable projectNumber sometimes has some characters which have to be escaped in the href

PHP: How to generate a &lt;ul&gt;&lt;li&gt; tree in an xml2assoc array result?

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have seen many PHP function on how to generate a <ul><li> tag but my array input is quite complicated I guess. It is an array returned from a custom function called xml2assoc My question is how can I convert the returned xml2assoc array result to a <ul><li> formatted HTML code using PHP. Thanks. $tree = array( 0 => array( 'tag' => 'NavigationMode', 'value' => array( 0 => array( 'tag' => 'Title', 'value' => 'Introduction' ), 1 => array( 'tag' => 'NavigationNode', 'value' => array( 0 => array( 'tag' => 'Title', 'value' => 'Sub Intro' ) ) ) )

Find the number of occurences of a substring in a string in xslt

匿名 (未验证) 提交于 2019-12-03 02:28:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am writing a script to find the number of occurrences of a substring in a string in XSLT. It's taking too much time when I want to traverse it in more than 200k records. Can anyone help me to point out some changes to make it faster, or some other way to get the number of occurrences? I am talking about a substring, not a character - so I'm not talking about the translate() function. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:template match="/"> <Root> <NoofOccurane> <xsl:call-template name=

XML Schema validation error

匿名 (未验证) 提交于 2019-12-03 02:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have my xml file as <?xml version="1.0" encoding="ISO-8859-1"?> <Info> <Pan>123</Pan> <Name>qwe</Name> <Email>qwe</Email> <City>qwe</City> <State>qwe</State> <AssessmentYear>2012</AssessmentYear> <MobileNo>1234</MobileNo> <Income-Salary>1234</Income-Salary> <Income-Other>1234</Income-Other> <TotalAmount>122</TotalAmount> <Signature> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference URI=""><Transforms><Transform

How to convert XML to HTML table? [duplicate]

匿名 (未验证) 提交于 2019-12-03 02:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: How do you parse and process HTML/XML in PHP? 28 answers How do I go from this (using PHP preferably): <bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="web" cover="paperback"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore> To this (please imagine this to be an actual HTML table, I am not

In XSLT how do you test to see if a variable exists?

匿名 (未验证) 提交于 2019-12-03 02:22:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When using XSLT how do you test to see if a locally scoped variable exists, or is this even possible? 回答1: Considering the XSLT stylesheet as an XML DOM, a variable declaration element makes the variable visible to all following siblings and their descendants. This allows XSLT processors to statically analyze any XPath containing a variable reference to see if the variable exists; if the variable declaration exists on the preceding-sibling or ancestor axis, the variable reference is legal, otherwise it's not. Note that this is entirely

XSLT - Using substring with copy-of to preserve inner HTML tags

匿名 (未验证) 提交于 2019-12-03 02:22:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have some XML like this: <story><p><strong>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</strong>Nulla vel mauris metus. Etiam vel tortor vel magna bibendum euismod nec varius turpis. Nullam ullamcorper, nunc vel auctor consectetur, quam felis accumsan eros, lacinia fringilla mauris est vel lectus. Curabitur et tortor eros. Duis sed convallis metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Cras tempus quam sed enim gravida bibendum. Vestibulum magna ligula, varius in sodales

Removing the last characters in an XSLT string

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In my CMS it is possible to create a new article, and choose an image to be shown on that article. When an image is chosen, a thumbnail of the image will automatically be created as well. If the uploaded image is called image.jpg , then the corresponding thumbnail will automatically be named image_thumbnail.jpg . I would now like to use the thumbnail image, everywhere on the website where the article is mentioned, except in the article itself (where the original big image should be shown). But how can I do that? I imagine if I could get the