From: <no...@so...> - 2002-01-04 20:09:16
|
Bugs item #499558, was opened at 2002-01-04 12:09 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=373747&aid=499558&group_id=21935 Category: DocBook XSL FO Group: None Status: Open Resolution: None Priority: 5 Submitted By: David Cramer (dcramer) Assigned to: Nobody/Anonymous (nobody) Summary: Whitespace in xrefs to titles Initial Comment: Given markup like: <section id="bar"> <title>Blah de foo <-- whitespace here--> </title> (Where there is whitespace after the last word in the title and the closing </title> tag). If I have my xref localization set up like this: <l:template name="section" text="Section %n, "%t," [page %p]"/> Then in the output, I get a blank space after foo and before the comma: Section 1.2, "Foo ," [page 5] Could a well placed normalize-space() in the xsls eliminate that problem? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=373747&aid=499558&group_id=21935 |
From: <no...@so...> - 2002-04-28 20:39:05
|
Bugs item #499558, was opened at 2002-01-04 15:09 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=373747&aid=499558&group_id=21935 Category: DocBook XSL FO Group: None >Status: Closed >Resolution: Rejected Priority: 5 Submitted By: David Cramer (dcramer) Assigned to: Nobody/Anonymous (nobody) Summary: Whitespace in xrefs to titles Initial Comment: Given markup like: <section id="bar"> <title>Blah de foo <-- whitespace here--> </title> (Where there is whitespace after the last word in the title and the closing </title> tag). If I have my xref localization set up like this: <l:template name="section" text="Section %n, "%t," [page %p]"/> Then in the output, I get a blank space after foo and before the comma: Section 1.2, "Foo ," [page 5] Could a well placed normalize-space() in the xsls eliminate that problem? ---------------------------------------------------------------------- >Comment By: Norman Walsh (nwalsh) Date: 2002-04-28 16:39 Message: Logged In: YES user_id=81663 It could, except that titles can contain markup, so there's no place to put the call. (You can't, for example, just output the string value of the title, you have to call recursive templates.) So I think the answer is, don't do that. :-) ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=373747&aid=499558&group_id=21935 |
From: <no...@so...> - 2002-04-29 03:54:21
|
Bugs item #499558, was opened at 2002-01-04 14:09 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=373747&aid=499558&group_id=21935 Category: DocBook XSL FO Group: None Status: Closed Resolution: Rejected Priority: 5 Submitted By: David Cramer (dcramer) Assigned to: Nobody/Anonymous (nobody) Summary: Whitespace in xrefs to titles Initial Comment: Given markup like: <section id="bar"> <title>Blah de foo <-- whitespace here--> </title> (Where there is whitespace after the last word in the title and the closing </title> tag). If I have my xref localization set up like this: <l:template name="section" text="Section %n, "%t," [page %p]"/> Then in the output, I get a blank space after foo and before the comma: Section 1.2, "Foo ," [page 5] Could a well placed normalize-space() in the xsls eliminate that problem? ---------------------------------------------------------------------- >Comment By: David Cramer (dcramer) Date: 2002-04-28 21:54 Message: Logged In: YES user_id=281721 How about looping through the node()s and only calling the normalize- space on a text node if it's the last one--see attached example :) It appears that it would have to happen in at least three places (component.xsl, division.xsl, and sections.xsl). ---------------------------------------------------------------------- Comment By: Norman Walsh (nwalsh) Date: 2002-04-28 14:39 Message: Logged In: YES user_id=81663 It could, except that titles can contain markup, so there's no place to put the call. (You can't, for example, just output the string value of the title, you have to call recursive templates.) So I think the answer is, don't do that. :-) ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=373747&aid=499558&group_id=21935 |
From: <no...@so...> - 2002-04-29 04:26:51
|
Bugs item #499558, was opened at 2002-01-04 14:09 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=373747&aid=499558&group_id=21935 Category: DocBook XSL FO Group: None Status: Closed Resolution: Rejected Priority: 5 Submitted By: David Cramer (dcramer) Assigned to: Nobody/Anonymous (nobody) Summary: Whitespace in xrefs to titles Initial Comment: Given markup like: <section id="bar"> <title>Blah de foo <-- whitespace here--> </title> (Where there is whitespace after the last word in the title and the closing </title> tag). If I have my xref localization set up like this: <l:template name="section" text="Section %n, "%t," [page %p]"/> Then in the output, I get a blank space after foo and before the comma: Section 1.2, "Foo ," [page 5] Could a well placed normalize-space() in the xsls eliminate that problem? ---------------------------------------------------------------------- >Comment By: David Cramer (dcramer) Date: 2002-04-28 22:26 Message: Logged In: YES user_id=281721 Ok, I see the problem, if you have: <title>Introduction to the <phrase>blah blah</phrase> baz </title> then the normalize- space will cause you to have 'blahbaz' in the output. You could concat the preceding space back in--but that's messy too. You'd have to check to make sure there was a space there. Then the only time you're still going to have a problem is if you do <title>Introduction to the <phrase>blah blah </phrase> baz </title>, since the linefeed in the phrase won't be stripped (and it would be difficult to figure out whether it should be). Ok--well--forget about it :) ---------------------------------------------------------------------- Comment By: David Cramer (dcramer) Date: 2002-04-28 21:54 Message: Logged In: YES user_id=281721 How about looping through the node()s and only calling the normalize- space on a text node if it's the last one--see attached example :) It appears that it would have to happen in at least three places (component.xsl, division.xsl, and sections.xsl). ---------------------------------------------------------------------- Comment By: Norman Walsh (nwalsh) Date: 2002-04-28 14:39 Message: Logged In: YES user_id=81663 It could, except that titles can contain markup, so there's no place to put the call. (You can't, for example, just output the string value of the title, you have to call recursive templates.) So I think the answer is, don't do that. :-) ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=373747&aid=499558&group_id=21935 |