For anyone having trouble with this: pay attention to special chars and your encoding. In my case the code was encoded in WIN1252 while the other documentation is in UTF8. So DAPS reported invalid characters. In my case the german symbols 'ö', 'ä' and 'ü'. So I corrected the encoding of my xincluded soruce code and everything is fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm wondering if I can use the following DocBook-Code to embed source code in my documentation:
If I use this XML structure I'm getting this errors:
Would be great if you can help.
Regards
Martin
Hi Martin,
thanks for your question!
I wouldn't recommend
textdata
; it is not a good idea as you need a Java extension which is only available through Saxon.However, there is a much better solution: use XIncludes:
This XInclude is resolved through the usual processing and all text inside the referenced text will be included.
Hope that helps.
Thank you Thomas. This works great.
For anyone having trouble with this: pay attention to special chars and your encoding. In my case the code was encoded in WIN1252 while the other documentation is in UTF8. So DAPS reported invalid characters. In my case the german symbols 'ö', 'ä' and 'ü'. So I corrected the encoding of my xincluded soruce code and everything is fine.
Hi Martin,
Although I would recommend to use UTF-8 throughout all files, XIncludes allows to define the encoding. Use the
encoding
attribute: