Search Results

Search found 837 results on 34 pages for 'xsl'.

Page 10/34 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • [XSL-FO] Characters from other than English languages

    - by Lukasz Kurylo
    My client have departments in Europe Central and East, so there is highly possibility that in the generated pdfs there will be at least in the people names and/or surnames some specific characters for the country language.   With the XSL-FO we can use some out-of-the box fonts, e.g. the default is Times. We can change it for specific block of text or the entire document to other like Helvetica or Arial. All will be good to the moment that we use only an english alphabet. If we want to add e.g. some characters from polish or bulgarian language, in the *.fo file:         <fo:block >                 <fo:inline font-weight="bold">english: </fo:inline>                 <fo:inline font-weight="bold">yellow</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">polish: </fo:inline>                 <fo:inline font-weight="bold">zólty</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">russian: </fo:inline>                 <fo:inline font-weight="bold">??????</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">bulgarian: </fo:inline>                 <fo:inline font-weight="bold">????</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">english: </fo:inline>                 <fo:inline font-weight="bold">yellow</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">polish: </fo:inline>                 <fo:inline font-weight="bold"  font-family="Arial">zólty</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">russian: </fo:inline>                 <fo:inline font-weight="bold" font-family="Arial">??????</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">bulgarian: </fo:inline>                 <fo:inline font-weight="bold" font-family="Arial">????</fo:inline>       </fo:block>   The result can be diffrent from the expected depending on the selected font, e.g:                 As you can see Timer nor Arial work in this case.   The problem here is not related to XSL-FO, but rather to the renderer we are using. I have lost a lot of time to find a solution for the using by me XSL-FO –> PDF rendered to acquire these characters in my generated files. Fortunatelly all what have to be done it is to embed the font (or part of it) in the file(s) during rendering.   The renderer that I’m using it is an open source FO.NET.   For this one, the code to generate a pdf file looks that:   var fonet =  Fonet.FonetDriver.Make(); fonet.Render("source.fo", "result.pdf");   To emded the font in the pdf, we need to set the appropriate option to the driver:   fonet.Options = new Fonet.Render.Pdf.PdfRendererOptions() {       FontType = Fonet.Render.Pdf.FontType.Embed }; Right now, the pdf we get should look like this:               As you can see, the result for the Arial font looks exactly how it should, because this font has a characters included not only for the english language like the default Times, which we shouls avoid if we not generating a english-only documents.   This is worth to notice that in this situation the generated pdf file is quite large, it has more than 400 kb in size. This is of course because of embedding the entire font in it to make the document portable to systems, where the used font is not present. Instead on embedding the entire font, we can only embed the subset of used characters by changing the options to:   fonet.Options = new Fonet.Render.Pdf.PdfRendererOptions() {       FontType = Fonet.Render.Pdf.FontType.Subset };   Right now, this specific pdf is only 12 kb in size.

    Read the article

  • XSLT adding elements on the same path

    - by Stefan
    Consider the following XML: <?xml version="1.0" encoding="ISO-8859-1"?> <catalog> <cd> <title>Empire Burlesque</title> <artist> <name>Bob</name> <surname>Dylan</surname> </artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> </catalog> I want to add elements to this XML using XSLT, to get the following result: <?xml version="1.0" encoding="ISO-8859-1"?> <catalog> <cd> <title>Empire Burlesque</title> <artist> <name>Bob</name> <surname>Dylan</surname> <!-- NEW --> <middlename>???</middlename> </artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> <!-- NEW --> <comment>great one</comment> </cd> <!-- NEW --> <cd> <title>Hide your heart</title> <artist> <name>Bonnie</name> <surname>Tyler</surname> </artist> <country>UK</country> <company>CBS Records</company> <price>9.90</price> <year>1988</year> </cd> </catalog> To achieve that, I wrote the following XSLT: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template name="injectXml"> <xsl:param name="whatToInject"/> <xsl:copy> <xsl:copy-of select="node() | @*"/> <xsl:copy-of select="$whatToInject"/> </xsl:copy> </xsl:template> <xsl:template match="//catalog"> <xsl:call-template name="injectXml"> <xsl:with-param name="whatToInject"> <cd> <title>Hide your heart</title> <artist> <name>Bonnie</name> <surname>Tyler</surname> </artist> <country>UK</country> <company>CBS Records</company> <price>9.90</price> <year>1988</year> </cd> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="//cd[year=1985]"> <xsl:call-template name="injectXml"> <xsl:with-param name="whatToInject"> <comment>great one</comment> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="//cd[year=1985]/artist"> <xsl:call-template name="injectXml"> <xsl:with-param name="whatToInject"> <middlename>???</middlename> </xsl:with-param> </xsl:call-template> </xsl:template> </xsl:stylesheet> Why it's not working? How to do it?

    Read the article

  • Comparing CSS From XSL

    There are two style sheet languages widely used in the website design industry today. These are CSS (Cascading Style Sheets) and XSL (Extensible Stylesheet Language). According to many web design exp... [Author: Margarette Mcbride - Web Design and Development - June 08, 2010]

    Read the article

  • xsl key - multiple levels for an element

    - by user1004770
    My previous post was not very meaningful. reposting here. What i am looking for is the QueueManager element, under SORRegion name="default"(which is the parent), within inan.xml. I have used xsl key. In my xsl the value 'default' is hardcoded. here is the xsl i used <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output omit-xml-declaration="yes" indent="yes" method="xml" /> <xsl:key name="CR-lookup" match="Service" use="concat(@ServiceName, '+', SOR/@SORname, '+', */CountryCode/@Ctrycd, '+', */*/SORRegion/@name, '+', */*/*/ConsumerName/@name)"/> <xsl:variable name="CRTable" select="document('inan.xml')"/> <xsl:template match="/"> <Contributor> <ContributorRole> <xsl:for-each select="$CRTable"> <!-- change context document --> <xsl:for-each select="key('CR-lookup', concat('StatementIndicatorsService', '+', 'Globestar', '+', '124', '+', 'default', '+', 'MYCA'))"> <a> <xsl:value-of select="*/*/*/*/QueueManager"/> </a> </xsl:for-each> </xsl:for-each> </ContributorRole> </Contributor> </xsl:template> </xsl:stylesheet> any input xml file is fine. here is my actual output <Contributor> <ContributorRole /> </Contributor> expected output <Contributor> <ContributorRole> <a>MAO1</a> </ContributorRole> </Contributor> inan.xml document <RoutingDetails> <Service ServiceName="StatementIndicatorsService"> <SOR SORname="Globestar"> <CountryCode Ctrycd="124"> <SORRegion name="Test"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146B</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146C</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="default"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKBX1"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKAX4"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO204.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKEX7"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO247.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> </CountryCode> <CountryCode Ctrycd="826"> <SORRegion name="Test"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="default"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKBX1"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKAX4"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO204.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKEX7"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO247.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> </CountryCode> <CountryCode Ctrycd="724"> <SORRegion name="Test"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA4248A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA4248A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO239.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="default"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA4248A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA4248A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO239.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKBX1"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA4248A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA4248A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKAX4"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA4248A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA4248A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO204.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKEX7"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA4248A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA4248A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO247.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> </CountryCode> </SOR> </Service> </RoutingDetails>

    Read the article

  • Xpath and parameters

    - by Daniel
    I am relatively new to XSL and I think this is a basic question. So I better get my apologies in early! Basically, I would like to use a value-of function. This will be in a template and I would like to pass part of the xpath as a parameter. <xsl:variable name="TEST_VAR">"h:elementA/elementB"</xsl:variable> ... and then use the variable (or passed in param) as all (or part) of the xpath: <xsl:element name="transformedElement"><xsl:value-of select=$TEST_VAR/></xsl:element> I would really like to have the xpath to be a mixture of string literals and the vlue of TEST_VAR. Thanks in advance

    Read the article

  • Recursive list of lists in XSL

    - by Paul Tomblin
    I have a recursive nodes that I'm trying to set up for jquery-checktree. The nodes look like foo/bar/ID /NAME /CHECKED bar/ID /NAME /CHECKED /bar/ID /NAME /bar/ID /NAME /bar/ID /NAME /CHECKED /bar/ID /NAME /CHECKED Where any bar may or may not have one or more bar nodes below it, but any bar will have ID and NAME and might have a CHECKED. and I want to turn that into <ul> <li><input type="checkbox" name="..." value="..." checked="checked"></input> <label for="...">...</label> <ul> <li><input type="checkbox" name="..." value="..." checked="checked"></input> <label for="...">...</label> </li> </ul> <li>....</li> </ul> I can get the first level by doing: <ul class="tree"> <xsl:for-each select="/foo/bar/"> <li><input type="checkbox" name="{ID}" value="{ID}"> <xsl:if test="CHECKED = 'Y'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> </input><label for="{ID}"><xsl:value-of select="NAME"/></label> </li> </xsl:for-each> </ul> But I don't know how to recurse down to the embedded "bar" within the "bar", down to however many levels there might be.

    Read the article

  • How do i select all the text nodes within a specific element node using XSL?

    - by user323719
    How do i select all the text nodes within a specific element node using XSL? Input xml: <node1 id="1"> <node2 id="2"> <node3 id="3" /> <node4 id="4"> <node5 id="5">Text node1</node5> <node6 id="6">Text node2</node6> </node4> </node2> <node7 id="7">Text node3 <node8 id="8">Text node4</node8> <node9 id="9">Text node5</node9> </node7> <node10 id="10">Text node6</node10> <node11 id="11">Text node3 <node12 id="12">Text node4</node12> <node13 id="13">Text node5</node13> </node11> </node1> Input Param: List of ids of the element nodes whose txt nodes are to be retrieved. <nodes><node>4</node><node>7</node><node>10</node></nodes> Expected Output: Text node1 Text node2 Text node3 Text node4 Text node5 Text node6 How can this be achieved using XSL? Please share your ideas.

    Read the article

  • Xalan redirect:write , use either of two element values to create name of new .xml file depending on

    - by Bilzac
    So I have the following code: <redirect:write select="concat('..\\folder\\,string(filename),'.xml')"> Where "filename" is a tag in the xml source. My problem occurs when filename is null or blank. And this is the case for several of the xml filename tags. So what I am trying to implement is a checking method. This is what I have done: <xsl-if test = "filename != ''"> <xsl:variable name = "tempName" select = "filename" /> </xsl-if> <xsl-if test ="filename = ''"> <xsl:variable name = "tempName" select = "filenameB"/> </xsl-if> <redirect:write select="concat('..\\folder\\,string($tempName),'.xml')"> I seem to be getting NPEs when I compile my Java code, saying the Variable not resolvable: tempName

    Read the article

  • get another sequence elements'value in one sequence.

    - by lxusharp
    I have an XML file as below, and I want to transform it with xslt. I want to achieve is: when do the for-each of "s1" elements, I want to get the corresponding "r1"'s "value" attbute value. the xslt I wrote as below, but it does not work, can anyone give a help? thanks. <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:output method="html" indent="yes"/> <xsl:template mode="getr1" match="summary" > <xsl:param name="index"/> <xsl:value-of select="r1[$index][@value]"/> </xsl:template> <xsl:template match="/"> <html> <body> <ul> <xsl:for-each select="root/s1"> <xsl:variable name="i" select="position()"/> <li> <xsl:value-of select ="@name"/> : <!--<xsl:apply-templates mode="getr1" select="/root/summary"> <xsl:with-param name="index" select="$i" /> </xsl:apply-templates>--> <!--I want to get the corresponding r1's value according to the index --> <!-- but above code is not work.--> </li> </xsl:for-each> </ul> </body> </html> </xsl:template> </xsl:stylesheet>

    Read the article

  • How to use parameter variable in xslt

    - by Abbi
    Hi I am new to xslt so please let me know whats wrong with my syntax here. If I compare with a Constant value of '880.50' I get the desired result. But if I try to do the samething with parameter being passed I get nothing. The code snippet is as under. <xsl:template name="ShowJourneyLegs" > <xsl:param name="TotalFare" /> <Key4><xsl:value-of select='$TotalFare'/></Key4> <JourneyLegKeys><xsl:value-of select="/FareSearchResponse/CompleteItineraryFares/AirFare[@Total = '880.50']/JourneyLegKeys/Key[1]"/></JourneyLegKeys> <JourneyLeg><xsl:value-of select="/FareSearchResponse/CompleteItineraryFares/AirFare[@Total = '$TotalFare']/JourneyLegKeys/Key[1]"/></JourneyLeg> </xsl:template>

    Read the article

  • Specific template for the first element.

    - by Kalinin
    I have a template: <xsl:template match="paragraph"> ... </xsl:template> I call it: <xsl:apply-templates select="paragraph"/> For the first element I need to do: <xsl:template match="paragraph[1]"> ... <xsl:apply-templates select="."/><!-- I understand that this does not work --> ... </xsl:template> How to call <xsl:apply-templates select="paragraph"/> (for the first element paragraph) from the template <xsl:template match="paragraph[1]">? So far that I have something like a loop. I solve this problem so (but I do not like it): <xsl:for-each select="paragraph"> <xsl:choose> <xsl:when test="position() = 1"> ... <xsl:apply-templates select="."/> ... </xsl:when> <xsl:otherwise> <xsl:apply-templates select="."/> </xsl:otherwise> </xsl:choose> </xsl:for-each>

    Read the article

  • BIP and Mapviewer Mash Up I

    - by Tim Dexter
    I was out in Yellowstone last week soaking up various wildlife and a bit too much rain ... good to be back until the 95F heat yesterday. Taking a little break from the Excel templates; the dev folks are planing an Excel patch in the next week or so that will add a mass of new functionality. At the risk of completely mis leading you I'm going to hang back a while. What I have written so far holds true and will continue to do so. This week, I have been mostly eating 'mapviewer' ... answers on a post card please, TV show and character. I had a request to show how BIP can call mapviewer and render a dynamic map in an output. So I hit the books and colleagues for some answers. Mapviewer is Oracle's geographic information system, hereby known as GIS. I use it a lot in our BIEE demos where the interaction with the maps is very impressive. Need a map of California and its congressional districts? I have contacts; Jerry and David with their little black box of maps. Once in my possession I can build highly interactive, clickable maps that allow the user to drill into more information using a very friendly interface driving BIEE content and navigation. But what about maps in BIP output? Bryan Wise, who has written some articles on this blog did some work a while back with the PL/SQL API interface. The extract for the report called a function that in turn called the mapviewer server, passing a set of mapping requirements, it then returned a URL to a cached copy of that map. Easy to then have BIP render that image. Thats still very doable. You need to install a couple of packages and then load the mapviewer java APIs into the database. Then you can write your function to the APIs. A little involved? Maybe, but the database is doing all the heavy lifting for you. I thought I would investigate another method for getting the maps back into BIP. There is a URL interface you can call, this involves building an XML message to be passed to the mapviewer server. It's pretty straightforward to use on the mapviewer side. On the BIP side things are little more tricksy. After some unexpected messing about I finally got the ubiquitous Hello World map to render using the URL method. Not the most exciting map in the world, lots of ocean and a rather long URL to get it to render. http://127.0.0.1:9704/mapviewer/omserver?xml_request=%3Cmap_request%20title=%22Hello%20World%22%20datasource=%22cagis%22%20format=%22GIF_STREAM%22/%3E Notice all of the encoding in the URL string to handle the spaces, quotes, etc. All necessary to get BIP to make the call to the mapviewer server correctly without truncating the URL if it hits a real space rather than a %20. With that in mind constructing the URL was pretty simple. I'm not going to get into the content of the URL too much, for that you need to bone up on the mapviewer XML API. Check out the home page here and the documentation here. To make the template portable I used the standard CURRENT_SERVER_URL parameter from the BIP server and declared that in my template. <?param@begin:CURRENT_SERVER_URL;'myserver'?> Ignore the 'myserver', that was just a dummy value for testing at runtime it will resolve to: 'http://yourserver:port/xmlpserver' Not quite what we need as mapviewer has its own server path, in my case I needed 'mapviewer/omserver?xml_request=' as the fixed path to the mapviewer request URL. A little concatenation and substringing later I came up with <?param@begin:mURL;concat(substring($CURRENT_SERVER_URL,1,22),'mapviewer/omserver?xml_request=')?> Thats the basic URL that I can then build on. To get the Hello World map I need to add the following: <map_request title="Hello World" datasource="cagis" format="GIF_STREAM"/> Those angle brackets were the source of my headache, BIPs XSLT engine was attempting to process them rather than just pass them. Hok Min to the rescue ... again. I owe him lunch when I get out to HQ again! To solve the problem, I needed to escape all the characters and white space and then use native XSL to assign the string to a parameter. <xsl:param xdofo:ctx="begin"name="pXML">%3Cmap_request%20title=%22Hello%20World%22 %20datasource=%22cagis%22%20format=%22GIF_STREAM%22/%3E</xsl:param> I did not need to assign it to a parameter but I felt that if I were going to do anything more serious than Hello World like plotting points of interest on the map. I would need to dynamically build the URL, so using a set of parameters or variables that I then concatenated would be easier. Now I had the initial server string and the request all I then did was combine the two using a concat: concat($mURL,$pXML) Embedding that into an image tag: <fo:external-graphic src="url({concat($mURL,$pXML)})"/> and I was done. Notice the curly braces to get the concat evaluated prior to the image call. As you will see next time, building the XML message to go onto the URL can get quite complex but I have used it with some data. Ultimately, it would be easier to build an extension to BIP to handle the data to be plotted, it would then build the XML message, call mapviewer and return a URL to the map image for BIP to render. More on that next time ...

    Read the article

  • how to get doctype tag with url using xsl:output

    - by keshav.veerapaneni
    Hi, i have added the below xsl:output tag in xslt <xsl:output method="html" indent="yes" encoding="utf-8" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" </xsl:output as a result i get the below doctype tag in the html output- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" how can i mention the url in the doctype tag using xsl:output which would output a doctype tag that looks like below <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "_http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" Best Regards, Keshav

    Read the article

  • How do i modify the text content within a specified set of nodes using XSL?

    - by user323719
    I have a list of node ids. I want to append "-Selected" to all the text nodes within the given set of node ids. Please let me know how we can achieve the same using XSL? Input: <node1 id="a"> <node2 id="b"> <node3 id="c" /> <node4 id="d"> <node5 id="e">Text node1</node5> <node6 id="f">Text node2</node6> </node4> </node2> <node7 id="g">Text node3 <node8 id="h" align="center">Text node4</node8> <node9 id="i">Text node5</node9> </node7> <node10 id="j">Text node6 </node10> <node11 id="h">Text node7 </node11> Input Param: List of node ids <xsl:param name="pNodes"> <nodes> <node>4</node> <node>7</node> <node>11</node> </nodes> Expected output: <node1 id="a"> <node2 id="b"> <node3 id="c" /> <node4 id="d"> <node5 id="e">Text node1 - Selected</node5> <node6 id="f">Text node2 - Selected</node6> </node4> </node2> <node7 id="g">Text node3 <node8 id="h" align="center">Text node4 - Selected</node8> <node9 id="i">Text node5 - Selected</node9> </node7> <node10 id="j">Text node6 </node10> <node11 id="h">Text node7 - Selected </node11>

    Read the article

  • Is it possible to generate a XSL-FO template from a PDF?

    - by Vihung
    Given a PDF document, is it possible to generate a XSL-FO (FOP) template? Obviously, this would be a one-time thing - the generated template would just be a starting point for creating a proper template that pulls in the appropriate data. For me, the ideal tool for doing so would be a Java-based one and should be executable from the command line or through an ANT task. Failing that, it would be something that runs on Linux and MacOS X.

    Read the article

  • Component returned failure code: 0x80600011 [nsIXSLTProcessorObsolete.transformDocument]

    - by Sean Ochoa
    So, I'm using the XSLT plugin for JQuery, and here's my code: function AddPlotcardEventHandlers(){ // some code } function reportError(exception){ alert(exception.constructor.name + " Exception: " + ((exception.name) ? exception.name : "[unknown name]") + " - " + exception.message); } function GetPlotcards(){ $("#content").xslt("../xml/plotcards.xml","../xslt/plotcards.xsl", AddPlotcardEventHandlers,reportError); } Here's the modified jquery plugin. I say that its modified because I've added callbacks for success and error handling. /* * jquery.xslt.js * * Copyright (c) 2005-2008 Johann Burkard (<mailto:[email protected]>) * <http://eaio.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * USE OR OTHER DEALINGS IN THE SOFTWARE. * */ /** * jQuery client-side XSLT plugins. * * @author <a href="mailto:[email protected]">Johann Burkard</a> * @version $Id: jquery.xslt.js,v 1.10 2008/08/29 21:34:24 Johann Exp $ */ (function($) { $.fn.xslt = function() { return this; } var str = /^\s*</; if (document.recalc) { // IE 5+ $.fn.xslt = function(xml, xslt, onSuccess, onError) { try{ var target = $(this); var change = function() { try{ var c = 'complete'; if (xm.readyState == c && xs.readyState == c) { window.setTimeout(function() { target.html(xm.transformNode(xs.XMLDocument)); if (onSuccess) onSuccess(); }, 50); } }catch(exception){ if (onError) onError(exception); } }; var xm = document.createElement('xml'); xm.onreadystatechange = change; xm[str.test(xml) ? "innerHTML" : "src"] = xml; var xs = document.createElement('xml'); xs.onreadystatechange = change; xs[str.test(xslt) ? "innerHTML" : "src"] = xslt; $('body').append(xm).append(xs); return this; }catch(exception){ if (onError) onError(exception); } }; } else if (window.DOMParser != undefined && window.XMLHttpRequest != undefined && window.XSLTProcessor != undefined) { // Mozilla 0.9.4+, Opera 9+ var processor = new XSLTProcessor(); var support = false; if ($.isFunction(processor.transformDocument)) { support = window.XMLSerializer != undefined; } else { support = true; } if (support) { $.fn.xslt = function(xml, xslt, onSuccess, onError) { try{ var target = $(this); var transformed = false; var xm = { readyState: 4 }; var xs = { readyState: 4 }; var change = function() { try{ if (xm.readyState == 4 && xs.readyState == 4 && !transformed) { var processor = new XSLTProcessor(); if ($.isFunction(processor.transformDocument)) { // obsolete Mozilla interface resultDoc = document.implementation.createDocument("", "", null); processor.transformDocument(xm.responseXML, xs.responseXML, resultDoc, null); target.html(new XMLSerializer().serializeToString(resultDoc)); } else { processor.importStylesheet(xs.responseXML); resultDoc = processor.transformToFragment(xm.responseXML, document); target.empty().append(resultDoc); } transformed = true; if (onSuccess) onSuccess(); } }catch(exception){ if (onError) onError(exception); } }; if (str.test(xml)) { xm.responseXML = new DOMParser().parseFromString(xml, "text/xml"); } else { xm = $.ajax({ dataType: "xml", url: xml}); xm.onreadystatechange = change; } if (str.test(xslt)) { xs.responseXML = new DOMParser().parseFromString(xslt, "text/xml"); change(); } else { xs = $.ajax({ dataType: "xml", url: xslt}); xs.onreadystatechange = change; } }catch(exception){ if (onError) onError(exception); }finally{ return this; } }; } } })(jQuery); And, here's my error msg: Object Exception: [unknown name] - Component returned failure code: 0x80600011 [nsIXSLTProcessorObsolete.transformDocument] Here's the info on the browser that I'm using for testing (with firebug v1.5.4 add-on installed): Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Here's my XML: <?xml version="1.0" encoding="ISO-8859-1"?> <plotcardCollection sortby="order"> <plotcard order="2" id="1378"> <name><![CDATA[[placeholder for name of plotcard 1378]]]></name> <content><![CDATA[[placeholder for content of plotcard 1378]]]></content> <tagCollection> <tag id="3"><![CDATA[[placeholder for tag with id=3]]]></tag> <tag id="7"><![CDATA[[placeholder for tag with id=7]]]></tag> </tagCollection> </plotcard> <plotcard order="1" id="2156"> <name><![CDATA[[placeholder for name of plotcard 2156]]]></name> <content><![CDATA[[placeholder for content of plotcard 2156]]]></content> <tagCollection> <tag id="2"><![CDATA[[placeholder for tag with id=2]]]></tag> <tag id="9"><![CDATA[[placeholder for tag with id=9]]]></tag> </tagCollection> </plotcard> </plotcardCollection> Here's my XSLT: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/plotcardCollection"> <xsl:variable name="sortby" select="@sortby" /> <xsl:for-each select="plotcard"> <xsl:sort select="$sortby" data-type="number" order="ascending"/> <div> <!-- Start Plotcard --> <xsl:attribute name="class">Plotcard</xsl:attribute> <xsl:for-each select="@"> <xsl:value-of select="name()"/> <xsl:text>='</xsl:text> <xsl:if test="name() = 'id'"> <xsl:text>Plotcard-</xsl:text> </xsl:if> <xsl:value-of select="." /> <xsl:text>'</xsl:text> </xsl:for-each> <!-- Start Plotcard Name Section --> <div> <xsl:attribute name="class"> <xsl:text disable-output-escaping="yes">PlotcardName</xsl:text> </xsl:attribute> <xsl:value-of select="name/text()"/> </div> <!-- Start Plotcard Content Section --> <div> <xsl:attribute name="class"> <xsl:text disable-output-escaping="yes">PlotcardContent</xsl:text> </xsl:attribute> <xsl:value-of select="content/text()"/> </div> </div> </xsl:for-each> </xsl:template> </xsl:stylesheet> I'm really not sure what to do about this.... any thoughts?

    Read the article

  • How do i select the preceding nodes of a text node starting from a specific node and not the root no

    - by Rachel
    How do i select the preceding nodes of a text node starting from a specific node whose id i know instead of getting the text nodes from the root node? When i invoke the below piece from a template match of text node, I get all the preceding text nodes from the root. I want to modify the above piece of code to select only the text nodes that appear after the node having a specific id say 123. i.e something like //*[@id='123'] <xsl:template match="text()[. is $text-to-split]"> <xsl:variable name="split-index" as="xsd:integer" select="$index - sum(preceding::text()/string-length(.))"/> <xsl:value-of select="substring(., 1, $split-index - 1)"/> <xsl:copy-of select="$new"/> <xsl:value-of select="substring(., $split-index)"/> </xsl:template> <xsl:variable name="text-to-split" as="text()?" select="descendant::text()[sum((preceding::text(), .)/string-length(.)) ge $index][1]"/> How do i include the condition in places where i use preceding::text inorder to select preceding text nodes relative to the specific node's id which i know?

    Read the article

  • XML/XSL Module 04.03.05 is now officially released.

    XML/XSL Module 04.03.05 is a maintenance release. Download is available from Codeplex. Changes were required to fix issues caused by conflicts with a new namespace in DotNetNuke 5.3. as the XML module did not use fully qualified namespaces everywhere. Please upgrade to XML 4.3.5 before upgrading your DNN version to 5.3.1 and above. In case you missed this step and the entire application runs into a Yellow Screen of Death, the easiest workaround is to simply delete ~\App_Code\XML\Handlers\download.vb....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • compact XSLT code to drop N number of tags if all are null.

    - by infant programmer
    This is my input xml: <root> <node1/> <node2/> <node3/> <node4/> <othertags/> </root> The output must be: <root> <othertags/> </root> if any of the 4 nodes isn't null then none of the tags must be dropped. example: <root> <node1/> <node2/> <node3/> <node4>sample_text</node4> <othertags/> </root> Then the output must be same as input xml. <root> <node1/> <node2/> <node3/> <node4>sample_text</node4> <othertags/> </root> This is the XSL code I have designed :: <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="/root/node1[.='' and ../node2/.='' and ../node3/.='' and ../node4/.=''] |/root/node2[.='' and ../node1/.='' and ../node3/.='' and ../node4/.=''] |/root/node3[.='' and ../node1/.='' and ../node2/.='' and ../node4/.=''] |/root/node4[.='' and ../node1/.='' and ../node2/.='' and ../node3/.='']"/> As you can see the code requires more effort and becomes more bulky as the number of nodes increase. Is there any alternative way to overcome this bottleneck?

    Read the article

  • Anyone have an XSL to convert Boost.Test XML logs to a presentable format?

    - by Stuart Lange
    I have some C++ projects running through cruisecontrol.net. As a part of the build process, we compile and run Boost.Test unit test suites. I have these configured to dump XML log files. While the format is similar to JUnit/NUnit, it's not quite the same (and lacks some information), so cruisecontrol.net is unable to pick them up. I am wondering if anyone has created (or knows of) an existing XSL transform that will convert Boost.Test results to JUnit/NUnit format, or alternatively, directly to a presentable (html) format. Thanks!

    Read the article

  • XSL: Get variable data without exslt:node-set

    - by Louis W
    Using native XSL lib in PHP. Is it possible to get a node value inside a variable without having to call it through exslt:node-set every time.... it long and ugly. <xsl:variable name="mydata"> <foo>1</foo> <bar>2</bar> </xsl:variable> <!-- How currently being done --> <xsl:value-of select="exslt:node-set($mydata)/foo" /> <!-- I want to be able to do this --> <xsl:value-of select="$mydata/foo" />

    Read the article

  • XSLT: How to exclude empty elements from my result?

    - by Fedor Steeman
    I have a rather complicated xslt sheet transforming one xml format to another using templates. However, in the resulting xml, I need to have all the empty elements excluded. How is that done? This is how the base xslt looks like: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:far="http://www.itella.com/fargo/fargogate/" xmlns:a="http://tempuri.org/XMLSchema.xsd" xmlns:p="http://tempuri.org/XMLSchema.xsd"> <xsl:import href="TransportCDMtoFDM_V0.6.xsl"/> <xsl:import href="ConsignmentCDMtoFDM_V0.6.xsl"/> <xsl:template match="/"> <InboundFargoMessage> <EdiSender> <xsl:value-of select="TransportInformationMessage/SenderId"/> </EdiSender> <EdiReceiver> <xsl:value-of select="TransportInformationMessage/RecipientId"/> </EdiReceiver> <EdiSource> <xsl:value-of select="TransportInformationMessage/Waybill/Parties/Consignor/Id"/> </EdiSource> <EdiDestination>FARGO</EdiDestination> <Transportations> <xsl:for-each select="TransportInformationMessage/TransportUnits/TransportUnit"> <xsl:call-template name="transport"/> </xsl:for-each> <xsl:for-each select="TransportInformationMessage/Waybill/TransportUnits/TransportUnit"> <xsl:call-template name="transport"/> </xsl:for-each> <xsl:for-each select="TransportInformationMessage/Waybill"> <EdiImportTransportationDTO> <Consignments> <xsl:for-each select="Shipments/Shipment"> <xsl:call-template name="consignment"/> </xsl:for-each> </Consignments> <EdiTerminalDepartureTime> <xsl:value-of select="DatesAndTimes/EstimatedDepartureDateTime"/> <xsl:value-of select="DatesAndTimes/DepartureDateTime"/> </EdiTerminalDepartureTime> <EdiAgentTerminalArrivalDate> <xsl:value-of select="DatesAndTimes/EstimatedArrivalDateTime"/> <xsl:value-of select="DatesAndTimes/ArrivalDateTime"/> </EdiAgentTerminalArrivalDate> <EdiActivevehicle> <xsl:value-of select="Vehicle/TransportShiftNumber"/> </EdiActivevehicle> <EdiConveyerZipCodeTown><xsl:text> </xsl:text></EdiConveyerZipCodeTown> </EdiImportTransportationDTO> </xsl:for-each> </Transportations> </InboundFargoMessage> </xsl:template> </xsl:stylesheet> What needs to be added, so that empty elements are left out? For example, a snippet from the resulting xml: <?xml version="1.0" encoding="UTF-8"?> <InboundFargoMessage xmlns:p="http://tempuri.org/XMLSchema.xsd" xmlns:far="http://www.itella.com/fargo/fargogate/" xmlns:a="http://tempuri.org/XMLSchema.xsd"> <EdiSender>XXXX</EdiSender> <EdiReceiver>YYYY</EdiReceiver> <EdiSource>TR/BAL/IST</EdiSource> <EdiDestination>FARGO</EdiDestination> <Transportations> <EdiImportTransportationDTO> <Consignments> <EdiImportConsignmentDTO> <ConsignmentLines> <EdiImportConsignmentLineDTO> <DangerousGoodsItems> <EdiImportDangerGoodsItemDTO> <EdiKolliTypeOuter/> <EdiKolliTypeInner/> <EdiTechnicalDescription/> <EdiUNno/> <EdiClass/> <EdiDangerFactor/> <EdiEmergencyTemperature/> </EdiImportDangerGoodsItemDTO> </DangerousGoodsItems> <BarCodes> <EdiImportConsignmentLineBarcodeDTO/> </BarCodes> <EdiNumberOfPieces>00000002</EdiNumberOfPieces> <EdiGrossWeight>0.000</EdiGrossWeight> <EdiHeight/> <EdiWidth/> <EdiLength/> <EdiGoodsDescription/> <EdiMarkingAndNumber/> <EdiKolliType>road</EdiKolliType> <EdiCbm/> <EdiLdm/> </EdiImportConsignmentLineDTO> That really needs to be: <?xml version="1.0" encoding="UTF-8"?> <InboundFargoMessage xmlns:p="http://tempuri.org/XMLSchema.xsd" xmlns:far="http://www.itella.com/fargo/fargogate/" xmlns:a="http://tempuri.org/XMLSchema.xsd"> <EdiSender>XXXX</EdiSender> <EdiReceiver>YYYY</EdiReceiver> <EdiSource>TR/BAL/IST</EdiSource> <EdiDestination>FARGO</EdiDestination> <Transportations> <EdiImportTransportationDTO> <Consignments> <EdiImportConsignmentDTO> <ConsignmentLines> <EdiImportConsignmentLineDTO> <DangerousGoodsItems/> <BarCodes/> <EdiNumberOfPieces>00000002</EdiNumberOfPieces> <EdiGrossWeight>0.000</EdiGrossWeight> <EdiKolliType>road</EdiKolliType> </EdiImportConsignmentLineDTO> In other words: Empty elements should be left out.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >