Loading ...
Sorry, an error occurred while loading the content.

Re: [xml-doc] Quark 5, InDesign 2

Expand Messages
  • Eoin Campbell
    Character entities are a real problem, but we only had to deal with the euro symbol in our case. We converted € into
    Message 1 of 4 , May 1, 2002
    • 0 Attachment
      Character entities are a real problem, but we only had to deal with
      the euro symbol in our case. We converted '€' into
      '<Char style="ca_price euro">E</Char>'
      to get the euro symbol to appear nicely in a special Quark style.

      The code to replace a single character with a string in XSLT
      is painful. We used the following:

      <xsl:choose>
      <xsl:when test="contains(., '€')">
      <Char>
      <xsl:value-of select="substring-before(.,
      '€')" />
      </Char>
      <Char style="ca_price euro">
      <xsl:text>E</xsl:text>
      </Char>
      <Char>
      <xsl:value-of select="concat(substring-after(.,
      '€'), ' ')" />
      </Char>
      </xsl:when>
      <xsl:otherwise>
      <Char>
      <xsl:value-of select="concat(., ' ')"/>
      </Char>

      If you have a larger list of characters requiring special treatment in Quark,
      its be a real nightmare.



      At 23:49 30/04/2002, Dorothea Salo wrote:

      > (I think XPressXML and its sister program RoustaboutXT mightily
      > rock -- but
      >I find special character management an unhappy thing to do via XSLT. There
      >must be some trick I'm missing.)

      --
      Eoin Campbell, Technical Director, XML Workshop Ltd,
      10 Greenmount Industrial Estate, Harolds Cross, Dublin 12, IRELAND.
      Email: ecampbell@...
      Phone: +353 1 4547811; Fax: +353 1 4731626
      Web: http://www.xmlw.ie/
    • Chris Loschen
      We ve converted documents with many different sorts of entities, sometimes hundreds of them. May I suggest a simpler approach? Xtags (an Xtension available
      Message 2 of 4 , May 1, 2002
      • 0 Attachment
        We've converted documents with many different sorts of entities,
        sometimes hundreds of them. May I suggest a simpler approach?

        Xtags (an Xtension available from Em Software, not the Xpress Tags
        available in vanilla Quark -- I think it's also available for InDesign, but
        I'm not sure) has a translation table feature that you can set up with
        whatever entities you may need. I use a standard set with the most
        widely-used entities and supplement it as needed. It's essentially a
        tab-delimited array, so the syntax is quite simple, and the characters
        are automatically translated on loading the text into Quark.

        The example below would look something like this:

        € <Char style="ca_price euro">E</Char> converts euro Unicode entry
        to euro symbol

        Done. If XSLT is that much of a pain dealing with entities, it seems to me
        that a different tool is in order.

        At 08:03 AM 5/1/02, you wrote:
        >Character entities are a real problem, but we only had to deal with
        >the euro symbol in our case. We converted '€' into
        >'<Char style="ca_price euro">E</Char>'
        >to get the euro symbol to appear nicely in a special Quark style.
        >
        >The code to replace a single character with a string in XSLT
        >is painful. We used the following:
        >
        ><xsl:choose>
        > <xsl:when test="contains(., '€')">
        > <Char>
        > <xsl:value-of select="substring-before(.,
        >'€')" />
        > </Char>
        > <Char style="ca_price euro">
        > <xsl:text>E</xsl:text>
        > </Char>
        > <Char>
        > <xsl:value-of select="concat(substring-after(.,
        >'€'), ' ')" />
        > </Char>
        > </xsl:when>
        > <xsl:otherwise>
        > <Char>
        > <xsl:value-of select="concat(., ' ')"/>
        > </Char>
        >
        >If you have a larger list of characters requiring special treatment in Quark,
        >its be a real nightmare.
        >
        >
        >
        >At 23:49 30/04/2002, Dorothea Salo wrote:
        >
        > > (I think XPressXML and its sister program RoustaboutXT mightily
        > > rock -- but
        > >I find special character management an unhappy thing to do via XSLT. There
        > >must be some trick I'm missing.)
        >
        >--
        >Eoin Campbell, Technical Director, XML Workshop Ltd,
        >10 Greenmount Industrial Estate, Harolds Cross, Dublin 12, IRELAND.
        >Email: ecampbell@...
        >Phone: +353 1 4547811; Fax: +353 1 4731626
        >Web: http://www.xmlw.ie/
        >
        >
        >
        >
        >
        >-------------------------------------------------------------------
        >Post a message: mailto:xml-doc@yahoogroups.com
        >Unsubscribe: mailto:xml-doc-unsubscribe@yahoogroups.com
        >Switch to digest: mailto:xml-doc-digest@yahoogroups.com
        >Put mail on hold: mailto:xml-doc-nomail@yahoogroups.com
        >Contact adminstrator: mailto:xml-doc-owner@yahoogroups.com
        >Make changes via Web: http://groups.yahoo.com/subscribe/xml-doc/
        >Read archived messages: http://groups.yahoo.com/messages/xml-doc/
        >-------------------------------------------------------------------
        >
        >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

        --Chris

        ----------------------------------------------------------------------------------------
        Texterity ~ XML and PDF ePublishing Services
        ----------------------------------------------------------------------------------------
        Chris Loschen, XML Developer
        Texterity, Inc.
        144 Turnpike Road
        Southborough, MA 01772 USA
        tel: +1.508.804.3033
        fax: +1.508.804.3110
        email: loschen@...
        http://www.texterity.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.