<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
	<xsl:template match="/">
		<configuration>
			<security>
				<zones>
					<xsl:for-each select="dm/address_collection/address">
						<security-zone>
							<name>
								<xsl:value-of select="zone"/>
							</name>
							<address-book>
								<address>
									<name>
										<xsl:value-of select="name_"/>
									</name>
									<xsl:if test="comment">
										<comment>
											<xsl:value-of select="comment"/>
										</comment>
									</xsl:if>
									<xsl:choose>
										<xsl:when test="address/subnet/ip">
											<ip-prefix>
												<xsl:value-of select="concat(address/subnet/ip,'/',address/subnet/netmask)"/>
											</ip-prefix>
										</xsl:when>
										<xsl:otherwise>
											<dns-name>
												<xsl:value-of select="address/domain-name"/>
											</dns-name>
										</xsl:otherwise>
									</xsl:choose>
								</address>
							</address-book>
						</security-zone>
					</xsl:for-each>
				</zones>
			</security>
		</configuration>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="map-address" userelativepaths="no" externalpreview="no" url="file:///c:/IMS/netmgt/fb-dev-dmi/gui/var/dmi-xslt/shared-objects/junos-es/dm-dmi/map-address/test-input.xml" htmlbaseurl="" outputurl="file:///c:/IMS/netmgt/fb-dev-dmi/gui/var/dmi-xslt/shared-objects/junos-es/dm-dmi/map-address/map-address-out.xml" processortype="internal" useresolver="yes" profilemode="1" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="yes" validator="internal" customvalidator="" ><validatorSchema value="file:///c:/IMS/netmgt/fb-dev-dmi/gui/var/dmi-spec/junos-jsr-config.xsd"/></scenario></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="..\..\..\..\..\schemas\dmi-nsm\included\junos-es.xsd" destSchemaRoot="configuration" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no" ><SourceSchema srcSchemaPath="..\..\..\..\..\schemas\dmi-nsm\included\nsm-dm.xsd" srcSchemaRoot="dm" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template match="/"><block path="configuration/security/zones/xsl:for-each" x="141" y="40"/><block path="configuration/security/zones/xsl:for-each/security-zone/name/xsl:value-of" x="207" y="146"/><block path="configuration/security/zones/xsl:for-each/security-zone/address-book/address/name/xsl:value-of" x="127" y="146"/><block path="configuration/security/zones/xsl:for-each/security-zone/address-book/address/xsl:if" x="47" y="146"/><block path="configuration/security/zones/xsl:for-each/security-zone/address-book/address/xsl:if/comment/xsl:value-of" x="87" y="146"/><block path="configuration/security/zones/xsl:for-each/security-zone/address-book/address/xsl:choose" x="207" y="106"/><block path="configuration/security/zones/xsl:for-each/security-zone/address-book/address/xsl:choose/xsl:when/ip-prefix/xsl:value-of" x="167" y="106"/><block path="configuration/security/zones/xsl:for-each/security-zone/address-book/address/xsl:choose/xsl:otherwise/dns-name/xsl:value-of" x="127" y="106"/></template></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"><Fragment url="" path="" action=""/></MapperFilter></MapperMetaTag>
</metaInformation>
-->