Thanks,

Does what I want and opens the door for further exploration ...

Joh

Hans Hagen wrote:

> Johannes Graumann wrote:
> 
>>Hans,
>>
>>I'm just not getting it ... can't find the appropriate documentation
>>maybe? http://www.pragma-ade.nl/general/manuals/example.pdf is all I got
>>and e.g. "XMLop" does not show up at all in there ...
>>  
>>
> XMLop{xx} is a shortcut for \XMLpar{list}{xx}{some default}
> 
> and as long as the current element is list that will work, so
> 
> \defineXMLenvironment[list]
>   {here \XMLop{xx} works fine}
>   {but here the last element encountered may be another than list}
> 
>>I tryed to get this working (just trial and error), but I just don't
>>understand ... can you kick me some more into the right direction?
>>
>>\mapXMLvalue {list:packed} {yes} {packed}
>>\mapXMLvalue {list:packed} {no} {unpacked}
>>\mapXMLvalue {list:setup}  {\XMLpar{list}{setup}{}} {setup}
>>\defineXMLenvironment
>>        [list]
>>        [packed=no,setup=1]
>>        {%
>>                \startitemize[%
>>                        \XMLval{list:setup}{\XMLop{setup}}{},
>>                        \XMLval{list:packed}{\XMLop{packed}}{}
>>                ]%
>>        }%
>>        {\stopitemize}
>>
>>Likly many a thing doesn't make sense at all - I just don't get it.
>>
>>Any hint is highly appreciated,
>>  
>>
> This works ok here:
> 
> \mapXMLvalue {list:packed} {yes} {packed}
> \mapXMLvalue {list:packed} {no} {unpacked}
> 
> \defineXMLenvironment
>     [list]
>     [packed=no,setup=1]
>     {\startitemize[\XMLop{setup},\XMLval{list:packed}{\XMLop{packed}}{}]}
>     {\stopitemize}
> 
> \defineXMLenvironment
>     [item]
>     {\item}
>     {\endgraf}
> 
> \starttext
> 
> \startXMLdata
> <list packed='yes'>
>     <item>item one</item>
>     <item>item two</item>
> </list>
> \stopXMLdata
> 
> \startXMLdata
> <list>
>     <item>item one</item>
>     <item>item two</item>
> </list>
> \stopXMLdata
> 
> \startXMLdata
> <list packed='yes' setup='a'>
>     <item>item one</item>
>     <item>item two</item>
> </list>
> \stopXMLdata
> 
> \startXMLdata
> <list setup='a'>
>     <item>item one</item>
>     <item>item two</item>
> </list>
> \stopXMLdata
> 
> \stoptext
> 
> (it may help to look at the x-* files in the context/base path)
> 
> Hans

-- 
+----------------------------------------------------------------------+
| Johannes Graumann, Dipl. Biol.                                       |
|                                                                      |
|      Graduate Student                Tel.: ++1 (626) 395 6602        |
|      Deshaies Lab                    Fax.: ++1 (626) 395 5739        |
|      Department of Biology                                           |
|      CALTECH, M/C 156-29                                             |
|      1200 E. California Blvd.                                        |
|      Pasadena, CA 91125                                              |
|      USA                                                             |
+----------------------------------------------------------------------+

_______________________________________________
ntg-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to