On 04/26/10 05:41, Ivan Ristic wrote:
On a similar matter, does anyone know if it is possible to include only a part of a file?

No.

To quote the link that Samuel gave:

"""Since the included text is not XML, you cannot use an xpointer attribute with XPointer syntax to select part of it. You can only select the entire file's content."""

In case of a book on programming, for example, I want to keep all examples separate (which would allow me to easily perform syntax checks, and maintain them separately), but include only certain parts in the book (complete examples will usually include much more stuff than necessary to reproduce in a book).

Ok, this makes sense enough.

I looked around for a solution, but couldn't find anything. I have an idea to hack something together that would allow me to specify the fragment "coordinates" in the URL. For example:
...
Comments, pointers and suggestions are welcome.

Can you not have all your examples in separate source files?

You might need a pre-processor to include them together when compiling your source code. Can you compile your source code as is or are some of the sections duplicate?



Grant. . . .


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

Reply via email to