5 Replies Latest reply on Dec 1, 2008 10:26 AM by (gfellenz)

    Target XML attribute with XSLT

    Marco Lugli
      Hello,<br />I have an xml file which looks like this:<br /><br /><PRODUCTS><br /><PRODUCT><br /><IMAGE href="file://./0001.tif"></IMAGE><br /></PRODUCT><br /><PRODUCT><br /><PRODUCTS><br /><br />Is there a way to target the href attribute of the PRODUCT element with XSLT?<br /><br />Thanks
        • 1. Re: Target XML attribute with XSLT
          On Sunday 30 November 2008 13:03:08 Marco Lugli wrote:
          > Is there a way to target the href attribute of the PRODUCT element with
          > XSLT?

           
               ...


          cheers,
          gregor
          • 2. Re: Target XML attribute with XSLT
            Marco Lugli Level 1
            Thank you gfellenz,
            I wonder if there are any resources for learning XLST for Indesign (some book or internet link).
            Thank you again
            Marco L.
            • 3. Re: Target XML attribute with XSLT
              Level 1
              hi marco,

              > I wonder if there are any resources for learning XLST for Indesign (some
              > book or internet link). Thank you again
              i don't know about special xslt resources for indesign.
              maybe in this book (i don't own it):
              http://www.amazon.com/Designers-Guide-Adobe-InDesign-
              XML/dp/0321503554/ref=sr_1_1/190-3399947-2264805?ie=UTF8&s=books&qid=1228128978&sr=8-1

              but in most cases you don't need sophisticated xslts for indesign. i.e. the
              standard xslt literature/howtos etc. schould do fine.

              i can't point you to an howto but i love this reference (keep in mind that you
              need the extension for the functx: namespace):

              http://www.xsltfunctions.com/xsl/


              cheers,
              gregor
              • 4. Re: Target XML attribute with XSLT
                Marco Lugli Level 1
                Thank you gregor, I'll take a look to this reference; I'm total newby to XSLT, so any suggestions would be surely fine.. another question: do you think it's better to work with XSLT or XmlRules?
                Thanks
                Marco
                • 5. Re: Target XML attribute with XSLT
                  Level 1
                  hi marco,

                  > Thank you gregor, I'll take a look to this reference; I'm total newby to
                  > XSLT, so any suggestions would be surely fine.. another question: do you
                  > think it's better to work with XSLT or XmlRules?

                  there is no short answer on this. it depends on your documents/data you
                  want to process, what to achieve and you're knowledge in scripting vs.
                  xslt. i use xmlRules for styling my documents, xslt for data transformation.

                  in general you've got more control, especially over the rendered
                  document, using xmlRules. if you want to process layout rules/guidelines
                  in dependency of the actual document you have to render it first.

                  complex data transformation and composition is better with xslt outside
                  of indesign. i prefer to prepare my data (select relevant data,
                  numbering, ...) with xslt.

                  cheers,
                  gregor