On 6/9/05, Ross Gardler <[EMAIL PROTECTED]> wrote: > David Crossley wrote: > > Ross Gardler wrote: > > > >>David Crossley wrote: > >> > >>>Maurice Lanselle wrote: > >> > >>>>2) How does one construct "AND" classification rules? > >>>> > >>>><sourcetype name="foo"> > >>>> <document-element local-name="foo"> && <document-element > >>>> namespace="bar"> > >>>></sourcetype> > >>> > >>>I don't know if that is possible or needed. Perhaps there is another way. > >>>It would be better if you provided an actual use-case. > >> > >>Using your example from earlier in this thread, AND would be: > >> > >> > >>> <sourcetype name="foo"> > >>> <document-element local-name="foo"> > >>> </sourcetype> > >>> <sourcetype name="bar"> > >>> <document-element namespace="bar"> > >>> </sourcetype> > >>>... > >>>... > >>> <map:when test="foo"> > >>> <map:transform > >>> src="{project:resources.stylesheets}/foobar2document.xsl" /> > >>> </map:when> > >>> <map:when test="bar"> > >>> <map:transform > >>> src="{project:resources.stylesheets}/foobar2document.xsl" /> > >>> </map:when> > >>>... > > > > > > Er, i am confused. That code snippet is exactly the same as the OR > > situation. Did you forget to edit the code? > > Nope, I was being stupid. Seems my logic circuits blew, I thought an OR > was something completely different. I even added a note to the effect: > > >>(note the above example was directly copied for the suggestion for OR, > >>obviously in an OR you would have different actions within the test) > > Just to be clear, the above is obviously an OR, I hope Maurice saw > through my idiocy and didn't waste much time on that. > > I've had almost a whole nights sleep now, so maybe my logic circuits > have repaired themselves. However, they are not telling me how to do an > AND I'm afraid.
Nesting should get the AND effect. It does seem there's no direct way about it though. --tim For example, <map:when test="foo"> <map:when test="bar"> <map:transform src="{project:resources.stylesheets}/foobar2document.xsl" /> </map:when> </map:when>