Search Results

Search found 933 results on 38 pages for 'xslt'.

Page 14/38 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • What is wrong with my XSLT for the XML File?

    - by atrueguy
    Actually my XML file has SVG info, and my Project lead wants me to develop an XSLT for the XMl file to convert it in to a PDF file. But when I try to do so I am failing to convert the XML file to PDF, can anyone help me out in this....... My Sample XML file <?xml version="1.0" encoding="ISO-8859-1"?> <!--<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">--> <!-- Generator: Arbortext IsoDraw 7.0 --> <svg width="100%" height="100%" viewBox="0 0 214.819 278.002"> <g id="Standard_x0020_layer"/> <g id="Catalog"> <line stroke-width="0.353" stroke-linecap="butt" x1="5.839" y1="262.185" x2="209.039" y2="262.185"/> <text transform="matrix(0.984 0 0 0.93 183.515 265.271)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174">© 2009 k Co.</text> <text transform="matrix(0.994 0 0 0.93 7.235 265.3)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174">087156-8-</text> <text transform="matrix(0.995 0 0 0.93 21.708 265.357)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174" font-weight="bold">AB</text> <text x="103.292" y="265.298" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174">P. 1/1</text> <g id="IC_TextBlock.1"> <g> <text transform="matrix(0.994 0 0 0.93 192.812 8.076)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="4.586" font-weight="bold">Fittings</text> <text transform="matrix(0.994 0 0 0.93 188.492 13.323)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="4.586" font-weight="bold">Raccords</text> <text transform="matrix(0.994 0 0 0.93 183.431 18.571)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="4.586" font-weight="bold">Conexiones</text> </g> </g> <g> <path stroke="none" fill="#000000" d="M26.507 12.628L26.507 4.977 28.599 4.977 28.599 10.673 30.946 10.673 30.946 12.628 26.507 12.628z"/> <path stroke="none" fill="#000000" d="M19.693 12.628L19.693 4.977 21.785 4.977 21.785 7.66 23.893 7.66 23.893 4.977 25.986 4.977 25.986 12.628 23.893 12.628 23.893 9.782 21.785 9.782 21.785 12.628 19.693 12.628z"/> <path stroke="none" fill="#000000" d="M12.587 4.977L9.566 8.621 13.019 12.631 10.25 12.63 7.905 9.9 7.9 9.9 7.9 12.628 5.81 12.628 5.81 4.977 7.9 4.977 7.9 7.267 7.884 7.27 9.875 4.977 12.587 4.977z"/> <path stroke="none" fill="#000000" d="M11.455 8.739C11.455 6.538 13.221 4.753 15.4 4.753L15.4 6.775C14.419 6.775 13.625 7.653 13.625 8.737 13.625 9.821 14.419 10.699 15.4 10.699 16.382 10.699 17.176 9.821 17.176 8.737 17.176 7.653 16.382 6.775 15.4 6.775L15.4 4.753C17.579 4.753 19.346 6.538 19.346 8.739 19.346 10.941 17.579 12.724 15.4 12.724 13.221 12.724 11.455 10.941 11.455 8.739z"/> <path stroke="none" fill="#000000" d="M33.472 4.977L35.621 4.977 35.621 6.74 33.521 6.743 33.515 7.952 35.454 7.952 35.454 9.664 33.518 9.664 33.518 10.833 35.64 10.833 35.64 12.628 33.491 12.628 31.376 12.628 31.376 4.977 33.472 4.977z"/> <path stroke="none" fill="#000000" d="M39.97 9.57L42.146 12.631 39.862 12.628 38.156 10.279 38.156 12.622 36.107 12.622 36.107 4.974 38.728 4.974 38.741 6.75 38.149 6.75 38.149 8.221 38.741 8.223C39.149 8.223 39.478 7.894 39.478 7.487 39.478 7.08 39.149 6.75 38.741 6.75L38.728 4.974C41.036 4.974 42.5 7.867 39.97 9.57z"/> <path stroke="none" fill="#000000" d="M42.415 12.205C42.415 11.82 42.72 11.512 43.106 11.512 43.49 11.512 43.796 11.82 43.796 12.205 43.796 12.586 43.49 12.894 43.106 12.894L43.106 12.73C43.402 12.73 43.631 12.51 43.631 12.205 43.631 11.894 43.402 11.676 43.106 11.676L43.179 11.837C43.344 11.837 43.457 11.868 43.457 12.057 43.457 12.189 43.39 12.243 43.262 12.252L43.436 12.554 43.262 12.554 43.103 12.252 42.99 12.252 42.99 12.143 43.182 12.143C43.262 12.143 43.308 12.127 43.308 12.035 43.308 11.962 43.216 11.962 43.146 11.962L42.99 11.962 42.99 12.143 42.99 12.252 42.99 12.554 42.832 12.554 42.832 11.837 43.179 11.837 43.106 11.676C42.804 11.676 42.579 11.894 42.579 12.205 42.579 12.51 42.804 12.73 43.106 12.73L43.106 12.894C42.72 12.894 42.415 12.586 42.415 12.205z"/> <g> <path stroke="none" fill="#000000" d="M8.837 17.466L8.599 17.466 8.554 16.832 8.544 16.832C8.31 17.329 7.843 17.539 7.339 17.539 6.243 17.539 5.697 16.675 5.697 15.724 5.697 14.774 6.243 13.91 7.339 13.91 8.071 13.91 8.666 14.305 8.794 15.067L8.461 15.067C8.417 14.666 8.003 14.194 7.339 14.194 6.418 14.194 6.027 14.964 6.027 15.724 6.027 16.486 6.418 17.257 7.339 17.257 8.111 17.257 8.56 16.716 8.544 15.978L7.36 15.978 7.36 15.695 8.837 15.695 8.837 17.466z"/> <path stroke="none" fill="#000000" d="M9.477 13.984L11.881 13.984 11.881 14.266 9.807 14.266 9.807 15.525 11.749 15.525 11.749 15.807 9.807 15.807 9.807 17.182 11.906 17.182 11.906 17.466 9.477 17.466 9.477 13.984z"/> <path stroke="none" fill="#000000" d="M12.364 13.984L12.734 13.984 14.763 16.929 14.772 16.929 14.772 13.984 15.105 13.984 15.105 17.466 14.734 17.466 12.705 14.521 12.695 14.521 12.695 17.466 12.364 17.466 12.364 13.984z"/> <path stroke="none" fill="#000000" d="M15.768 13.984L16.1 13.984 16.1 16.14C16.094 16.949 16.48 17.257 17.118 17.257 17.763 17.257 18.147 16.949 18.143 16.14L18.143 13.984 18.475 13.984 18.475 16.213C18.475 16.929 18.089 17.539 17.118 17.539 16.153 17.539 15.768 16.929 15.768 16.213L15.768 13.984z"/> <path stroke="none" fill="#000000" d="M19.167 13.984L19.498 13.984 19.498 17.466 19.167 17.466 19.167 13.984z"/> <path stroke="none" fill="#000000" d="M20.221 13.984L20.591 13.984 22.62 16.929 22.629 16.929 22.629 13.984 22.961 13.984 22.961 17.466 22.591 17.466 20.562 14.521 20.553 14.521 20.553 17.466 20.221 17.466 20.221 13.984z"/> <path stroke="none" fill="#000000" d="M23.658 13.984L26.064 13.984 26.064 14.266 23.99 14.266 23.99 15.525 25.931 15.525 25.931 15.807 23.99 15.807 23.99 17.182 26.088 17.182 26.088 17.466 23.658 17.466 23.658 13.984z"/> <path stroke="none" fill="#000000" d="M27.908 13.984L29.452 13.984C30.077 13.984 30.487 14.349 30.487 14.978 30.487 15.608 30.077 15.974 29.452 15.974L28.239 15.974 28.239 15.691 29.379 15.691C29.838 15.691 30.155 15.457 30.155 14.978 30.155 14.5 29.838 14.266 29.379 14.266L28.239 14.266 28.239 15.691 28.239 15.974 28.239 17.466 27.908 17.466 27.908 13.984z"/> <path stroke="none" fill="#000000" d="M31.643 13.984L32.014 13.984 33.38 17.466 33.024 17.466 32.598 16.384 31.013 16.384 31.117 16.1 32.487 16.1 31.814 14.314 31.117 16.1 31.013 16.384 30.594 17.466 30.239 17.466 31.643 13.984z"/> <path stroke="none" fill="#000000" d="M33.695 13.984L35.292 13.984C35.866 13.984 36.35 14.262 36.35 14.891 36.35 15.33 36.121 15.691 35.671 15.778L35.671 15.788C36.125 15.846 36.256 16.16 36.28 16.574 36.296 16.812 36.296 17.291 36.442 17.466L36.076 17.466C35.993 17.329 35.993 17.071 35.984 16.925 35.954 16.437 35.915 15.896 35.286 15.919L34.029 15.919 34.029 15.637 35.267 15.637C35.671 15.637 36.018 15.384 36.018 14.96 36.018 14.535 35.765 14.266 35.267 14.266L34.029 14.266 34.029 15.637 34.029 15.919 34.029 17.466 33.695 17.466 33.695 13.984z"/> <path stroke="none" fill="#000000" d="M36.603 13.984L39.363 13.984 39.363 14.266 38.149 14.266 38.149 17.466 37.817 17.466 37.817 14.266 36.603 14.266 36.603 13.984z"/> <path stroke="none" fill="#000000" d="M39.847 16.32C39.832 17.038 40.348 17.257 40.982 17.257 41.348 17.257 41.905 17.056 41.905 16.548 41.905 16.155 41.509 15.997 41.188 15.919L40.411 15.73C40.003 15.628 39.627 15.432 39.627 14.891 39.627 14.55 39.847 13.91 40.826 13.91 41.515 13.91 42.118 14.281 42.115 14.993L41.783 14.993C41.762 14.461 41.325 14.194 40.832 14.194 40.378 14.194 39.959 14.368 39.959 14.885 39.959 15.212 40.203 15.349 40.485 15.417L41.335 15.628C41.826 15.759 42.237 15.974 42.237 16.545 42.237 16.783 42.139 17.539 40.905 17.539 40.081 17.539 39.475 17.169 39.515 16.32L39.847 16.32z"/> </g> </g> </g> </svg> My Sample XSLT File <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:svg="http://www.w3.org/2000/svg"> <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="simple" page-height="11in" page-width="8.5in"> <fo:region-body margin="0.7in" margin-top="1.15in" margin-left=".8in"/> <fo:region-before extent="1.5in"/> <fo:region-after extent="1.5in"/> <fo:region-start extent="1.5in"/> <fo:region-end extent="1.5in"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="simple"> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:instream-foreign-object xmlns:svg="http://www.w3.org/2000/svg"> <svg:svg height="100%" width="100%" viewBox="0 0 214.819 278.002"> <xsl:for-each select="svg/g/path"> <svg:g style="stroke:none;fill:#000000;stroke:black;"> <svg:path> <xsl:variable name="s"> <xsl:value-of select="translate(@d,' ','')"/> </xsl:variable> <xsl:attribute name="d"><xsl:value-of select="translate($s,',',' ')"/></xsl:attribute> </svg:path> </svg:g> </xsl:for-each> <xsl:for-each select="svg/g/text()"> <xsl:value-of select="."/> </xsl:for-each> <xsl:for-each select="svg/g/g/path"> <svg:g style="stroke:none;fill:#000000;stroke:black;"> <svg:path> <xsl:variable name="s"> <xsl:value-of select="translate(@d,' ','')"/> </xsl:variable> <xsl:attribute name="d"><xsl:value-of select="translate($s,',',' ')"/></xsl:attribute> </svg:path> </svg:g> </xsl:for-each> <xsl:for-each select="svg/g/g/g/path"> <svg:g style="stroke:none;fill:#000000;"> <svg:path> <xsl:variable name="s1"> <xsl:value-of select="translate(@d,' ','')"/> </xsl:variable> <xsl:attribute name="d"><xsl:value-of select="translate($s1,',',' ')"/></xsl:attribute> </svg:path> </svg:g> </xsl:for-each> <xsl:for-each select="svg/g/line"> <svg:g style="stroke-linecap:butt;"> <xsl:variable name="x1"> <xsl:value-of select="@x1"/> </xsl:variable> <xsl:variable name="y1"> <xsl:value-of select="@y1"/> </xsl:variable> <xsl:variable name="x2"> <xsl:value-of select="@x2"/> </xsl:variable> <xsl:variable name="y2"> <xsl:value-of select="@y2"/> </xsl:variable> <xsl:variable name="stroke-width"> <xsl:value-of select="@stroke-width"/> </xsl:variable> <svg:line x1="$x1" y1="$y1" x2="$x2" y2="$y2" stroke-width="$stroke-width" stroke="black" /> </svg:g> </xsl:for-each> </svg:svg> </fo:instream-foreign-object> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> My Question I have developed the XSLT file for the XML, and I need to produce a pdf output after processing the xslt file. but I am not able to get the xml data in to my pdf. Please ask me if the information what I have provided is not sufficient, as I am bit new to Stackoverflow...

    Read the article

  • Saxon XSLT-Transformation: How to change serialization of an empty tag from <x/> to <x></x>?

    - by Ben
    Hello folks! I do some XSLT-Transformation using Saxon HE 9.2 with the output later being unmarshalled by Castor 1.3.1. The whole thing runs with Java at the JDK 6. My XSLT-Transformation looks like this: <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://my/own/custom/namespace/for/the/target/document"> <xsl:output method="xml" encoding="UTF-8" indent="no" /> <xsl:template match="/"> <ns:item> <ns:property name="id"> <xsl:value-of select="/some/complicated/xpath" /> </ns:property> <!-- ... more ... --> </xsl:template> So the thing is: if the XPath-expression /some/complicated/xpath evaluates to an empty sequence, the Saxon serializer writes <ns:property/> instead of <ns:property></ns:property>. This, however, confuses the Castor unmarshaller, which is next in the pipeline and which unmarshals the output of the transformation to instances of XSD-generated Java-code. So my question is: How can I tell the Saxon-serializer to output empty tags not as standalone tags? Here is what I am proximately currently doing to execute the transformation: import net.sf.saxon.s9api.*; import javax.xml.transform.*; import javax.xml.transform.sax.SAXSource; // ... // read data XMLReader xmlReader = XMLReaderFactory.createXMLReader(); // ... there is some more setting up the xmlReader here ... InputStream xsltStream = new FileInputStream(xsltFile); InputStream inputStream = new FileInputStream(inputFile); Source xsltSource = new SAXSource(xmlReader, new InputSource(xsltStream)); Source inputSource = new SAXSource(xmlReader, new InputSource(inputStream)); XdmNode input = processor.newDocumentBuilder().build(inputSource); // initialize transformation configuration Processor processor = new Processor(false); XsltCompiler compiler = processor.newXsltCompiler(); compiler.setErrorListener(this); XsltExecutable executable = compiler.compile(xsltSource); Serializer serializer = new Serializer(); serializer.setOutputProperty(Serializer.Property.METHOD, "xml"); serializer.setOutputProperty(Serializer.Property.INDENT, "no"); serializer.setOutputStream(output); // execute transformation XsltTransformer transformer = executable.load(); transformer.setInitialContextNode(input); transformer.setErrorListener(this); transformer.setDestination(serializer); transformer.setSchemaValidationMode(ValidationMode.STRIP); transformer.transform(); I'd appreciate any hint pointing in the direction of a solution. :-) In case of any unclarity I'd be happy to give more details. Nightly greetings from Germany, Benjamin

    Read the article

  • How to format a string to camel case in XSLT?

    - by DBA_Alex
    I'm trying to format strings in XSLT that needs to be in camel case to be used appropriately for the application I'm working with. For example: this_text would become ThisText this_long_text would become ThisLongText Is it possible to also set this up where I can send an input to the format so I do not have to recreate the format multiple times?

    Read the article

  • How to group items by date range in XSLT?

    - by glenatron
    I have a bunch of data that looks a little like this: <item> <colour>Red</colour> <date_created>2009-10-10 12:01:55</date_created> <date_sold>2009-10-20 22:32:12</date_sold> </item> <item> <colour>Blue</colour> <date_created>2009-11-01 13:21:00</date_created> <date_sold>2009-11-21 12:32:12</date_sold> </item> <item> <colour>Blue</colour> <date_created>2009-10-29 21:23:02</date_created> <date_sold>2009-10-20 02:02:22</date_sold> </item> <item> <colour>Red</colour> <date_created>2009-11-02 09:11:51</date_created> <date_sold>2009-11-20 09:15:53</date_sold> </item> <item> <colour>Red</colour> <date_created>2009-10-18 11:00:55</date_created> <date_sold>2009-10-20 11:12:22</date_sold> </item> Now what I would like to be able to do is to run that through an XSLT stylesheet such that I get ouput looking like this: Colour | In stock 1 week | In stock 2 weeks | In stock 3 weeks Red | 1 | 3 | 2 Blue | 0 | 2 | 1 Currently I have a stylesheet that uses basic muenchian grouping to show that 30% of stock was Red and 70% blue, but I can't see a way to find the number of nodes withing a given date range. Is there a way to use keys to select a range? Do I need to create some kind of intermediate data node? Is there a different route that shows I'm barking up the wrong tree with both those suggestions? Is this even possible with XSLT or do I need to find a way to change the data source?

    Read the article

  • Tricky issue with using xslt with badly formed html...

    - by Ryba
    Hi there, I am fairly new to xslt (2.0) and am having some trouble with a tricky issue. Essentially I have a badly formatted html file like below: <html> <body> <p> text 1 </p> <div> <p> text 2</p> </div> <p> Here is a list <ul> <ol> <li> ListItem1 </li> <li> ListItem1 </li> </ol> <dl> <li> dl item </li> <li> dl item2 </li> </dl> </ul> <div> <p> I was here</p> </div> </p> And I am trying to put it into a nicely formated XML file. In my xslt file I recursively check if all children of a p or div are other p's or div's and just promote them, other wise I use them as stand alone paragraphs. I extended this idea so that if a p or div with a child list show up properly but don't promote the list children. A problem that I am having is that the output xml I get is the following <?xml version="1.0" encoding="utf-8"?><html> <body> <p> text 1 </p> <p> text 2</p> Here is a list <ul> <ol> <li> ListItem1 </li> <li> ListItem1 </li> </ol> <dl> <li> dl item </li> <li> dl item2 </li> </dl> </ul> <p> I was here</p> "Here is a list" needs to be in paragraph tags too! I am going crazy trying to solve this ... Any input/links would be greatly appreciated.

    Read the article

  • How to check if an apply-template filled variable is a string or (possibly) empty node in XSLT?

    - by calavera.info
    I need a test which would evaluate to true in two cases: There is a string inside which contains any non white space characters There is any node (which can be possibly empty) on a variable that is filled with apply-template call result. I tried test="normalize-space($var)" but this doesn't cover the empty tag possibility. I also tried simply this: test="$var" but this evaluate to true even for white space only strings. By the way "$var/*" produces an error "Expression ...something I don't remember... node-set" which is I think because of apply-template variable instantiation. Is there any (which means even multi level decision) solution for this? EDIT: I forgot to say that it's for XSLT 1.0 and preferably without any exslt extensions or similar.

    Read the article

  • Is there any reasons to prefer SparkViewEngine over XSLT (or vice versa) for a standalone email gene

    - by Stephane
    I have a service that receives an object containing all the data needed to build a newsletter. I need to be able to generate the email using different templates. I don't want to involve the whole ASP.NET stack for that, so I want a separate templating engine. Reading a lot of opinions, I have found that XSLT was not getting very much love when it comes to templating engines. Why? SparkViewEngine is a "new cool toy", but it seems mature enough considering the number of projects that have been built with it. What do you think? Did you used those 2 engines? in which situation, and what strength/pain did you enjoy/endure

    Read the article

  • What XSLT processor should I use for Java transformation?

    - by Artic
    What XSLT processor should I use for Java transformation? There are SAXON, Xalan and TrAX. What is the criteria for my choice? I need simple transformation without complicated logical transformations. Need fast and easy to implement solution. APP runs under Tomcat, Java 1.5. I have some jaxp libraries and could not understand what is the version of jaxp used. Thanks in advance. Best regards.

    Read the article

  • How to deal with presence or not of xml namespaces using xslt.

    - by Mycol
    I have some XML/TEI documents, and i'm writing an XSLT 2.0 to extract their content. Almost all TEI documents has no namespace, but one has the default namespace (xmlns="http://www.tei-c.org/ns/1.0"). So all documents has the same aspect, with unqulified tags like <TEI> or <teiHeader>, but if I try to extract the content, all works with "non-namespaced-documents", but nothing (of course) is extracted from the namespaced-document. So i used the attribute xpath-default-namespace="http://www.tei-c.org/ns/1.0" and now (of course) the only document working is the namespaced one. I can't edit documents at all, so what I'm asking is if there's a way to change dynamically the xpath-default-namespace in order to make work xpaths like //teiHeader both with namespaced and non-namespaced documents

    Read the article

  • Setting xsl:value-of into an href attribute and the text field of a link in an XSLT

    - by Josh
    I am trying to set an a href that is both a link to and has the text for a link through an XSLT transformation. Here's what it looks like so far. <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="actionUrl"/> </xsl:attribute> <xsl:text><xsl:value-of select="actionUrl"/></xsl:text> </xsl:element> The problem is that it says "xsl:value-of cannot be a child of the xsl:text element". Any ideas?

    Read the article

  • XSLT string with HTML entities - How can I get it to render as HTML?

    - by Kache4
    I'm completely new to using XSL, so if there's any information that I'm neglecting to include, just let me know. I have a string in my XSLT file that I can display like this: <xsl:value-of select="@Description/> and it shows up, rendered in a browser like: <div>My text has html entities within it</div> <div>This includes quotes, like &quot;Hello World&quot; and sometimes whitespaces.&nbsp;</div> What can I do to get this string rendered as html, so that <div></div> results in newlines, &quot; gives me ", and &nbsp gives me a space? I could elaborate on things I've already tried that haven't worked, but I don't know if that's relevant.

    Read the article

  • Is this XSLT correct for the XML file which I have developed?

    - by atrueguy
    This is my XML file. I need to develop a xslt for this. <?xml version="1.0" encoding="ISO-8859-1"?> <!--<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">--> <!-- Generator: Arbortext IsoDraw 7.0 --> <svg width="100%" height="100%" viewBox="0 0 214.819 278.002"> <g id="Standard_x0020_layer"/> <g id="Catalog"> <line stroke-width="0.353" stroke-linecap="butt" x1="5.839" y1="262.185" x2="209.039" y2="262.185"/> <text transform="matrix(0.984 0 0 0.93 183.515 265.271)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174">© 2009 k Co.</text> <text transform="matrix(0.994 0 0 0.93 7.235 265.3)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174">087156-8-</text> <text transform="matrix(0.995 0 0 0.93 21.708 265.357)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174" font-weight="bold">AB</text> <path stroke-width="0.088" stroke-linecap="butt" stroke-dasharray="2.822 1.058" d="M162.037 107.578L174.439 100.417L180.698 104.03"/> <g id="AUTOID_20445" class="52971"> <line stroke-width="0.088" stroke-linecap="butt" x1="68.859" y1="43.621" x2="65.643" y2="45.399"/> <text transform="matrix(0.944 0 0 0.93 69.165 43.356)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="2.775" font-weight="bold">52971</text> </g> </g> </svg> I have developed a XSLT for this in this way, but I am failing to produce the desired output can any one help me in this. <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:svg="http://www.w3.org/2000/svg"> <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="simple" page-height="11in" page-width="8.5in"> <fo:region-body margin="0.7in" margin-top="1.15in" margin-left=".8in"/> <fo:region-before extent="1.5in"/> <fo:region-after extent="1.5in"/> <fo:region-start extent="1.5in"/> <fo:region-end extent="1.5in"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="simple"> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:instream-foreign-object> <svg:svg xmlns:svg="http://www.w3.org/2000/svg" height="100%" width="100%" viewBox="0 0 214.819 278.002"> <xsl:for-each select="svg/g"> <svg:g style="stroke:none;fill:#000000;"> <svg:path> <xsl:variable name="s"> <xsl:value-of select="translate(@d,' ','')"/> </xsl:variable> <xsl:attribute name="d"><xsl:value-of select="translate($s,',',' ')"/></xsl:attribute> </svg:path> </svg:g> </xsl:for-each> <xsl:for-each select="svg/g"> <svg:line x1 = "{$x1}" y1 = "{$y1}" x2 = "{$x2}" y2 = "{$y2}" style = "stroke-width: 0.088; stroke: black;"/> <line xmlns="http://www.w3.org/2000/svg" x1="{$x1}" y1="{$y1}" x2="{$x2}" y2="{$y2}" stroke-width="0.088" stroke="black" fill="#000000" /> </xsl:for-each> </svg:svg> </fo:instream-foreign-object> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> Please help me in this

    Read the article

  • How can I add multiple filters to a XSLT for-each statement?

    - by Huuuze
    I have the following XSLT node: <xsl:for-each select="Book[title != 'Moby Dick']"> .... </xsl:for-each> However, I'd like use multiple filters in the for-each. I've tried the following, but it doesn't seem to work: <!-- Attempt #1 --> <xsl:for-each select="Book[title != 'Moby Dick'] or Book[author != 'Rowling'] "> .... </xsl:for-each> <!-- Attempt #2 --> <xsl:for-each select="Book[title != 'Moby Dick' or author != 'Rowling']"> .... </xsl:for-each>

    Read the article

  • Is there any way to prevent the display of unmatched xml tags using xslt?

    - by StevenWilkins
    Here is a contrived example of an xml document. In my real world case, the xml is fairly complex with multiple nested levels. <alphabet> <a>A</a> <b>B</b> <c>C</c> ... and so on </alphabet> Using xslt, I want to transform the document so that only the vowels are printed. In my real world case, we're using empty template match tags to block the display. But that's too verbose for my liking.

    Read the article

  • How can I strip line breaks from my XML with XSLT?

    - by Eric
    I have this XSLT: <xsl:strip-space elements="*" /> <xsl:template match="math"> <img class="math"> <xsl:attribute name="src">http://latex.codecogs.com/gif.latex?<xsl:value-of select="text()" /></xsl:attribute> </img> </xsl:template> Which is being applied to this XML (notice the line break): <math>\text{average} = \alpha \times \text{data} + (1-\alpha) \times \text{average}</math> Unfortunately, the transform creates this: <img class="math" src="http://latex.codecogs.com/gif.latex?\text{average} = \alpha \times \text{data} + (1-\alpha) \times&#10;&#9;&#9;&#9;&#9;&#9;\text{average}" /> Notice the whitespace character literals. Although it works, it's awfully messy. How can I prevent this?

    Read the article

  • XSLT ... I can'f find a (working) find minimum value in XML and set variable

    - by Bob
    I've search for hours and not found an example that allows for the very first position to be the lowest. I'm getting 'False' instead of the value returned .... EDIT: Oddly enough if I run a 2nd instance as MAX_Landed with ascending it returns a value just fine. If I switch the order in the XSLT the first instance will return 'False' and the 2nd will work. Hope I'm making sense ..... Example XML which I can't get formatted to show correctly and in a hurry so you get the gist I hope: <?xml version="1.0"?> <GetLowestOfferListingsForASINResponse xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01"> <GetLowestOfferListingsForASINResult ASIN="0470067802" status="Success"> <AllOfferListingsConsidered>false</AllOfferListingsConsidered> <Product xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01" xmlns:ns2="http://mws.amazonservices.com/schema/Products/2011-10-01/default.xsd"> <LowestOfferListings> <LowestOfferListing> <Qualifiers> <ItemCondition>Used</ItemCondition> <ItemSubcondition>Good</ItemSubcondition> </Qualifiers> <Price> <LandedPrice> <Amount>15.71</Amount> </LandedPrice> </Price> </LowestOfferListing> <LowestOfferListing> <Qualifiers> <ItemCondition>Used</ItemCondition> <ItemSubcondition>Good</ItemSubcondition> </Qualifiers> <Price> <LandedPrice> <Amount>16.71</Amount> </LandedPrice> </Price> </LowestOfferListing> <LowestOfferListing> <Qualifiers> <ItemCondition>Used</ItemCondition> <ItemSubcondition>Good</ItemSubcondition> </Qualifiers> <Price> <LandedPrice> <Amount>18.71</Amount> </LandedPrice> </Price> </LowestOfferListing> </LowestOfferListings> </Product> </GetLowestOfferListingsForASINResult> </GetLowestOfferListingsForASINResponse> Example XSLT : <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:amz="http://mws.amazonservices.com/schema/Products/2011-10-01" exclude-result-prefixes="amz"> <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> <xsl:template match="/"> <xsl:variable name="MIN_Landed"> <xsl:for-each select="//Amount"> <xsl:sort data-type="number" order="ascending"/> <xsl:if test="position()=1"><xsl:value-of select="."/></xsl:if> </xsl:for-each> </xsl:variable> <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult"> <ERRORCODE>0</ERRORCODE> <PRODUCT BUILD="" NAME="" VERSION=""/> <DATABASE DATEFORMAT="M/d/yyyy" LAYOUT="" NAME="" RECORDS="1" TIMEFORMAT="h:mm:ss a"/> <METADATA> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="DATA" TYPE="TEXT"/> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Min_Landed" TYPE="TEXT"/> </METADATA> <RESULTSET> <xsl:attribute name="FOUND">1</xsl:attribute> <xsl:for-each select="amz:GetLowestOfferListingsForASINResponse/amz:GetLowestOfferListingsForASINResult/amz:Product/amz:LowestOfferListings/amz:LowestOfferListing"> <ROW> <xsl:attribute name="MODID">0</xsl:attribute> <xsl:attribute name="RECORDID">1</xsl:attribute> <COL> <DATA> <xsl:value-of select="amz:Qualifiers/amz:ItemCondition"/> </DATA> </COL> <COL> <DATA> <xsl:value-of select="$MIN_Landed"/> </DATA> </COL> </ROW> </xsl:for-each> </RESULTSET> </FMPXMLRESULT> </xsl:template> </xsl:stylesheet> HELP PLEASE! I really didn't want to post so much Amazon code but here it is stripped down to a bare bones response

    Read the article

  • XSLT - Adding a class to something with a class?

    - by Probocop
    When using XSLT how do I apply a class to an element which already has a class? The way I'm doing it it replaces the class that is already present? How would I add the class in addition to the existing class? My code is as follows: <xsl:if test="data[@alias = 'off'] = 1"> <xsl:attribute name="class">off</xsl:attribute> </xsl:if> <xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id"> <xsl:attribute name="class">active</xsl:attribute> </xsl:if> Thanks.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >