Search Results

Search found 5753 results on 231 pages for 'tags'.

Page 16/231 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Regexp to add attribute in any xml tags

    - by katsuo11
    Hello, I have well-formed xml documents into string variables. I want to use preg_replace to add a defined attribute to every xml tags. For example replace: <tag1> <tag2> some text </tag2> </tag1> by: <tag1 attr="myAttr"> <tag2 attr="myAttr"> some text </tag2> </tag1> So I basically need the regex expression to find any start tags and add my attribute, but I'm a complete regex noob. Thanks, kats

    Read the article

  • How to put tags inside an html attribute?

    - by Mycol
    Using xslt i want to create an attribute: <span class="tooltip"> <xsl:attribute name="onmouseover"> <xsl:text>javascript:function(</xsl:text> <span class="label">Aggiunta</span> <xsl:apply-tempaltes/> <xsl:text>)</xsl:text> </xsl:attribute> The problem is that only the pure text is putted inside the attribute, like <span class="tooltip" onmouseover="javascript:function(Aggiunta ...)"> whithout the span tags or the tags that may come from apply-templates. So how can I put html code into an attribute?

    Read the article

  • asp.net regex to find anchor tags and replace their url

    - by ace
    Hi -i'm trying to find all the anchor tags and appending the href value with a variable. for example <a href="/page.aspx">link</a> will become <a href="/page.aspx?id=2"> <A hRef='http://www.google.com'><img src='pic.jpg'></a> will become <A hRef='http://www.google.com?id=2'><img src='pic.jpg'></a> I'm able to match all the anchor tags and href values using regex, then i manually replace the values using string.replace, however i dont think its the efficient way to do this. Is there a solution where i can use something like regex.replace(html,newurlvalue)

    Read the article

  • How to have tortoisesvn Always freeze svn:externals for tags

    - by dnndeveloper
    Is this possible with tortoiseSVN?: Always freeze svn:externals for tags the scenario is our trunk will always use the 'head' revision for externals, however when we create 'tags' we would like for them to have a revision set for externals to properly 'freeze' them at a specific point in time. Thanks! Update Thanks to everyone for your feedback/info. Since I could not find anything that would completely meet our needs (tried smartsvn and svncopy.pl) I made a console app that so far has passed all our test cases. A high level overview: The app takes a repository URL then looks for all externals and adds the last commit revision for them - I do a "svn info" and get the "commit revision". The app works with both folder and single file externals. Here is the source code and complete setup files: http://svnxf.codeplex.com/

    Read the article

  • Matching content between tags in web source

    - by Semas
    Hello, I was wondering what could be the fastest and the easiest way to grab text that is between tags in string. For example i have this string: Lorem ipsum <a>dolor sit amet</a>, <b>consectetur</b> adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. And i need to find text that is between tags <a> </a> and <b> </b>. Thank you.

    Read the article

  • Converting paragraph tags with RegEx

    - by Joel
    I need to replace all <p> tags with <br /> tags within a string. The problem is that the <p> tag can have attributes in it , such as <p align="center"> so I want to delete all occurrences of an opening tag of a paragraph, no matter what attributes are in it, and replace them with <br />. I am using PHP and had no success getting to the right expression with the preg_replace function. Any help would be appreciated! Joel

    Read the article

  • WordPress [img] tags

    - by Lokheed
    Hey guys, I'm trying to allow that standard BB [img] [/img] tags on my WordPress blog. I got this snippet from the net, but it only works on lower case [img] tags. I'd like it to apply to both [img] and [IMG]. As you can tell, I'm totally not a coder. function embed_images($content) { $content = preg_replace('/\[img=?\]*(.*?)(\[\/img)?\]/e', '"<img src=\"$1\" alt=\"" . basename("$1") . "\" />"', $content); return $content; } add_filter('comment_text', 'embed_images'); I know '||' is 'or' but don't know enough coding to make the changes. Any help is greatly appreciated. Thanks.

    Read the article

  • Google Chrome does not honor cache-policy in page header if the page is displayed in a FRAME

    - by Tim
    No matter what I do: <meta http-equiv="Cache-Control" content="no-cache" /> <meta http-equiv="Expires" content="Fri, 30 Apr 2010 11:12:01 GMT" /> <meta http-equiv="Expires" content="0" /> <HTTP-EQUIV="PRAGMA" CONTENT="NO-STORE" /> Google Chrome does not reload any page according to the page's internal cache policy if the page is displayed in a frame. It is as though the meta tags are not even there. Google Chrome seems to be ignoring these tags. Since I've gotten answers to this question on other forums where the person responding has ignored the operative condition, I will repeat it: this behavior occurs when the page is displayed in a frame. I was using the latest released version and have since upgraded to 5.0.375.29 beta but the behavior is the same in both versions. Would someone please care to confirm one way or another the behavior you are seeing with framesets and the caching/expiration policies given in meta tags? Thanks

    Read the article

  • extending spring form tag library attributes

    - by TimmyJ
    I'm using Spring's form tag library in a Spring MVC application that I am developing. The company I am working for has implemented some company-wide policies based on the definition of custom attributes for certain tags. For instance, by default (though the inclusion of a standard javascript file) all tags have their values automatically converted to upper case. In order to disable this one would define their tag with a custom attribute in the following way: <input type="text" uppercase="false" /> The problem is that the addition of these custom attributes to a spring:form tag causes an error at runtime. I've pasted the error below. org.apache.jasper.JasperException: /WEB-INF/jsp/reportCriteria.jsp(45,5) Attribute uppercase invalid for tag input according to TLD My question is: is there any way to extend the TLD to allow for these attributes, or is there any other way add these custom attributes to these spring:form tags?

    Read the article

  • HTML tag for identifying text

    - by ravi
    I am not very much familiar with HTML programming. If we look at the source code of a page, then we can see what are the HTML tags for which texts and so. It is the case that there is group or class of HTML tags which is used for purpose such that it can be used for main text or so. I mean like '<\input type="radio" name="option"' this tag says that there will a radio button, similar can be make a group of HTML tags such that it consist of text part, which means we look at the tag and not at the content and can say that in between startTag and endTag we have text.

    Read the article

  • Notepad++ find string with a new-line and replace

    - by Giraldi Maggio
    [Notepad++ Question] How do I use find-and-replace to replace the attribute of a series of tags using expression? Case scenario: Let's say I have a couple of lines of something like this: <li><a title="Bla bla" href= "http://www.url.com/etc">Text</a></li> And I want to replace them with this: <li><a title="Bla bla" href="">Text</a></li> Note the new line and double tabs on the original.

    Read the article

  • Media meta file system for windows

    - by Chris Marisic
    I have a large assortment of media that is currently arranged using folders. As the library has grown I've started to notice that folders aren't the best at conveying meaning. Also as the number of folders serving as categories/tags has grown has lead to data duplication for not realizing it was already filed under a different tag. As I started to think about this I realized tag cloud visualization would be tremendously powerful and figured there has to be something like this out there.

    Read the article

  • certain Smarty tags don't work in OpenX templates

    - by mikez302
    I am on a team that is developing an OpenX plugin, and I am responsible for the UI. I noticed that if I use certain Smarty tags in my template, the app doesn't work and I see an error message, similar to this: Plugin by name 'Html_select_date' was not found in the registry; used paths: default_views_helpers_: /openx/www/admin/plugins/myApp/application/modules/default/views/helpers/ OX_OXP_UI_View_Helper_: /openx/www/admin/plugins/myApp/application/../library/OX/OXP/UI/View/Helper/ OX_UI_View_Helper_: /openx/www/admin/plugins/myApp/application/../library/OX/UI/View/Helper/ Zend_View_Helper_: Zend/View/Helper/ (stack trace) The stack trace looks like this: #0 /openx/www/admin/plugins/myApp/library/Zend/View/Abstract.php(1117): Zend_Loader_PluginLoader-load('Html_select_dat...') #1 /openx/www/admin/plugins/myApp/library/Zend/View/Abstract.php(568): Zend_View_Abstract-_getPlugin('helper', 'html_select_dat...') #2 /openx/www/admin/plugins/myApp/library/OX/UI/Smarty/SmartyWithViewHelper.php(25): Zend_View_Abstract-getHelper('html_select_dat...') #3 /openx/var/templates_compiled/%2Fdefault%2Fviews%2Fscripts%2Findex%2Fview-reports.html^%%E8^E80^E80B56F2%%view-reports.html.php(38): OX_UI_Smarty_SmartyWithViewHelper-callViewHelper('html_select_dat...', Array) #4 /openx/lib/smarty/Smarty.class.php(1274): include('/openx...') #5 /openx/www/admin/plugins/myApp/library/OX/UI/View/SmartyView.php(103): Smarty-fetch('/openx...') #6 /openx/www/admin/plugins/myApp/library/Zend/View/Abstract.php(832): OX_UI_View_SmartyView-_run('/openx...') #7 /openx/www/admin/plugins/myApp/library/OX/UI/View/SmartyView.php(151): Zend_View_Abstract-render('index/view-repo...') #8 /openx/www/admin/plugins/myApp/library/OX/UI/View/Helper/WithViewScript.php(23): OX_UI_View_SmartyView-render('index/view-repo...') #9 /openx/www/admin/plugins/myApp/application/modules/default/views/helpers/ViewReports.php(5): OX_UI_View_Helper_WithViewScript::renderViewScript('index/view-repo...', Array) #10 /openx/www/admin/plugins/myApp/application/modules/default/controllers/IndexController.php(98): Default_Views_Helpers_ViewReports-renderPage() #11 /openx/www/admin/plugins/myApp/library/Zend/Controller/Action.php(512): IndexController-viewReportsAction() #12 /openx/www/admin/plugins/myApp/library/Zend/Controller/Dispatcher/Standard.php(288): Zend_Controller_Action-dispatch('viewReportsActi...') #13 /openx/www/admin/plugins/myApp/library/Zend/Controller/Front.php(945): Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #14 /openx/www/admin/plugins/myApp/application/bootstrap.php(117): Zend_Controller_Front-dispatch() #15 /openx/www/admin/plugins/myApp/public/index.php(7): require('/openx...') #16 {main} This does not happen with all Smarty tags. For example, I can use {if}, {foreach}, or {assign} tags without any problems. But whenever I try to use {html_select_date}, {html_image}, or {html_table}, I get the errors. In case this matters, the programmer who is designing the plugin copied the openXWorkflow plugin and made some changes. I noticed that the openXWorkflow plugin has a file (openx/plugins_repo/openXWorkflow/www/admin/plugins/openXWorkflow/library/OX/UI/Smarty/SmartyCompilerWithViewHelper.php) with a class that overrides the default Smarty compiler, supposedly with the ability to compile shorthands for calling ZF view helpers. That file has a list of Smarty functions, but the list is incomplete. If I add the functions to the list, or simply delete the file, my template works fine, but I don't like to change library files. It may make the app hard to maintain, and I don't know if it will mess up something else. The file has the comment "There is no easy access to the list of Smarty's built-in functions so we need to list them here. HTML-specific functions are not included as we cover HTML generation separately.", so it seems like certain Smarty functions may be disabled on purpose for some reason. Will anything bad happen if I try to use them? If, for example, I want to use the {html_select_date} tag in my template, how would I go about doing that? Keep in mind that much of this stuff is new and unfamiliar to me. This is my first time ever using OpenX or Smarty, and I only have a little bit of experience with the Zend framework. Please let me know if we are using the wrong approach.

    Read the article

  • How to populate the span tags for all text nodes between specific self closing tags.

    - by Rachel
    I want to populate span tags for all text nodes between the self closing tags s1 and s2 having the same id. Eg. For the input: <a> <b>Some <s1 id="1" />text here</b> <c>Some <s2 id="1"/>more text <s1 id="2"/> here<c/> <d>More data</d> <e>Some <s2 id="2" />more data</e> </a> In the above input i want to enclose every text node between <s1 id="1"/> and <s2 id="1" /> with span tags. Also all the text node between <s1 id="2" /> and <s2 id="2" /> Expected Output: <a> <b>Some <span class="spanClass" id="1a">text here</span></b> <c><span class="spanClass" id="1b">Some </span>more text <span class="spanClass" id="2a"> here</span></c> <d><span class="spanClass" id="2b">More data</span></d> <e><span class="spanClass" id="2c">Some </span>more data</e> </a> I am not concened about the pattern of the id tag populated for the span as along it is unique. If the transformation of the input to the output form requires the list of ids of the s1 , s2 tag pairs say 1, 2 etc i can assume that it in place in any form if required. Hope i am clear. How can this be achieved using XSL? EDIT: The input can have any structure and not exactly the same as seen in the sample input. It can have any number of s1, s2 tag pairs but each pair will have a unique id.Adding another sample input and output pattern for more information. Input: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>This is my title</title> </head> <body> <h1 align="center">This <s1 id="1" />is my <s2 id="1" />heading</h1> <p> Sample content <s1 id="2" />Some text here. Some content here. </p> <p> Here you <s2 id="2" />go. </p> </body> </html> Desired output: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>This is my title</title> </head> <body> <h1 align="center">This <span id="1">is my </span>heading</h1> <p> Sample content <span id="2">Some text here. Some content here.</span> </p> <p> <span id="2">Here you </span>go. </p> </body> </html>

    Read the article

  • Sorting emails with no To: tags in Outlook

    - by user29589
    Lately people at work have been sending with mailing lists in blind copies instead of just sending to the mailing lists. I think the intent is to prevent people from accidentally replying to all, but it means that these emails aren't sorted into their proper folders when they arrive. I'd like to at least be able to sort them into a common folder, but these emails arrive with no "To:" line in the headers. I'm using Outlook 2007, and I can't figure out a way to use their built-in rule editor to create a rule that sorts these emails. Is there a plugin that will allow me to sort emails like this, or a better rule editor? Updated: I know this is very old, but this is still very annoying to me. Is there any way to sort these kinds of emails to their own folder?

    Read the article

  • is there a way to automate changing filenames in <link> , <script> tags

    - by nepsdotin
    when we use Expires header for text files like js, css, contents are cached in the browser, to get new content we need to change in the html file the new names in the link and script tag. When we add changes. How can we automate it. I may have some bunch of html files in multiple folders also in subdirectories. There would be a text file filelist.txt OldName NewName oldfile1-ver-1.0.js oldfile1-ver-2.0.js oldfile2-ver-1.0.js oldfile2-ver-2.0.js oldfile3-ver-1.0.js oldfile3-ver-2.0.js oldfile4-ver-1.0.js oldfile4-ver-2.0.js The script should change all the oldfile1-ver-1.0.js into oldfile1-ver-2.0.js in the html, php files I would run this script before i start uploading. Finally the script could create a list of files and line number where it made the update. The solution can be in PERL/PHP/BATCH or anything thats nice and elegant

    Read the article

  • Using jstl tags in a dynamically created div

    - by George
    I want to be able to show some data based on criteria the user enters in a text field. I can easily take this data, process the form post, and show the data on another page. However, I want to be able to do it all on the same page - they click the button, and a new div shows up with the information. This doesn't seem too complicated, but I want to use jstl tags to format the data like: <c:forEach items="${model.data}" var="d"> <tr> <td><fmt:formatDate type="date" dateStyle="short" timeStyle="default" value="${d.reportDate}" /></td> <td><c:out value="${d.cardType}"/></td> </tr> </c:forEach> If jstl tags are processed when the page loads, can I use that in this new div? Can I update it via a javascript (using prototype) function to display the proper data? Will I be able to do the same thing if they change the criteria and click the submit button again?

    Read the article

  • Custom Django admin URL + changelist view for custom list filter by Tags

    - by Botondus
    In django admin I wanted to set up a custom filter by tags (tags are introduced with django-tagging) I've made the ModelAdmin for this and it used to work fine, by appending custom urlconf and modifying the changelist view. It should work with URLs like: http://127.0.0.1:8000/admin/reviews/review/only-tagged-vista/ But now I get 'invalid literal for int() with base 10: 'only-tagged-vista', error which means it keeps matching the review edit page instead of the custom filter page, and I cannot figure out why since it used to work and I can't find what change might have affected this. Any help appreciated. Relevant code: class ReviewAdmin(VersionAdmin): def changelist_view(self, request, extra_context=None, **kwargs): from django.contrib.admin.views.main import ChangeList cl = ChangeList(request, self.model, list(self.list_display), self.list_display_links, self.list_filter, self.date_hierarchy, self.search_fields, self.list_select_related, self.list_per_page, self.list_editable, self) cl.formset = None if extra_context is None: extra_context = {} if kwargs.get('only_tagged'): tag = kwargs.get('tag') cl.result_list = cl.result_list.filter(tags__icontains=tag) extra_context['extra_filter'] = "Only tagged %s" % tag extra_context['cl'] = cl return super(ReviewAdmin, self).changelist_view(request, extra_context=extra_context) def get_urls(self): from django.conf.urls.defaults import patterns, url urls = super(ReviewAdmin, self).get_urls() def wrap(view): def wrapper(*args, **kwargs): return self.admin_site.admin_view(view)(*args, **kwargs) return update_wrapper(wrapper, view) info = self.model._meta.app_label, self.model._meta.module_name my_urls = patterns('', # make edit work from tagged filter list view # redirect to normal edit view url(r'^only-tagged-\w+/(?P<id>.+)/$', redirect_to, {'url': "/admin/"+self.model._meta.app_label+"/"+self.model._meta.module_name+"/%(id)s"} ), # tagged filter list view url(r'^only-tagged-(P<tag>\w+)/$', self.admin_site.admin_view(self.changelist_view), {'only_tagged':True}, name="changelist_view"), ) return my_urls + urls Edit: Original issue fixed. I now receive 'Cannot filter a query once a slice has been taken.' for line: cl.result_list = cl.result_list.filter(tags__icontains=tag) I'm not sure where this result list is sliced, before tag filter is applied. Edit2: It's because of the self.list_per_page in ChangeList declaration. However didn't find a proper solution yet. Temp fix: if kwargs.get('only_tagged'): list_per_page = 1000000 else: list_per_page = self.list_per_page cl = ChangeList(request, self.model, list(self.list_display), self.list_display_links, self.list_filter, self.date_hierarchy, self.search_fields, self.list_select_related, list_per_page, self.list_editable, self)

    Read the article

  • Add/remove xml tags using a bash script.

    - by sixtyfootersdude
    I have an xml file that I want to configure using a bash script. For example if I had this xml: <a> <b> <bb> <yyy> Bla </yyy> </bb> </b> <c> <cc> Something </cc> </c> <d> bla </d> </a> (confidential info removed) I would like to write a bash script that will remove section <b> (or comment it) but keep the rest of the xml intact. I am pretty new the the whole scripting thing. I was wondering if anyone could give me a hint as to what I should look into. I was thinking that sed could be used except sed is a line editor. I think it would be easy to remove the <b> tags however I am unsure if sed would be able to remove all the text between the <b> tags. I will also need to write a script to add back the deleted section.

    Read the article

  • Replacing specific HTML tags using Regex

    - by matthewpe
    Alright, an easy one for you guys. We are using ActiveReport's RichTextBox to display some random bits of HTML code. The HTML tags supported by ActiveReport can be found here : http://www.datadynamics.com/Help/ARNET3/ar3conSupportedHtmlTagsInRichText.html An example of what I want to do is replace any match of <div style="text-align:*</div> by <p style=\"text-align:*</p> in order to use a supported tag for text-alignment. I have found the following regex expression to find the correct match in my html input: <div style=\"text-align:(.*?)</div> However, I can't find a way to keep the previous text contained in the tags after my replacement. Any clue? Is it me or Regex are generally a PITA? :) private static readonly IDictionary<string, string> _replaceMap = new Dictionary<string, string> { {"<div style=\"text-align:(.*?)</div>", "<p style=\"text-align:(.*?)</p>"} }; public static string FormatHtml(string html) { foreach(var pair in _replaceMap) { html = Regex.Replace(html, pair.Key, pair.Value); } return html; } Thanks!

    Read the article

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