[JS] [CS5/6] Character encoding of XML image href file name?

I have an XML file that I am important with a XSLT transformation and is one of the processed elements to create an element of the image by using the value in the name element as follows

  <xsl:template match="name">

  <entry>

  <xsl:copy-of select="."/>
  <xsl:element name="entryImg">
  <xsl:attribute name="href">
  <xsl:value-of select="concat('file:///Users/MacBook/Desktop/', text(), '.jpeg')"/>
  </xsl:attribute>
  </xsl:element>

  </entry>

This works very well for the name components with the values of text as a receiver, androgens, but for elements of name with the text as of Annexin values where characters such as "serve INDD cannot find the image when I place the XML code in the page.

Screen Shot 2013-06-15 at 5.52.16 PM.png

In the pane structure, the href text is precise and the file exists with the special characters in the specified location.

Screen Shot 2013-06-15 at 5.46.49 PM.png

Is this an encoding issue? Is there something I can do in XSLT, INDD or JS so that even images with file names that use special characters correctly placed? I work on mac and PC (not sure if encoding would be specific to the platform).

Any idea is appreciated.

Lindsay

You'd probably like the file name with a url encoder, such as overall encodeURI() JS function. A normal apostrophe (U0027) should not need to be coded, but a single right quote (U2019) will be. I don't think that XSLT 1.0, InDesign uses, has a built-in function to do it, but I bet someone out there has built a model named for XSLT 1.0, you may pass through.

Jeff

Tags: InDesign

