emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-babel-tangle xml text
@ 2009-11-03 15:16 "Martin G. Skjæveland"
  2009-11-03 16:18 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: "Martin G. Skjæveland" @ 2009-11-03 15:16 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I am quite new to the wonderful world of org-mode and org-babel. Right 
now I am using org-mode to make exercises for a semantic web programming 
course. org-mode and its friends give me a efficient writing tool, a 
presentation tool, export for web, export for print and a literate 
programming tool. That's nice!

But I have a question. I would like to include many code snippets 
written in RDF (XML/RDF, N3), which are languages not supported by 
org-babel [1], in my document, and I would like to use the "Edit the 
source code example at point in its native mode"-feature of org-mode and 
the tangle-feature of org-babel. Now I'm specifying the language as css 
(see below) since it is supported by org-babel and does not add any 
comments to output. This works for "tangling", but not for native editing.

Is there a way I can add xml and n3 to the list of supported languages? 
These languages does not need interpretation, so I'm thinking it should 
be quite easy to add. I have fumblingly tried

   (add-to-list 'org-babel-tangle-langs '("xml"))

and

   (add-to-list 'org-babel-tangle-langs '("css" "xml"))

but it as no effect.

Below is a sample of what I am currently using. Running org-babel-tangle 
gives me the correct foaf.rdf file. I would like to swap 'css' with 
'xml' so that the code can be edited and understood as xml.

#+SRCNAME: foaf-main
#+BEGIN_SRC css :tangle foaf.rdf
   <rdf:RDF>
     <<foaf-rel>>
   </rdf:RDF>
#+END_SRC

#+SRCNAME: foaf-rel
#+BEGIN_SRC css :tangle no
   <foaf:knows>
     <foaf:Person rdf:ID="timbl">
   </foaf:knows>
#+END_SRC


I hope this was clear -- and that someone can help.
Thanks!
Martin

  [1] 
http://orgmode.org/worg/org-contrib/babel/org-babel.php#reference-and-documentation

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-03 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-03 15:16 org-babel-tangle xml text "Martin G. Skjæveland"
2009-11-03 16:18 ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).