I'm running into something that might or might not be considered a bug
in the way the Saxon linenumbering extension works.

Here's the setup:

- I'm using Saxon and the latest stylesheets
- The parameters are set up for line numbering
(linenumbering.everyNth="1", use.extensions="1", and
linenumbering.extension="1")
- I'm using the following markup for a programlisting:

<programlisting linenumbering="numbered"><xi:include href="file"
parse="text"/></programlisting>

When I do this, I get a numbered empty line after the last line in the
file. I don't get this if I directly insert the content inline:

<programlisting linenumbering="numbered">Line one
Line two</programlisting>

If I remove the final newline in the inserted file, this doesn't happen,
so it's pretty clear the extension considers that last newline to
indicate a new line to be numbered. The same thing happens if you put a
newline before the closing </programlisting> in the second xml example
above.

So, the question is, should the extension treat a final newline this
way?

I'm inclined to think that it should not do this. It's not a big deal if
your content is inline, but with xi:include, it means you need to
manipulate your file to remove the newline character, which I suspect
can cause problems if you're trying to use that content elsewhere (for
example, to test a function).

Any thoughts?

Best Regards,
Dick Hamilton
---------------------------------
XML Press
XML for Technical Communicators
http://xmlpress.net
(970) 231-3624 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to