importing XHTML files as XML files

Ask a Question related to Adobe Indesign Windows, Design and Development.

  1. #1

    Default importing XHTML files as XML files

    Hello,

    I would like to be able to import a well-formed XHTML file (with an XHTML 1.0 Strict or Transitional DTD) into an InDesign document as if it were an XML file. I would then like to apply styles so that the content of (p) tags within (div id="one") will look different from that of (p) tags within (div id="two").

    Has anyone tried this? Is it a possibility?

    I've tried changing the file extension from HTML to XML and InDesign will allow me to import the file (after some confusion with my DTD). But I am having trouble distinguishing content from one (div) tag to another.
    Josh_Carr@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. Importing PDF files
      I do the page layout for a big magazine and we except all kinds of files. My main problem is that sometimes I get PDF files that have text that is...
    2. importing ppt files
      hi, Can anyone help me with this issue. I have this huge ppt which I need to change into an avi file where I can keep the voice seperately (to...
    3. importing dxf files
      I am using FH MXA 11.0.1 and can not import dxf files. I had no issues when I was using my mac but now that I have been forced to go to the dark...
    4. Importing dir-files into another!
      My problem is that i want to import director files into another! But some simple script like this one i have for enlarge a thumbnail doesn´t work. ...
  3. #2

    Default Re: importing XHTML files as XML files

    Josh,

    InDesign's built-in tag-to-style mapping is a simple one-to one conversion process that wouldn't support the scenario you describe above. It's likely you could do this with a script however.

    Phil Redman
    pjredman@adobeforums.com Guest

  4. #3

    Default Re: importing XHTML files as XML files

    Phil,

    Thanks for the reply. Do you have any suggestions for where I could find information on such a script? Are you speaking of an internal InDesign script/macro OR are you talking about a PHP-like script that will change the tags into something that InDesign can deal with?

    Thanks again!
    Josh_Carr@adobeforums.com Guest

  5. #4

    Default Re: importing XHTML files as XML files

    Josh,

    I don't know of anyone who's written such a script but it may be possible via InDesign's internal scripting mechanism. All of the XML and style components are open to the scripting interface.

    Phil
    pjredman@adobeforums.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139