Search Results

Search found 2964 results on 119 pages for 'qt stylesheet'.

Page 79/119 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • 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

  • XSLT generating attributes if source-Element is in parameterfile

    - by Siegfried
    Hi, i got an xml-file with some elements. For some of these is an aqvivalent in a parameter xml-file along with some other elements. I want to add these other elements from parm-file as parameter to output file if element-names are matching. (the Attributes should only be generated if an element "InvoiceHeader" exists in the source-xml. Here is my code... <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> <xsl:variable name="rpl" select="document('ParamInvoice.xml')"></xsl:variable> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xsl:apply-templates></xsl:apply-templates> </xsl:template> <xsl:template match="*"> <xsl:copy> <xsl:if test="$rpl/StoraInvoice/local-name()"> <xsl:call-template name="AttributeErzeugen"> <xsl:with-param name="attr" select="$rpl/StoraInvoice/local-name()"></xsl:with-param> </xsl:call-template> </xsl:if> <xsl:apply-templates></xsl:apply-templates> </xsl:copy> </xsl:template> <xsl:template name="AttributeErzeugen"> <xsl:param name="attr"></xsl:param> <xsl:for-each select="$attr"> <xsl:attribute name="{Attibute/@name}"><xsl:value-of select="."></xsl:value- of></xsl:attribute> </xsl:for-each> </xsl:template> </xsl:stylesheet> and here the param-file <?xml version="1.0" encoding="UTF-8"?> <StoraInvoice> <InvoiceHeader> <Attribute name="Fuehrend">YYY</Attribute> <Attribute name="Feld">FFFF</Attribute> <Attribute name="Format">XYZXYZ</Attribute> </InvoiceHeader> </StoraInvoice> Siegfried

    Read the article

  • include external css.gz in drupal themes

    - by kles
    hi, im trying to include css.gz from external source, but still not works on all browsers <link rel="stylesheet" type="text/css" media="all" href="http://www.website.com/style.css.gz" /> i dont know what is the problem (my web server: nginx, and test server: apache) thanks

    Read the article

  • PHP Echo a large block of text

    - by Thomas
    Im new to PHP and I can't figure out what the rules are for using the echo function. For example, if I need to echo a large block of css/js, do I need to add echo to each line of text or is there a way to echo a large block of code with a single echo? When I try to echo a big block of code like this one, I get an error: if (is_single()) { echo '<link type="text/css" rel="stylesheet" href="http://jotform.com/css/styles/form.css"/><style type="text/css"> .form-label{ width:150px !important; } .form-label-left{ width:150px !important; } .form-line{ padding:10px; } .form-label-right{ width:150px !important; } body, html{ margin:0; padding:0; background:false; } .form-all{ margin:0px auto; padding-top:20px; width:650px !important; color:Black; font-family:Verdana; font-size:12px; } </style> <link href="http://jotform.com/css/calendarview.css" rel="stylesheet" type="text/css" /> <script src="http://jotform.com/js/prototype.js" type="text/javascript"></script> <script src="http://jotform.com/js/protoplus.js" type="text/javascript"></script> <script src="http://jotform.com/js/protoplus-ui.js" type="text/javascript"></script> <script src="http://jotform.com/js/jotform.js?v3" type="text/javascript"></script> <script src="http://jotform.com/js/location.js" type="text/javascript"></script> <script src="http://jotform.com/js/calendarview.js" type="text/javascript"></script> <script type="text/javascript"> JotForm.init(function(){ $('input_6').hint('ex: [email protected]'); }); </script>'; }else { } Is there a better way to echo large blocks of code without a lot of work (adding echo to each line for example)?

    Read the article

  • I can't load the css files

    - by mfalcon
    I want to load some .css files to my Django project but I don't know why they aren't loaded. The css files are located at "/myproject/media/css". settings.py: import os.path PROJECT_DIR = os.path.dirname(__file__) MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media') urls.py: from django.conf import settings ... (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), ) base.html: <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_ROOT }}css/myStyle.css" />

    Read the article

  • Why won't jqGrid populate initially in Chrome

    - by Maxm007
    Hi, I've got a web page with a jqGrid that uses am xmlreader to populate itself with data that is spat out by a RoR service. The page loads fine in firefox and safari. In Chrome however I get a blank grid. Only when I change the sort order by clicking on the columns does it populate. <html> <head> <title>LocalFx</title> <link href="/stylesheets/main.css?1271423251" media="screen" rel="stylesheet" type="text/css" /> <link href="/stylesheets/redmond/jquery-ui-1.8.custom.css?1271404544" media="screen" rel="stylesheet" type="text/css" /> <link href="/stylesheets/ui.jqgrid.css?1265561560" media="screen" rel="stylesheet" type="text/css" /> <script src="/javascripts/jquery-1.3.2.min.js?1259426008" type="text/javascript"></script> <script src="/javascripts/i18n/grid.locale-en.js?1266140090" type="text/javascript"></script> <script src="/javascripts/jquery.jqGrid.min.js?1271437772" type="text/javascript"></script> <script type="text/javascript"> jQuery().ready(function() { jQuery("#list").jqGrid({ xmlReader: { root:"contracts", row:"contract", repeatitems:false, id:"id" }, jsonReader: { repeatitems:false, root:"contracts" }, datatype: 'xml', url:'http://localhost:3000/contracts/index/all.xml', mtype: 'GET', colNames:['User','B/S', 'Currency', 'Amount', 'Rate'], colModel :[ {name:'user', index:'username', width:100 , xmlmap:'user>username'} , {name:'side', index:'side', width:100 , xmlmap:'side'} , {name:'currency', index:'ccy', width:100 , xmlmap:'currency>ccy'} , {name:'amount', index:'amount', width:100 , xmlmap:'amount'}, {name:'rate', index:'rate', width:100 , xmlmap:'exchange-rate>rate'} ], pager: jQuery('#pager'), caption: 'Contracts', sortname: 'side', sortorder: "asc", viewrecords:true, rowNum:10, rowList:[10,20,30] }); $("#list").trigger("reloadGrid") }); </script> </head> <body> <table id="list" align="center" class="scroll"></table> <div id="pager" class="scroll" style="text-align:center;"></div> </body> </html> This is the xml: <contracts type="array"> <contract> <amount type="float">1000.0</amount> <created-at type="datetime">2010-04-16T13:59:40Z</created-at> <currency-id type="integer">488525179</currency-id> <id type="integer">18277852</id> <side>BUY</side> <updated-at type="datetime">2010-04-16T13:59:40Z</updated-at> <user-id type="integer">830138774</user-id> <exchange-rate> <contract-id type="integer">18277852</contract-id> <created-at type="datetime">2010-04-16T13:59:40Z</created-at> <denccy-id type="integer">890731696</denccy-id> <id type="integer">419011264</id> <numccy-id type="integer">488525179</numccy-id> <rate type="float">1.3</rate> <updated-at type="datetime">2010-04-16T13:59:40Z</updated-at> </exchange-rate> <user> <created-at type="datetime">2010-04-16T13:59:40Z</created-at> <id type="integer">830138774</id> <updated-at type="datetime">2010-04-16T13:59:40Z</updated-at> <username>John Doe</username> </user> <currency> <ccy>EUR</ccy> <created-at type="datetime">2010-04-16T13:59:40Z</created-at> <id type="integer">488525179</id> <updated-at type="datetime">2010-04-16T13:59:40Z</updated-at> </currency> </contract> <contract> <amount type="float">500.0</amount> <created-at type="datetime">2010-04-16T13:59:40Z</created-at> <currency-id type="integer">890731696</currency-id> <id type="integer">716237132</id> <side>SELL</side> <updated-at type="datetime">2010-04-16T13:59:40Z</updated-at> <user-id type="integer">830138774</user-id> <exchange-rate> <contract-id type="integer">716237132</contract-id> <created-at type="datetime">2010-04-16T13:59:40Z</created-at> <denccy-id type="integer">890731696</denccy-id> <id type="integer">861902380</id> <numccy-id type="integer">488525179</numccy-id> <rate type="float">1.3</rate> <updated-at type="datetime">2010-04-16T13:59:40Z</updated-at> </exchange-rate> <user> <created-at type="datetime">2010-04-16T13:59:40Z</created-at> <id type="integer">830138774</id> <updated-at type="datetime">2010-04-16T13:59:40Z</updated-at> <username>John Doe</username> </user> <currency> <ccy>GBP</ccy> <created-at type="datetime">2010-04-16T13:59:40Z</created-at> <id type="integer">890731696</id> <updated-at type="datetime">2010-04-16T13:59:40Z</updated-at> </currency> </contract> </contracts>

    Read the article

  • html-encode output && incorrect string error

    - by fusion
    my data includes arabic characters which looks like garbage in mysql but displays correctly when run on browser. my questions: how do i html-encode the output? if i add this to all my files: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> i get this error: Error: Incorrect string value: '\xE4\xEE\xC3\xD8\xEF\xE6...' for column 'cQuotes' at row 1 i'm working on php/mysql platform. insertion form in html: <!doctype html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Your Favorite Quotes</title> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" media="screen" charset="utf-8" /> <script type="text/javascript" src="scripts/jquery-1.4.2.js"></script> <script src="scripts/jquery.validationEngine-en.js" type="text/javascript"></script> <script src="scripts/jquery.validationEngine.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#submitForm").validationEngine() }) </script> </head> <body> <div class="container"> <div class="center_div"> <h2>Submit Your Quote</h2> <fieldset> <form id="submitForm" action="qinsert.php" method="post"> <div class="field"> <label>Author: </label> <input id="author" name="author" type="text" class="validate[required,custom[onlyLetter],length[0,100]]"> </div><br /> <div class="field"> <label>Quote: </label> <textarea id="quote" name="quote" class="validate[required, length[0,1000]]"></textarea> <br /> </div> <input id="button1" type="submit" value="Submit" class="submit" /><br /> <input id="button2" type="reset" value="Reset" /> </form> </fieldset> </div> </div> </body> </html> ////////////////////// query in php: //<?php //header('Content-Type: text/html; charset=UTF-8'); //?> <!doctype html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="style2.css" /> <title>Your Quote Databank</title> </head> <body> <?php include 'config.php'; echo "Connected <br />"; //check for quotes and apostrophes $author = ''; $quote = ''; $author = $_POST['author']; $quote = $_POST['quote']; $author = mysql_real_escape_string(trim($author)); $quote = mysql_real_escape_string(trim($quote)); //************************** //validating data $query = "SELECT * FROM Quotes where cQuotes = '$quote' limit 1;"; $result = mysql_query($query, $conn); //now check that the number of rows is 0 if (mysql_num_rows($result) > 0 ) { header("Location: /error.html"); exit; } //inserting data //mysql_query("SET NAMES 'utf8'"); //mysql_query("SET CHARACTER SET utf8"); $sql="INSERT INTO Quotes (vauthor, cquotes) VALUES ('$author', '$quote')"; if (!mysql_query($sql,$conn)) { die('Error: ' . mysql_error()); } echo "<div class='container'><p><label class='lbl_record'> Record Added Successfully!</label>"; echo "<a href='qform.html'> Submit a New Quote!</a></p>"; //************************** //selecting data $result = mysql_query("SELECT * FROM Quotes ORDER BY idQuotes DESC"); echo "<div class='center_div'>"; echo "<table> <thead> <tr> <th>Author</th> <th>Quotes</th> </tr> </thead>"; while($row = mysql_fetch_array($result)) { echo "<tbody><tr>"; echo "<td width='150px'>" . $row['vAuthor'] . "</td>"; echo "<td>" . $row['cQuotes'] . "</td>"; echo "</tr>"; } echo "</tbody></table>"; echo "</div></div>"; //************************** include 'close_config.php'; ?> </body> </html>

    Read the article

  • XSLT, JSTL e JSF

    - by Paulo S.
    I have a xml file which I want to transform in a jsf code page. To do that I've created a xsl file. xml: <?xml version='1.0' encoding='ISO-8859-1'?> <questionario xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='Schema2.xsd'> <componente nome='input'> <id>input1</id> </componente> <componente nome='input'> <id>input2</id> </componente> </questionario> code: <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %> <c:set var="xml" value="${questionarioXSLBean.xml}"/> <c:set var="xsl"> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" exclude-result-prefixes="f h"> <xsl:template match="/"> <xsl:for-each select="questionario/componente"> <xsl:if test="attribute::nome = 'input'"> <xsl:variable name="id"> <xsl:value-of select="id" /> </xsl:variable> <h:inputText id="{$id}"/> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> </c:set> <x:transform xml="${xml}" xslt="${xsl}" /> The problem is that nothing is shown in my screen because the generated code for <h:inputText id="input1"/> is <h:inputText id="input_1" xmlns:h="http://java.sun.com/jsf/html"/> how can I replace the xmlns:h="http://java.sun.com/jsf/html" or suppress it. Thanks! Update: Let me clarify what I want to do. I want to generate a jsf page dynamically depending on the attributes of a xml file, for instance, 2 input texts, 3 check boxes, etc. To make the transformation to jsf I thought in two approaches, one using jstl and another using xslt. The problem with the former is that I couldn't integrate jstl with jsf code (to set jsf components attributes using jstl variables) and with the last approach, I'm facing the problem described above.I wouldn't like to create components in java (UIComponents). Any suggestions?

    Read the article

  • setting z-index jquery ui controls?

    - by maxp
    Annoyingly, the jquery ui's set a few css properties inline, making it impossible to override them in the stylesheet. I tried to override the values with jquery, but then they get changed back as soon as the control is interacted with. Does anyone know if any of the jquery ui control's initialisers/constructors have the ability to override their z-index value or set other css properties?

    Read the article

  • how to get child nodes in xsl

    - by ppp
    here my code- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="ArrayOfLinkEntity" name="bindLink"> <ul> <xsl:for-each select="LinkEntity[ParentLinkId=0]"> <li> <xsl:variable name="linkId" select="LinkId"/> <xsl:variable name="child" select="count(/ArrayOfLinkEntity/LinkEntity[ParentLinkId=$linkId])"/> <xsl:value-of select="$child"/> <xsl:choose> <xsl:when test="($child &gt; 0)"> <a href="#" data-flexmenu="flexmenu1" onclick="javascript:setPageLinkId({$linkId});"> <xsl:value-of select="LinkTitle"/> <img src="../images/down.gif" border="0"/> </a> </xsl:when> <xsl:otherwise > <a href="#" onclick="javascript:setPageLinkId({$linkId});"> <xsl:value-of select="LinkTitle"/> </a> </xsl:otherwise> </xsl:choose> </li> </xsl:for-each> </ul> </xsl:template> </xsl:stylesheet> but I am getting $child=0 always.but there exists children. my xml structure- <ArrayOfLinkEntity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <LinkEntity> <EntityId>00000000-0000-0000-0000-000000000000</EntityId> <LinkId>1</LinkId> <SequenceNo>1</SequenceNo> <ParentLinkId>0</ParentLinkId> <LinkTitle>Home</LinkTitle> <SubLink /> </LinkEntity> ... </ArrayOfLinkEntity> What should I do? Please suggest.

    Read the article

  • Parameters not being passed into template when using the .Net transform classes

    - by Chris F
    I am using the .Net XslCompiledTranform to run some simple XSLT (see below for a simplified example). The example XSLT is meant to do simply show the value of the parameter that is passed in to the template. The output is what I expect it to be (i.e. <result xmlns:p1="http://www.doesnotexist.com"> <valueOfParamA>valueA</valueOfParamA> </result> when I use Saxon 9.0, but when I use XslCompiledTransform (XslTransform) in .net I get <result xmlns:p1="http://www.doesnotexist.com"> <valueOfParamA></valueOfParamA> </result> The problem is that that the parameter value of paramA is not being passed into the template when I use the .Net classes. I completely stumped as to why. when I step through in Visual Studio, the debugger says that the template will be called with paramA='valueA' but when execution switches to the template the value of paramA is blank. Can anyone explain why this is happening? Is this a bug in the MS implementation or (more likely) am I doing something that is forbidden in XSLT? Any help greatly appreciated. This is the XSLT that I am using <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:extfn="http://exslt.org/common" exclude-result-prefixes="extfn" xmlns:p1="http://www.doesnotexist.com"> <!-- Replace msxml with xmlns:extfn="http://exslt.org/common" xmlns:extfn="urn:schemas-microsoft-com:xslt" --> <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <xsl:variable name="resultTreeFragment"> <p1:foo> </p1:foo> </xsl:variable> <xsl:variable name="nodeset" select="extfn:node-set($resultTreeFragment)"/> <result> <xsl:apply-templates select="$nodeset" mode="AParticularMode"> <xsl:with-param name="paramA" select="'valueA'"/> </xsl:apply-templates> </result> </xsl:template> <xsl:template match="@* | node()" mode="AParticularMode"> <xsl:param name="paramA"/> <valueOfParamA> <xsl:value-of select="$paramA"/> </valueOfParamA> </xsl:template> </xsl:stylesheet>

    Read the article

  • DataContractSerializer and XSLT

    - by Russ Clark
    I've got a simple Employee class that I'm trying to serialize to an XDocument and then use XSLT to transform the document to a page that displays both the properties (Name and ID) from the Employee class, and an html form with 2 radio buttons (Approve and Reject) and a submit button. Here is the Employee class: [Serializable, DataContract(Namespace="XSLT_MVC.Controllers/")] public class Employee { [DataMember] public string Name { get; set; } [DataMember] public int ID { get; set; } public Employee() { } public Employee(string name, int id) { Name = name; ID = id; } public XDocument GetDoc() { XDocument doc = new XDocument(); var serializer = new DataContractSerializer(typeof(Employee)); using (var writer = doc.CreateWriter()) { serializer.WriteObject(writer, this); writer.Close(); } return doc; } } And here is the XSLT file: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="html" indent="yes"/> <xsl:template match="/"> <html> <body> <xsl:value-of select="Employee/Name"/> <br /> <xsl:value-of select="Employee/ID"/> <br /> <form method="post" action="/Home/ProcessRequest?id={Employee/ID}"> <input id="Action" name="Action" type="radio" value="Approved"></input> Approved <br /> <input id="Action" name="Action" type="radio" value="Rejected"></input> Rejected <br /> <input type="submit" value="Submit"></input> </form> </body> </html> </xsl:template> </xsl:stylesheet> When I run this, all I get is the html form with the 2 radio buttons and the submit button, but not the properties from the Employee class. I saw a separate StackOverflow post that said I need to change the <xsl:template match="/"> to match on the namespace of my Employee class like this: <xsl:template match="/XSLT_MVC.Controllers">, but when I do that, now all I get are the Employee properties, and not the html form with the 2 radio buttons and the submit button. Does anyone know what needs to be done so that my transform will select and display both the Employee properties and the html form?

    Read the article

  • Embedding a Quicktime movie with starttime param

    - by Frank
    Hi! I am looking to embed a Quicktime with dynamically created starttime and endtime. This all works fine, however the Quicktime movie starts caching from the very beginning of the movie instead of from the starttime. Is there any way to get QT to cache from the starttime? Much appreciated! Frank

    Read the article

  • Rendering sass template from a sinatra app doesn't work. Is this due to v.1 incompatibility? Workaro

    - by aaandre
    get '/stylesheets/style.css' do header 'Content-Type' => 'text/css; charset=utf-8' sass :style end does not produce the stylesheet anymore. What would be a version 1.0 compatible way to do this? Or, troubleshooting suggestions if you think that the issue is with the code? The style.sass file is in the /views folder. Haml files from the same folder render OK. Thank you.

    Read the article

  • XPATH: multiple negations in for-each

    - by Peter
    I have the following simplified XML: <?xml version="1.0" encoding="UTF-8" ?> <MATMAS05> <IDOC BEGIN="1"> <E1MARAM SEGMENT="1"> <MSGFN>005</MSGFN> <MATNR>000000000000401436</MATNR> <E1MARCM SEGMENT="1"> <MSGFN>005</MSGFN> <WERKS>A120</WERKS> <MMSTA>01</MMSTA> </E1MARCM> <E1MVKEM SEGMENT="1"> <VKORG>0120</VKORG> <VMSTA>04</VMSTA> </E1MVKEM> </E1MARAM> </IDOC> </MATMAS05> If <WERKS>=A120 and <MMSTA> is NOT '01' or '02' or '03' OR if <VKORG>=0120 and <VMSTA> is NOT '01' or '02' or '03' then the <MATNR> should be mapped to the target XML. I came up with the following XSLT: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output encoding="UTF-8" method="xml" indent="yes"/> <xsl:template match="/*"> <xsl:for-each select="IDOC[(E1MARAM/E1MVKEM[VKORG='0120'][not(VMSTA='01' or VMSTA='02' or VMSTA='03')]) or (E1MARAM/E1MARCM[WERKS = 'A120'][not(MMSTA='01' or MMSTA='02' or MMSTA='03')])]"> <Item> <ITEM_CODE> <xsl:value-of select="E1MARAM/MATNR"/> </ITEM_CODE> </Item> </xsl:for-each> </xsl:template> </xsl:stylesheet> But if I apply that XSLT I get the following unwanted output (because <MMSTA>='01'): <?xml version="1.0" encoding="UTF-8"?> <Item> <ITEM_CODE>000000000000401436</ITEM_CODE> </Item> How can I solve this? I have tried around with that XPATH expression but I can't get the wanted result. What am I doing wrong in my XPATH? Thank you for any ideas with this. Best regards, Peter

    Read the article

  • XSL transformation and special XML entities escaping

    - by Tomas R
    I have an XML file which is transformed with XSL. Some elements have to be changed, some have to be left as is - specifically, text with entities &quot;, &amp;, &apos;, &lt;, &gt; should be left as is, and in my case &quot; and &apos; are changed to " and ' accordingly. Test XML: <?xml version="1.0" encoding="UTF-8" ?> <root> <element> &quot; &amp; &apos; &lt; &gt; </element> </root> transformation file: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="no" /> <xsl:template match="element"> <xsl:copy> <xsl:value-of disable-output-escaping="no" select="." /> </xsl:copy> </xsl:template> </xsl:stylesheet> result: <?xml version="1.0" encoding="UTF-8"?> <element> " &amp; ' &lt; &gt; </element> desired result: <?xml version="1.0" encoding="UTF-8"?> <element> &quot; &amp; &apos; &lt; &gt; </element> I have 2 questions: why does some of those entities are transformed and other not? how can I get a desired result?

    Read the article

  • XSL file handling through javascript

    - by Zaid Iqbal
    i want to handle my xsl file through my javascript code. I made my XSL file but i want to dynamically change my XSL file at run time.As in add more attributes in header or data. My javascript code as follow` <script> function loadXMLDoc(dname) { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest(); } else { xhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.open("GET",dname,false); xhttp.send(""); return xhttp.responseXML; } function displayResult() { xml=loadXMLDoc("cdcatalog.xml"); xsl=loadXMLDoc("cdcatalog.xsl"); // code for IE if (window.ActiveXObject) { ex=xml.transformNode(xsl); document.getElementById("example").innerHTML=ex; } // code for Mozilla, Firefox, Opera, etc. else if (document.implementation && document.implementation.createDocument) { xsltProcessor=new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); resultDocument = xsltProcessor.transformToFragment(xml,document); document.getElementById("example").appendChild(resultDocument); } } </script> My XSL file code: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <h2>My CD Collection</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">Title</th> <th align="left">Artist</th> <th align="left">Country</th> </tr> <xsl:for-each select="catalog/cd"> <tr> <td><xsl:value-of select="title" /></td> <td><xsl:value-of select="artist" /></td> <td><xsl:value-of select="country" /></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> `

    Read the article

  • What's the best software development conventions document you have seen?

    - by Pavel Radzivilovsky
    Google C++ development conventions outlaw exceptions, RAII, RTTI and bans the default parameter in parseInt(number, radix=10). Qt API style guide is brilliant, but only covers interfaces. The Robert C. Martin series Clean Code has M104 galaxy on the cover, but it is 462 pages long and based on Java, with no simple "do this" digest. Assuming that it is important to synchronize style and best practices across the organization, what is the smartest, most pleasant and useful conventions document you have worked with?

    Read the article

  • unable to capture picture using camera in j2me polish?

    - by SIVAKUMAR.J
    I'm, developing a mobile app in j2me.Now im converting it into j2me polish. In my app I capture a picture using camera in mobile phone. It works fine in j2me. But it does not work fine in j2me polish. I cannot resolve it. The code snippet given below public class VideoCanvas extends Canvas { // private VideoMIDlet midlet; // Form frm Form frm=null; public VideoCanvas(VideoControl videoControl) { int width = getWidth(); int height = getHeight(); // this.midlet = midlet; //videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this); //Canvas canvas = StyleSheet.currentScreen; //canvas = MasterCanvas.instance; videoControl.initDisplayMode( VideoControl.USE_DIRECT_VIDEO,this); try { videoControl.setDisplayLocation(2, 2); videoControl.setDisplaySize(width - 4, height - 4); } catch (MediaException me) {} videoControl.setVisible(true); } public VideoCanvas(VideoControl videoControl,Form ff) { frm=ff; int width = getWidth(); int height = getHeight(); // this.midlet = midlet; Ticker ticker=new Ticker("B4 video controll init"); frm.setTicker(ticker); //Canvas canvas = StyleSheet.currentScreen; videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this); ticker=new Ticker("after video controll init"); frm.setTicker(ticker); try { videoControl.setDisplayLocation(2, 2); videoControl.setDisplaySize(width - 4, height - 4); } catch (MediaException me) {} videoControl.setVisible(true); ticker=new Ticker("Device not supported"); frm.setTicker(ticker); } public void paint(Graphics g) { int width = getWidth(); int height = getHeight(); g.setColor(0x00ff00); g.drawRect(0, 0, width - 1, height - 1); g.drawRect(1, 1, width - 3, height - 3); } } In normal j2me the above code works correctly. But in j2me polish videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this) here this refers to VideoCanvas (which extends from javax.microedition.lcdui.Canvas). But it throws an "IllegalArgumentException - container should be canvas" like that. How to solve the issue?

    Read the article

< Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >