xml/xquery/output format?

wxdqz

New Member
I have just begun playing... NOVICE! But, I have an xml document in-which I am using xquery to create a list of names. With the names in the list I have a check box next to each name. I would like to use css or xsl to create 3 vertical columns of about 9 rows each. Do I right the css in the actual xquery? If so I have an example that does not quite pull off what I would like. Thank you for any help!

--------------------------------------------------------------------
declare namespace xdmp="xdmp";
declare function xdmp:rows($available as xs:integer, $cols as xs:integer) as xs:integer {
if ($available mod $cols = 0) then $available div $cols
else $available div $cols + 1
};
(:
let $cols := 4
for $col in 1 to $cols, $row in 1 to xdmp:rows(34, $cols) return
element span {attribute class {concat("column", $col)}, attribute row {$row}}

:)
let $ff := doc('/pfd/pfd.xml')/*
for $f in $ff//firefighters/firefighter
order by $f/@lastName
return (
element input {
attribute id {$f/@id},
attribute type {"checkbox"},
attribute value {$f/@id}
},
element span {
attribute class {"label"},
text {concat($f/@lastName, ', ', $f/@firstName)}
},
element br {""}
)

canman - :)
 
Back
Top