Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need to include a transformed XML document into my LaTeX source. Transformation is specified inside the XML via XSLT. I recently started using LaTeX and I have bib database in XML. However, this XML file contains a lot more information than a .bib file can contain (or should contain).

Therefore, it looks like one of these will do the trick:

  • Including transformed XML text directly (which will produce well formed .bib file)
  • Including a program output (which will output well formed .bib file)

I have seen options like running application before and obtaining results using .bat or makefiles. However, I will consider these as last resort because it will not be portable. Other people receiving my file should change their editor settings to be able to compile it.

share|improve this question
    
I'm forbidden from telling you that ConTeXt can handle XML, so you should probably use that instead of LaTeX. –  Martin Schröder Sep 20 '11 at 18:37
    
:) I found a bad solution, but i will keep the question open if there is a way to do it better. –  Cem Kalyoncu Sep 21 '11 at 12:59
    
Would you mind sharing your solution with the community? –  doncherry Oct 13 '11 at 13:26

1 Answer 1

up vote 2 down vote accepted

As Martin already pointed out, ConTeXt can handle XML.

Another solution would be to use LuaTeX and write a custom parser in Lua or use a library for that purpose. The options are endless. If you write a custom function in Lua it is at least portable to users of LuaTeX and furthermore a very flexible solution.

share|improve this answer
1  
There is a LuaTeX variant with an XML parser built in (based on libxml2): github.com/pgundlach/LuaTeX/tree/xmlreader –  topskip Nov 7 '11 at 20:37
    
I have done it with a hack, but next time I will try your method. Looks pretty promising. –  Cem Kalyoncu Nov 8 '11 at 16:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.