ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Verbatim Text (esp. XML/XSL + opportunity of a brand new support for the RelaxNG Compact syntax)
@ 2008-10-17 18:21 Renaud Aubin
  2008-10-17 18:40 ` Aditya Mahajan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Renaud Aubin @ 2008-10-17 18:21 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

Hi Folks !

I'm currently writting a technical report in which I need to type some 
XML an non-XML text.

Sample file (xml_test.tex):
I have some custom XML text (trivial) + a not-so-complicated xsl 
transformation (a part is included within the test file). I know there 
is verb-xml but... I need to improve it to support xpath expr. More 
over, I want to preserve the initial indentation. The point is now, how 
to improve verb-xml to support xpath expressions ? I'm working with Mark 
II... Should I switch to Mark IV if I want to write a new XML verbatim 
support (with lua)?

+ the bonus question: I want to add some support for the RelaxNG Compact 
syntax, should I follow the procedure described on the wiki or switch to 
Mark IV ?

The deadline for this technical report: end of october...

Regards,

Renaud
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Verbatim Text (esp. XML/XSL + opportunity of a brand new support for the RelaxNG Compact syntax)
  2008-10-17 18:21 Verbatim Text (esp. XML/XSL + opportunity of a brand new support for the RelaxNG Compact syntax) Renaud Aubin
@ 2008-10-17 18:40 ` Aditya Mahajan
  2008-10-17 18:57 ` Renaud Aubin
  2008-10-20  8:05 ` Taco Hoekwater
  2 siblings, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2008-10-17 18:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 17 Oct 2008, Renaud Aubin wrote:

> Hi Folks !
>
> I'm currently writting a technical report in which I need to type some
> XML an non-XML text.
>
> Sample file (xml_test.tex):
> I have some custom XML text (trivial) + a not-so-complicated xsl
> transformation (a part is included within the test file). I know there
> is verb-xml but... I need to improve it to support xpath expr. More
> over, I want to preserve the initial indentation. The point is now, how
> to improve verb-xml to support xpath expressions ? I'm working with Mark
> II... Should I switch to Mark IV if I want to write a new XML verbatim
> support (with lua)?

I would suggest to switch to Mark IV since writing support for verbatim is 
considerably simpler in Mark IV. Lua is much easier to program than TeX 
:-)

> + the bonus question: I want to add some support for the RelaxNG Compact
> syntax, should I follow the procedure described on the wiki or switch to
> Mark IV ?

Switch to Mark IV.

> The deadline for this technical report: end of october...

