An optical add or drop (30, 130) or add-and-drop (50, 150) device for an optical network element (20, 120, 60, 160), comprising: a plurality of WDM links (9, 31, 41) each adapted to carry optical signals on a plurality of wavelength channels, and a transponder block (33, 43, 50), the transponder block comprising: a plurality of transponders (1, 8) each adapted to generate or receive an optical signal on a selected wavelength channel, an optical spatial switching matrix comprising a plurality of transponder-side ports connected to the transponders and a plurality of AWG-side ports, wherein the optical spatial switching matrix is adapted to produce a plurality of optical paths as a function of a configuration state, and an arrayed waveguide grating, the arrayed waveguide grating comprising a plurality of network-side ports connected to the plurality of WDM links (9, 31, 41), and a plurality of matrix-side ports connected to the plurality of AWG-side ports, wherein a passband of the arrayed waveguide grating between a network-side port and a matrix-side port is dependent upon a rank of the network-side port and a rank of the matrix-side port, characterized in that the optical spatial switching matrix can be configured to generate transparent optical paths between any one of the transponder-side ports selected as a function of the configuration state, and any one of the AWG-side ports, selected as a function of the configuration state, each transparent optical path adapted to carry optical signals on the plurality of wavelength channels between the selected one of the transponder-side ports and the selected one of the AWG-side ports. a plurality of WDM links (9, 31, 41) each adapted to carry optical signals on a plurality of wavelength channels, and a transponder block (33, 43, 50), the transponder block comprising: a plurality of transponders (1, 8) each adapted to generate or receive an optical signal on a selected wavelength channel, an optical spatial switching matrix comprising a plurality of transponder-side ports connected to the transponders and a plurality of AWG-side ports, wherein the optical spatial switching matrix is adapted to produce a plurality of optical paths as a function of a configuration state, and an arrayed waveguide grating, the arrayed waveguide grating comprising a plurality of network-side ports connected to the plurality of WDM links (9, 31, 41), and a plurality of matrix-side ports connected to the plurality of AWG-side ports, wherein a passband of the arrayed waveguide grating between a network-side port and a matrix-side port is dependent upon a rank of the network-side port and a rank of the matrix-side port, a plurality of transponders (1, 8) each adapted to generate or receive an optical signal on a selected wavelength channel, an optical spatial switching matrix comprising a plurality of transponder-side ports connected to the transponders and a plurality of AWG-side ports, wherein the optical spatial switching matrix is adapted to produce a plurality of optical paths as a function of a configuration state, and an arrayed waveguide grating, the arrayed waveguide grating comprising a plurality of network-side ports connected to the plurality of WDM links (9, 31, 41), and a plurality of matrix-side ports connected to the plurality of AWG-side ports, wherein a passband of the arrayed waveguide grating between a network-side port and a matrix-side port is dependent upon a rank of the network-side port and a rank of the matrix-side port, a plurality of network-side ports connected to the plurality of WDM links (9, 31, 41), and a plurality of matrix-side ports connected to the plurality of AWG-side ports, wherein a passband of the arrayed waveguide grating between a network-side port and a matrix-side port is dependent upon a rank of the network-side port and a rank of the matrix-side port, characterized in that the optical spatial switching matrix can be configured to generate transparent optical paths between any one of the transponder-side ports selected as a function of the configuration state, and any one of the AWG-side ports, selected as a function of the configuration state, each transparent optical path adapted to carry optical signals on the plurality of wavelength channels between the selected one of the transponder-side ports and the selected one of the AWG-side ports.