Now that we've begun to take control of the flow of our document by using looping, it's time to take even tighter control by adapting to the data itself.
We can output different data and differently formatted data based on the data itself. In this case, we're going to use the webvendor attribute of the vendor elements, displaying all information for vendors with a webvendor attribute of full, displaying only some information for those with a webvendor attribute of partial, and not displaying at all those with a webvendor attribute of no.
This last is easy. In Listing 2.28, we'll instruct the processor not to output any text unless the webvendor attribute is something other than “no.”