It time becomes an issue, you can always try t-vim to get syntax 
highlighting using vim.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Verbatim Text (esp. XML/XSL + opportunity of a brand new support for the RelaxNG Compact syntax)
  2008-10-17 18:21 Verbatim Text (esp. XML/XSL + opportunity of a brand new support for the RelaxNG Compact syntax) Renaud Aubin
  2008-10-17 18:40 ` Aditya Mahajan
@ 2008-10-17 18:57 ` Renaud Aubin
  2008-10-20  8:05 ` Taco Hoekwater
  2 siblings, 0 replies; 5+ messages in thread
From: Renaud Aubin @ 2008-10-17 18:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

It's better with the attachment...

Renaud Aubin a écrit :
> Hi Folks !
>
> I'm currently writting a technical report in which I need to type some 
> XML an non-XML text.
>
> Sample file (xml_test.tex):
> I have some custom XML text (trivial) + a not-so-complicated xsl 
> transformation (a part is included within the test file). I know there 
> is verb-xml but... I need to improve it to support xpath expr. More 
> over, I want to preserve the initial indentation. The point is now, how 
> to improve verb-xml to support xpath expressions ? I'm working with Mark 
> II... Should I switch to Mark IV if I want to write a new XML verbatim 
> support (with lua)?
>
> + the bonus question: I want to add some support for the RelaxNG Compact 
> syntax, should I follow the procedure described on the wiki or switch to 
> Mark IV ?
>
> The deadline for this technical report: end of october...
>
> Regards,
>
> Renaud
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
>


[-- Attachment #2: xml_test.tex --]
[-- Type: text/x-tex, Size: 1851 bytes --]


\setupcolors[state=start]

\starttext

\startXML
      <xsl:for-each select="PRIMITIVE[@type='CIRC']">
	<xsl:choose>
	  <xsl:when test="boolean(PROPERTIES/ATTR[@name='RATI'])">
	    <xsl:variable name="ratio" select="PROPERTIES/ATTR[@name='RATI']"/>
	    <ellipse>
	      <xsl:attribute name="rx">
		<xsl:value-of select="PROPERTIES/ATTR[@name='RADI']"/>
	      </xsl:attribute>
	      <xsl:attribute name="ry">
		<xsl:value-of select="PROPERTIES/ATTR[@name='RADI']*$ratio"/>
	      </xsl:attribute>
	      <xsl:attribute name="cx">
		<xsl:value-of select="PROPERTIES/ATTR[@name='POSN']/X"/>
	      </xsl:attribute>
	      <xsl:attribute name="cy">
		<xsl:value-of select="PROPERTIES/ATTR[@name='POSN']/Y"/>
	      </xsl:attribute>
	      <xsl:attribute name="stroke">
		<xsl:text>black</xsl:text>
	      </xsl:attribute>
	      <xsl:attribute name="stroke-width">
		<xsl:value-of select="PROPERTIES/ATTR[@name='WIDT']"/>
	      </xsl:attribute>
	      <xsl:attribute name="fill">
		<xsl:text>none</xsl:text>
	      </xsl:attribute>
	    </ellipse>
	  </xsl:when>
	  <xsl:otherwise>
	    <circle>
	      <xsl:attribute name="r">
		<xsl:value-of select="PROPERTIES/ATTR[@name='RADI']"/>
	      </xsl:attribute>
	      <xsl:attribute name="cx">
		<xsl:value-of select="PROPERTIES/ATTR[@name='POSN']/X"/>
	      </xsl:attribute>
	      <xsl:attribute name="cy">
		<xsl:value-of select="PROPERTIES/ATTR[@name='POSN']/Y"/>
	      </xsl:attribute>
	      <xsl:attribute name="stroke">
		<xsl:text>black</xsl:text>
	      </xsl:attribute>
	      <xsl:attribute name="stroke-width">
		<xsl:value-of select="PROPERTIES/ATTR[@name='WIDT']"/>
	      </xsl:attribute>
	      <xsl:attribute name="fill">
		<xsl:text>none</xsl:text>
	      </xsl:attribute>
	    </circle>
	  </xsl:otherwise>
	</xsl:choose>
      </xsl:for-each>

\stopXML

\input knuth

\stoptext

[-- Attachment #3: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Verbatim Text (esp. XML/XSL + opportunity of a brand new support for the RelaxNG Compact syntax)
  2008-10-17 18:21 Verbatim Text (esp. XML/XSL + opportunity of a brand new support for the RelaxNG Compact syntax) Renaud Aubin
  2008-10-17 18:40 ` Aditya Mahajan
  2008-10-17 18:57 ` Renaud Aubin
@ 2008-10-20  8:05 ` Taco Hoekwater
  2008-10-20 17:37   ` Renaud Aubin
  2 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2008-10-20  8:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Hi Renaud,

Renaud Aubin wrote:
> Hi Folks !
> 
> I'm currently writting a technical report in which I need to type some 
> XML an non-XML text.
> 
> Sample file (xml_test.tex):
> I have some custom XML text (trivial) + a not-so-complicated xsl 
> transformation (a part is included within the test file). I know there 
> is verb-xml but... I need to improve it to support xpath expr. More 
> over, I want to preserve the initial indentation. The point is now, how 
> to improve verb-xml to support xpath expressions ? I'm working with Mark 
> II... Should I switch to Mark IV if I want to write a new XML verbatim 
> support (with lua)?
> 
> + the bonus question: I want to add some support for the RelaxNG Compact 
> syntax, should I follow the procedure described on the wiki or switch to 
> Mark IV ?
> 
> The deadline for this technical report: end of october...

Mark IV's framework for syntax highlighting is definately easier to
use if you are somewhat familiar with 'normal' scripting languages
(as opposed to TeX). But 'end of october' is pretty close, so I would
suggest using t-vim, maybe with some postprocessing.

   http://modules.contextgarden.net/vim

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Verbatim Text (esp. XML/XSL + opportunity of a brand new support for the RelaxNG Compact syntax)
  2008-10-20  8:05 ` Taco Hoekwater
@ 2008-10-20 17:37   ` Renaud Aubin
  0 siblings, 0 replies; 5+ messages in thread
From: Renaud Aubin @ 2008-10-20 17:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Taco, Aditya,

Thanks, t-vim will do the job for the end of october... Even if I will 
surely give a try to MarkIV on this particular point.

Regards,

Renaud

Taco Hoekwater a écrit :
> Hi Renaud,
>
> Renaud Aubin wrote:
>> Hi Folks !
>>
>> I'm currently writting a technical report in which I need to type some 
>> XML an non-XML text.
>>
>> Sample file (xml_test.tex):
>> I have some custom XML text (trivial) + a not-so-complicated xsl 
>> transformation (a part is included within the test file). I know there 
>> is verb-xml but... I need to improve it to support xpath expr. More 
>> over, I want to preserve the initial indentation. The point is now, how 
>> to improve verb-xml to support xpath expressions ? I'm working with Mark 
>> II... Should I switch to Mark IV if I want to write a new XML verbatim 
>> support (with lua)?
>>
>> + the bonus question: I want to add some support for the RelaxNG Compact 
>> syntax, should I follow the procedure described on the wiki or switch to 
>> Mark IV ?
>>
>> The deadline for this technical report: end of october...
>
> Mark IV's framework for syntax highlighting is definately easier to
> use if you are somewhat familiar with 'normal' scripting languages
> (as opposed to TeX). But 'end of october' is pretty close, so I would
> suggest using t-vim, maybe with some postprocessing.
>
>    http://modules.contextgarden.net/vim
>
> Best wishes,
> Taco
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
>
>   

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2008-10-20 17:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-17 18:21 Verbatim Text (esp. XML/XSL + opportunity of a brand new support for the RelaxNG Compact syntax) Renaud Aubin
2008-10-17 18:40 ` Aditya Mahajan
2008-10-17 18:57 ` Renaud Aubin
2008-10-20  8:05 ` Taco Hoekwater
2008-10-20 17:37   ` Renaud Aubin

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 NNTP newsgroup(s).