3 Replies Latest reply on Feb 18, 2011 6:02 AM by Loic.Aigon

    from XHTML to InDesign

    HopelessManu Level 1

      Yes, a new variant!

      I saw that CS5 has an "import XML" function. I though about changing the extension from XHTML to XML, then importing. I get a nice menu with all the <p>, and SOMETIMES (why?!) if I drag and drop it on my InDesign page I get the text.

      How could I have my stylesheets back??? Please help, I have no clue.

        • 1. Re: from XHTML to InDesign
          Loic.Aigon Adobe Community Professional

          Not sure to follow.

           

          If you import your XML (xhtml), you have the xml structure appears in the structure panel. No mysteries

          Once you drap and drop xml nodes into indesign (from structure panel to indesign pasteboard), then it only displays the content of the xml tag and the frame is tagged.

           

          If you want to get the "structure" itself as text content, you may want to place the xhtml file directly importing it as plain text. So you will have pseudo tagged content in your document as text.

           

          Does it help ?

           

          http://www.loicaigon.com

          • 2. Re: from XHTML to InDesign
            HopelessManu Level 1

            Yes it does.

            But I understand only in theory...

            I have this XHTML, I import it with InDesign CS5. I

            drag and drop the icon and get the whole text, with colors representing tags. Then I know that I

            should use the Tag Panel and convert each tag into a stylesheet. PROBLEM: I don't get nice and

            clean tags like, for example, "right aligned text", "smaller text" and so on, but ONLY html tags:

            div, body, head.

            I know the "nice" tags are there, I can see them in the structure on the left, but

            I don't know how to convert them into stylesheets.... I'm truly hopeless.

             

             

             

             

            [Personal information edited out by Madison]

             

            Ogg: Re: from XHTML to InDesign from XHTML to InDesign

             

            Not sure to follow.

             

            If you import your XML

            (xhtml), you have the xml structure appears in the structure panel. No mysteries

            Once you drap and

            drop xml nodes into indesign (from structure panel to indesign pasteboard), then it only displays

            the content of the xml tag and the frame is tagged.

             

            If you want to get the "structure" itself as

            text content, you may want to place the xhtml file directly importing it as plain text. So you will

            have pseudo tagged content in your document as text.

             

            Does it help ?

             

            http://www.loicaigon.com

            • 3. Re: from XHTML to InDesign
              Loic.Aigon Adobe Community Professional

              Hi,

               

              Indesign (unless I aml wrong) doesn't care about any class you use in your xhtml document. It is just importing the raw structure. Of course you should see the classes (and ids) calls as attributes but Indesign just ignore these attributes (to the exception of correctly tagged images attributes).

               

              If in your xhtml context, you are using a css stylesheet saying all <p> tags should be red, you have to reestablish that connection mapping <p> tags to a red character style before importing. You can do later anyway by mappy styles to tags.

               

              There is no way Indesign can convert css associations and create perfect styles accordingly. It's totally up to you to do so. This is the maybe point of the discussion where some script could be involved (grab xhtml from web and turn css into native indesign styles) but so far, if your concern is purely about xml, you should ask for advices in the general Indesign forum.

               

              Best,

               

              Loic