Similar Questions

  • Thumbnail images do not match with images and file names

    I got a surprise this morning! Thumbnails of my photos do not match with the real images and file names. File names correctly matching the real images. Pls help how to fix. Could it be caused by a virus?

    I got a surprise this morning! Thumbnails of my photos do not match with the real images and file names. File names correctly matching the real images. Pls help how to fix. Could it be caused by a virus?

    ==========================================
    What version of the program / are you use ot see the pictures?

  • See the images by file name?

    Why Lightroom import pictures randomly? Why aren't they imported automatically by file name? How can I view my images by file name?

    Thank you!

    Hi TNLuz,

    Lightroom important images by file name. You must specify the option and then set library window and import to show images by file name.

    See How set options in Lightroom library display

    Kind regards

    Assani

  • Organize images by file name in 10 Organizer?

    I can arrange images by file name in 10 Organizer?

    Hello

    You can them be sorted alphabetically when played back to the location of the folder.

    Please click this display on the upper right corner and select "File Location" from here. At the time, the files in the folder only one will be visible but will be sorted by name.

    Thank you

    Catherine

  • Is it possible to sort the images by file name?

    I imported a record of 200 images in Photos for OS X (El Captain). Image files have been appointed in the order - I want them to appear in a slide show: photo_01, photo_02 etc...

    Once I imported the images - I found them all out of order - and the only options I can find in the view menu are somehow 'oldest first', 'newest first' or ' title '. Please, someone tell me I'm missing something obvious - he and not that Apple chose to omit the possibility to sort the images by name? If this is the case - I'm speechless - how is f - ing stupid!

    Sort by file name is not an option in the Photos. Albums and smart albums you yourself set can be sorted by name, date of capture, or manually.

    Sorting through the predefined albums is automatic:

    • 'Photos' display with moments and collections is sorted by date of capture and the location.
    • 'All the Photos' display is sorted by the date of the import session.
    • Other built-in smart albums are sorted by the date of capture.

    You can see the current sort order, preset, if it is grayed out in the "view > sort ' menu.

    As a workaround:

    1. If you need to want pictures to be sorted by file name, copy the name of the file in the title field. Then, create a smart album of the items and sort by title. We have posted a trick to copy the name of the file in the title field for the selected photos: Script: change the title filename without Extensionor: Script: batch change the titles of the Extension/w
    2. Or view your photo library in pictures of power.  This versatile tool lets you browse photos as a list or thumbnail while looking the other metadata under the thumbnails or displayed as list with columns selected and sorted by columns.

    You can do a lot with the free trial: download PowerPhotos here: Fat Cat Software-PowerPhotos

  • How is the character limit 256 on the applied file names?

    I understand that a file name can be up to 256 characters.

    It seems that the 256 characters includes the total number of characters that make up the complete chain of the folder associated with the file names.  Is that why when I get to the folder (for example) fifteenth in the folder tree that I have run out of characters, even if the name of the file, I'm trying to create has only about 20 characters in there?

    If this is the case, is it possible to adjust the number of allowed characters?

    If this is not the case why is my system not allowing me to use more than (for example) 20 characters when I am in a long series of files?

    Hello

    256 character limit applies as well the full path. So, if you have a long series of records, it does not accept the name of the file.  You will need to either move the files to shorten the path, or rename the folders to shorten the chain for the path name.

  • print images with file names

    I use CS3 for Windows.  I wish to print file names (and path) in the photos, but don't see any options to do.  If possible, I would like to print on unused margin.  For example, when I print images 4:3 on 19 "x 13" paper and appropriate size, it is an unused space in length. "  Can I print text there?  Can we automatically the file name and path?

    I hope I understood your question.

    Print as normal, on the right side of the Panel is out or color management/swith output / select label/then OK and print.

  • What are all the default iOS image (homescreen) files names and directions for all devices?

    There is no conflicting information. What I do is the correct orientation of my splash screen for landscape modes.

    I would like to know the names of files and their respective directions. For example by default - LandscapeRight.png must be an upside? Retorical because it certainly does not work right.

    Haha never mind. 2 problems, I assumed that the image by default - LandscapeRight.png must be returned and I had by default - Landscape.png which is probably not necessary.

    http://iphonedevelopertips.com/iPad/iPad-managing-multiple-launch-images.html

    everything is ok now.

  • Problem with InDesign startup script does not import XML images

    I'm doing an XML import automatically from a startup script when a document is loaded. I managed to get most of the content to fill, but the images are ignored. Everything works, including images, when I do a manual 'Import XML' through the user interface or a manual script.

    Here's my manual script:

    var myDocument = app.activeDocument;
    var xmlFile = File('/c/Full/Path/To/data.xml');
    
    myDocument.importXML(xmlFile);

    But the goal is to do at startup. Here's my startup script:

    #targetengine "session"
    
    app.addEventListener('afterOpen', function(myEvent) {
       if (myEvent.target.constructor.name !== 'Document') {
       return;
       }
    
       var myDocument = myEvent.target;
       var xmlFile = File('/c/Full/Path/To/data.xml');
    
      myDocument.importXML(xmlFile);
    });

    Here is the XML tag for the image:

    <Image href="file:///C:/Full/Path/To/Image/02.png" />

    I wonder there is a problem with the 'afterOpen' event reminder, and it is the reason why it works manually using the same method, but not in the startup script.

    I solved it by avoiding the event quite listener:

    main();
    
    function main () {
    
        // create a path for a file object
        var curFile = File('/c/Path/To/file.indd);
        var xmlFile = File('/c/Path/To/data.xml');
    
        // close app if files don't exist
        if (!curFile.exists || !xmlFile.exists) {
            app.quit(SaveOptions.NO);
        }
    
        // open the file
        var curDoc = app.open(curFile);
    
        // import the xml
        curDoc.importXML(xmlFile);
    
        // create a new file object
        var pdfFile = new File(curFile.parent + '/' + curFile.name + '.pdf');
    
        // export to pdf
        curDoc.exportFile(ExportFormat.PDF_TYPE, pdfFile);
    
        // close app
        app.quit(SaveOptions.NO);
    
    }
    
  • How to: save the image in multiple formats AND edit file names every time automatically?

    Hello!

    First of all, I hope I'm not opening a discussion that has already been asked/Treaty. a lot. I couldn't find a solution to my particular problem until now in the web and I hope someone can help me.

    I work with Adobe Photoshop CC 2015.

    My problem is: I work a lot with product photos (whole/collage of several elements) and I want to speed up the process-saving in multiple formats (JPEG and PNG, sometimes TIFF as well).

    The initial situation is: I have a main PSD file (to keep things clean and centralized) with several layers, each layer containing a different element. I need to check/uncheck layer visibility often, add/remove elements of collage to generate variants of game.

    With every change that I agree (very minor steps), I have to go to SAVE AS... (Shift + ctrl + s)-> SET a format (JPEG, PNG, TIFF)-> EDIT file name (according to whole-variation [e.g. "Assembly-set01_lightbulb" / "Assembly-set01_lightbulb_cable" /...]---> save.) Fact.

    And then REPEAT the steps together, define another format drop-down list, change the name of the file again (since the file original .psd remains without additions) and so on...

    This process could his insignificant, but for me, when it comes to the variations set, consumes a lot of time, in particular, by taking changes in layers is a matter of 2 clicks.

    So what I know: There is an option to automate the in some workflows. I can create an action, where hitting a predefined key, the original PSD is saved as JPEG and PNG. But that's all. No change of name of file or the destination can be performed (AFAIK).

    Now what I want: I want to hit a predefined key, SAVE as... context-window, JPEG (...) is defined by default as defined format, I can modify the file name and/or ideally choose another folder to save to (...). Press enter-> the file is saved in JPEG format with the file name and alternative way edited. A new RECORD under... context window appears, PNG (...) is defined as the default format defined, I can still ideally to change the file name and press ENTER to find:

    -the original (unchanged) PSD file,

    -a copy of this image to JPEG with file name changed (... _xxx.jpg) [in another folder path, if I wanted to.

    -a copy of this PNG image with file name changed (... _yyy.png) [so somewhere else if I wanted]

    All this with the push of a single button(-combination) and my entry to change the names of files.

    Is it possible? I hope that my request is understandable and you could understand, what I want to achieve. The process itself is quite simple, but I have too complex concepts on how I want to maximize my workflow.

    Thanks in advance.

    Regards, Phil

    Hi Phil,

    This is something impossible in Photoshop as if now that the process you are looking for is very personalized and can be reached only in Photoshop.

    The only way that you can save a JPEG and PNG file is by creating an action, and that's what you have already tried and does not give you an option to change the file name or destination location.

    Concerning

    Sarika

  • Make the Ps to create thumbnails for image CR2 files

    It's frustrating trying to find an image with file names cryptic camera.  Why Ps creates thumbnail images of these types of files?

    CR2.jpg

    Not really as photoshop can't write in raw the camera file photo, just the car aside. However, if you are on windows, Microsoft has a camera raw driver for windows 7. I him have not tested with windows 8.

    If you can't find it, let me know and I'll see if I still have the link somewhere.

  • Why don't my choice of Western character encoding remains permanently?

    Using the button Menu on the toolbar and a button of character encoding that are open, I select Western to eliminate annoying Chinese characters who have recently begun to appear on the tabs in the browser. But the encoding switch to Unicode as soon as I start to use the browser.

    All your Adobe programs are obsolete.

    Security issue: update your Flash Player v16.0.0.296
    https://www.Adobe.com/products/flashplayer/distribution3.html

  • Menu bar 'View' drop-down menus do not work except option 'character encoding '.

    V33.0.1 FF
    For past several updates I asked problems with drop-down menus. 'See' on the Menu bar is an exzmple. Pnly 'Character encoding' option works correctly. Similar problem occurs in many other places including LastPass extension which I use a lot.

    An empty menu appears right without entries. But the problem is not consistent.

    Heals the problem to the menu bar of FF and other questions of FF from FF in safe mode. But I can't find which plugin or extension is causing the problem.

    All ideas

    Hello makatikid, try Disabling graphics hardware acceleration and check again.

    You will have to perhaps restart Firefox for it to take effect, so save any work first (e.g. you compose mail, documents online that you are editing, etc.).

    Then perform the following steps:

    1. Open the Firefox Options window as follows:

      • Click the menu button

        and select Options

    2. In the Options of Firefox window, click the Advanced tab, and then select general.
    3. You will find in the list of parameters, the checkbox use hardware acceleration when available . Clear this check box.
    4. Now restart Firefox and see if the problems persist.

    In addition, please check the updates for your graphics driver by following the steps in the following knowledge base articles:

    In firefox safe mode, hardware acceleration is disable.

    Thank you.

  • Why, after all these years, can not Thunderbird automatically detect the character encoding

    Judging by all existing messages and complaints on this issue, not to mention the erroneous messages that say that the problem is resolved when it is not, I must conclude Mozilla either does not believe it is a problem or doesn't care to fix it. The key is that there is no way to tell Thunderbird to automatically display the emails in the character encoding format that they were written in. I could understand the case where headers are not properly filled, but I see tons of emails in which coding is clearly in the headers in the message source. You can force, but if you do the menu VIEW-> encoding-> UTF8 character (for example) it doesn't 'glue' If you post another message. But who wants him 'stick' at all times even when? What the average user really wants is to be able to toggle the VIEW-> character encoding-> auto detect the default 'off' value simply "on" and don't have to bother with it more.

    This is a problem that seems to go on forever, and it NEVER happens with other e-mail clients. If there is some backdoor way to actually autodetect working, I would know about it. But more importantly, I think that all users would appreciate it if this was not some secret arrangement 'backdoor', but a choice of menus overall simple for all accounts. Can Mozilla if you please fix this problem once and for all?

    Can you tell us what you heard:
    Tools > Options > advanced > general tab
    Click on Config Editor

    At the top of the search page of type:
    Mailnews.force_charset_override; Value = "false".

    Do you like value... true or false?
    If Value = 'True', double click on the line to switch to "false".

    close window - top right X
    Click OK to save the changes to the Options.
    Close and reopen Thunderbird.

  • Where is the character encoding option in 29.0.1?

    After the change of the new provision, the menu Developer do not have character encoding options more where the hell is that? He drives me crazy...

    Hello tyw214, there is a dedicated button for the character encoding that you can add to your menu customization mode: controls, buttons, and Toolbars Customize Firefox

Maybe you are looking for

  • Store 1 TB TV | PA4209E-1HJ0 - firmware need

    Hey everybody, I googled all the posts that I have on this subject and I have only found one that unfortunately had a firmware hosted on mediafire which expired already. On this site I can not even find the store TV firmware (1 TB |) PA4209E-1HJ0) an

  • selection of talk bad deal with Chinese words like Japanese words

    There seems to be a bug that improperly speak Chinese as words of Japanese words. When I drag down with two fingers to speak on screen content in Chinese, she will speak Japanese wrong instead of Chinese. Any person facing such questions?

  • Attachment to Internet from PC via USB / reverse

    Hello How do I have the Xperia Z2 can use the Internet connection provided by a PC via USB cable? WiFi is not an option, you prefer not to install apps on the mobile, since everything that I found asking for rooting the device. It is very surprising

  • (Redirected) Another owner of mixed open-box Best Buy who require assistance to transfer

    A few months ago, I bought a laptop from Best Buy. It was a mixed open-box item that was apparently recorded by the former owner. Some of the equipment is faulty, so I need support, but cannot get help because I'm not the owner. After I bought it, I

  • Second unit CC download questions

    Hello, I'm trying to download creative cloud on my second computer, but it is still telling me that there is a trial once CC is downloaded. Since I already have a subscription, I was reading and it says that the cloud was allowed on both devices. It