You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2013/07/07 14:12:24 UTC
[01/11] Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Updated Branches:
refs/heads/master 0763d6f91 -> f5c169db9
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribed_cartridges_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribed_cartridges_ajaxprocessor.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribed_cartridges_ajaxprocessor.jsp
deleted file mode 100644
index 17e394b..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribed_cartridges_ajaxprocessor.jsp
+++ /dev/null
@@ -1,279 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
-<%@ page import="org.wso2.carbon.CarbonConstants"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
-<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
-<%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient"%>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.CartridgeWrapper"%>
-<%@ page import="java.text.SimpleDateFormat"%>
-<%@ page import="java.util.ResourceBundle"%>
-<%@ page import="java.util.ArrayList"%>
-
-<jsp:include page="../dialog/display_messages.jsp" />
-
-<%
- response.setHeader("Cache-Control", "no-cache");
-
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext =
- (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
-
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- CartridgeAdminClient client;
- Cartridge[] cartridges = null;
-
- int numberOfPages = 0;
- String pageNumber = request.getParameter("pageNumber");
- if (pageNumber == null) {
- pageNumber = "0";
- }
- int pageNumberInt = 0;
- try {
- pageNumberInt = Integer.parseInt(pageNumber);
- } catch (NumberFormatException ignored) {
- }
-
- String cartridgeSearchString = request.getParameter("cartridgeSearchString");
- if (cartridgeSearchString == null) {
- cartridgeSearchString = "";
- }
-
- try {
- client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
- CartridgeWrapper cartridgeWrapper = client.getPagedSubscribedCartridges(cartridgeSearchString, pageNumberInt);
- if (cartridgeWrapper != null) {
- numberOfPages = cartridgeWrapper.getNumberOfPages();
- cartridges = cartridgeWrapper.getCartridges();
- }
- } catch (Exception e) {
- response.setStatus(500);
- CarbonUIMessage uiMsg = new CarbonUIMessage(CarbonUIMessage.ERROR, e.getMessage(), e);
- session.setAttribute(CarbonUIMessage.ID, uiMsg);
-%>
-<jsp:include page="../admin/error.jsp" />
-<%
- return;
- }
-%>
-
-<fmt:bundle basename="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources">
- <div>
- <%
- if (cartridges != null) {
- String parameters = "cartridgeSearchString=" + cartridgeSearchString;
- %>
-
- <carbon:paginator pageNumber="<%=pageNumberInt%>" numberOfPages="<%=numberOfPages%>" page="subscribed_cartridges.jsp"
- pageNumberParameterName="pageNumber" resourceBundle="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources" prevKey="prev"
- nextKey="next" parameters="<%=parameters%>" />
- <p> </p>
-
- <form id="frmSubC" name="cartridgesForm" method="post">
- <input type="hidden" name="pageNumber" value="<%=pageNumber%>" />
- <table id="cartridgesTable" class="styledLeft" style="width: 100%">
- <thead>
- <tr>
- <th style="width: 10%"><fmt:message key="cartridge.display.name" /></th>
- <th style="width: 70px"><fmt:message key="cartridge.version" /></th>
- <th style="width: 125px"><fmt:message key="cartridge.tenancymodel" /></th>
- <th style="width: 10%"><fmt:message key="alias" /></th>
- <th style="width: 5%"><fmt:message key="status" /></th>
- <th style="text-align: right; padding-right: 5px; width: 125px;"><fmt:message key="instance.count" /></th>
- <th><fmt:message key="url" /></th>
- <th style="width: 12%"><fmt:message key="repo.url" /></th>
- <th style="width: 8%"><fmt:message key="action" /></th>
- </tr>
- </thead>
- <tbody>
-
- <%
- int id = 1; // To generate ID
-
- for (Cartridge cartridge : cartridges) {
-
- String popupID = "cartridge_popup_" + id;
- String rowStyleClass = ((id & 1) == 0) ? "tableEvenRow" : "tableOddRow";
-
- // Increment ID
- id++;
-
- String[] accessURLs = cartridge.getAccessURLs();
- StringBuilder urlBuilder = new StringBuilder();
- if (accessURLs != null) {
- for (int i = 0; i < accessURLs.length; i++) {
- String url = accessURLs[i];
- if (url != null) {
- if (i > 0) {
- urlBuilder.append("<br />");
- }
- urlBuilder.append("<a href=\"").append(url).append("\" target=\"_blank\">").append(url).append("</a>");
- }
- }
- }
-
- String displayName = (cartridge.getDisplayName() != null ? cartridge.getDisplayName() : "");
- String version = (cartridge.getVersion() != null ? cartridge.getVersion() : "");
- String description = (cartridge.getDescription() != null ? cartridge.getDescription() : "");
- String alias = (cartridge.getCartridgeAlias() != null ? cartridge.getCartridgeAlias() : "");
- String status = (cartridge.getStatus() != null ? cartridge.getStatus() : "");
- int activeInstances = cartridge.getActiveInstances();
- String instances = cartridge.getMultiTenant() ? "N/A" : String.valueOf(activeInstances);
- String accessURL = urlBuilder.toString();
- String repoURL = (cartridge.getRepoURL() != null ? cartridge.getRepoURL() : "");
- String ip = (cartridge.getIp() != null ? cartridge.getIp() : "");
- String dbUsername = (cartridge.getDbUserName() != null ? cartridge.getDbUserName() : "");
- String password = (cartridge.getPassword() != null ? cartridge.getPassword() : "");
- String mappedDomain = (cartridge.getMappedDomain() != null ? cartridge.getMappedDomain() : "");
- String policy = (cartridge.getPolicyDescription() != null ? cartridge.getPolicyDescription() : "");
- String tenancyModel = cartridge.getMultiTenant() ? "Multi-Tenant" : "Single-Tenant";
-
- if (repoURL.startsWith("http")) {
- StringBuilder repoURLBuilder = new StringBuilder();
- repoURL = repoURLBuilder.append("<a href=\"").append(repoURL).append("\" target=\"_blank\">").append(repoURL).append("</a>").toString();
- }
- %>
-
- <tr class="<%=rowStyleClass%>">
- <td><%=displayName%></td>
- <td><%=version%></td>
- <td><%=tenancyModel%></td>
- <td><a onclick="showCartridgeInfo('<%=popupID%>', '<%=alias%>')" style="background-image:url(../admin/images/information.gif);" class="icon-link"><%=alias%></a></td>
- <td><span <%if (!"ACTIVE".equalsIgnoreCase(status)) {%>
- style="background-image: url(images/ajax-loading.gif); background-repeat: no-repeat; background-position: left center; padding-left: 22px;"
- <%}%>><%=status%></span></td>
- <td style="text-align: right;"><%=instances%></td>
- <td><%=accessURL%></td>
- <td><%=repoURL%></td>
- <td><a onclick="unsubscribeCartridge('<%=alias%>');" style="background-image:url(images/unsubscribe.png);" class="icon-link">
- <fmt:message key="unsubscribe"/></a>
- <% if (mappedDomain.length() == 0) { %>
- <a href="./map_domain.jsp?cartridge_alias=<%=alias%>&domain=<%=mappedDomain%>" class="icon-link">
- <fmt:message key="mapdomain"/></a>
- <% } %>
- <% if (repoURL.length() > 0) { %>
- <a onclick="syncRepo('<%=alias%>');" class="icon-link">
- <fmt:message key="syncrepo"/></a>
- <% } %>
- <% if (mappedDomain.length() > 0) { %>
- <a onclick="removeDomain('<%=alias%>');" class="icon-link">
- <fmt:message key="removedomain"/></a>
- <% } %>
- <div id="<%=popupID%>" style="display: none">
- <table class="popupTable" style="width: 100%">
- <tbody>
- <tr class="tableOddRow">
- <td style="width: 40%"><fmt:message key="cartridge.display.name" /></td>
- <td><%=displayName%></td>
- </tr>
- <tr class="tableEvenRow">
- <td style="width: 40%"><fmt:message key="cartridge.version" /></td>
- <td><%=version%></td>
- </tr>
- <tr class="tableOddRow">
- <td style="width: 40%"><fmt:message key="cartridge.description" /></td>
- <td><%=description%></td>
- </tr>
- <tr class="tableEvenRow">
- <td style="width: 40%"><fmt:message key="cartridge.tenancymodel" /></td>
- <td><%=tenancyModel%></td>
- </tr>
- <tr class="tableOddRow">
- <td style="width: 40%"><fmt:message key="alias" /></td>
- <td><%=alias%></td>
- </tr>
- <tr class="tableEvenRow">
- <td style="width: 40%"><fmt:message key="status" /></td>
- <td><%=status%></td>
- </tr>
- <tr class="tableOddRow">
- <td style="width: 40%"><fmt:message key="instance.count" /></td>
- <td><%=instances%></td>
- </tr>
- <tr class="tableEvenRow">
- <td style="width: 40%"><fmt:message key="url" /></td>
- <td><%=accessURL%></td>
- </tr>
- <%
- // Assign style class according to row
- int popupRowId = 0;
- %>
- <% if (policy.length() > 0) { %>
- <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
- <td style="width: 40%"><fmt:message key="policy" /></td>
- <td><%=policy%></td>
- </tr>
- <% } %>
- <% if (repoURL.length() > 0) { %>
- <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
- <td style="width: 40%"><fmt:message key="repo.url" /></td>
- <td><%=repoURL%></td>
- </tr>
- <% } %>
- <% if (ip.length() > 0) { %>
- <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
- <td style="width: 40%"><fmt:message key="ip" /></td>
- <td><%=ip%></td>
- </tr>
- <% } %>
- <% if (dbUsername.length() > 0) { %>
- <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
- <td style="width: 40%"><fmt:message key="username" /></td>
- <td><%=dbUsername%></td>
- </tr>
- <% } %>
- <% if (password.length() > 0) { %>
- <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
- <td style="width: 40%"><fmt:message key="password" /></td>
- <td><%=password%></td>
- </tr>
- <% } %>
- <% if (mappedDomain.length() > 0) { %>
- <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
- <td style="width: 40%"><fmt:message key="mappeddomain" /></td>
- <td><%=mappedDomain%></td>
- </tr>
- <% } %>
- </tbody>
- </table>
- </div>
- </td>
- </tr>
- <%
- }
- %>
- </tbody>
- </table>
- </form>
- <p> </p>
- <carbon:paginator pageNumber="<%=pageNumberInt%>" numberOfPages="<%=numberOfPages%>" page="subscribed_cartridges.jsp"
- pageNumberParameterName="pageNumber" resourceBundle="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources" prevKey="prev"
- nextKey="next" parameters="<%=parameters%>" />
- <%
- } else {
- %>
- <b><fmt:message key="no.cartridges.found" /></b>
- <%
- }
- %>
- </div>
-</fmt:bundle>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/sync_repo_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/sync_repo_ajaxprocessor.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/sync_repo_ajaxprocessor.jsp
deleted file mode 100644
index e79444b..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/sync_repo_ajaxprocessor.jsp
+++ /dev/null
@@ -1,60 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2013, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
-<%@ page import="org.wso2.carbon.CarbonConstants"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
-<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
-<%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient"%>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
-<%@ page import="java.text.SimpleDateFormat"%>
-<%@ page import="java.util.ResourceBundle"%>
-<jsp:include page="../dialog/display_messages.jsp" />
-
-
-<%
- response.setHeader("Cache-Control", "no-cache");
-
- ResourceBundle bundle = ResourceBundle.getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
-
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext = (ConfigurationContext) config.getServletContext().getAttribute(
- CarbonConstants.CONFIGURATION_CONTEXT);
-
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- CartridgeAdminClient client;
-
- String cartridgeAlias = request.getParameter("cartridge_alias");
- try {
- client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
- client.synchronizeRepository(cartridgeAlias);
- //CarbonUIMessage.sendCarbonUIMessage("Initiated repository synchronization", CarbonUIMessage.INFO, request);
- String message = "Initiated repository synchronization";
-%>
-<span id="responseMsg"><%=message%></span>
-<%
- } catch (Exception e) {
- //CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request);
- response.setStatus(500);
-%>
-<span id="responseMsg"><%=e.getMessage()%></span>
-<%
- }
-%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/test_git_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/test_git_ajaxprocessor.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/test_git_ajaxprocessor.jsp
deleted file mode 100644
index fa4b8a0..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/test_git_ajaxprocessor.jsp
+++ /dev/null
@@ -1,71 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
-<%@ page import="org.wso2.carbon.CarbonConstants" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
-<%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.RepositoryInformation" %>
-<%@ page import="java.text.SimpleDateFormat" %>
-<%@ page import="java.util.ResourceBundle" %>
-<%@ page import="java.util.Map" %>
-<jsp:include page="../dialog/display_messages.jsp"/>
-
-
-<%
- response.setHeader("Cache-Control", "no-cache");
-
- ResourceBundle bundle = ResourceBundle
- .getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
-
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext =
- (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
-
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- CartridgeAdminClient client;
- String repoUrl = "";
- String repoUserName = "";
- String repoPassword = "";
- String repoType = null;
-
- repoUrl = request.getParameter("repo_url");
- repoUserName = request.getParameter("repo_username");
- repoPassword = request.getParameter("repo_password");
- repoType = request.getParameter("repoType");
- try{
- client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
- RepositoryInformation repositoryInformation = client.testRepositoryConnection(repoUrl, repoUserName, repoPassword, "private".equals(repoType));
- String message = "";
- if (repositoryInformation != null) {
- message = "Successfully connected to the repository: " + repositoryInformation.getRepoURL();
- }
-%>
-<span id="responseMsg"><%=message%></span>
-<%
- } catch (Exception e) {
- response.setStatus(500);
-%>
-<span id="responseMsg"><%=e.getMessage()%></span>
-<%
- }
-%>
-
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/unsubscribe_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/unsubscribe_ajaxprocessor.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/unsubscribe_ajaxprocessor.jsp
deleted file mode 100644
index c246091..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/unsubscribe_ajaxprocessor.jsp
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
-<%@ page import="org.wso2.carbon.CarbonConstants" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
- <%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge" %>
-<%@ page import="java.text.SimpleDateFormat" %>
-<%@ page import="java.util.ResourceBundle" %>
-<jsp:include page="../dialog/display_messages.jsp"/>
-
-
-<%
- response.setHeader("Cache-Control", "no-cache");
-
- ResourceBundle bundle = ResourceBundle
- .getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
-
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext =
- (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
-
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- CartridgeAdminClient client;
-
- String cartridgeAlias = request.getParameter("cartridge_alias");
-
- try{
- client= new CartridgeAdminClient(cookie, backendServerURL, configContext,request.getLocale());
- client.unsubscribe(cartridgeAlias);
- //CarbonUIMessage.sendCarbonUIMessage("Successfully unsubscribed " ,
- // CarbonUIMessage.INFO, request);
- String message = "Successfully unsubscribed";
-%>
-<span id="responseMsg"><%=message%></span>
-<%
- }catch (Exception e) {
- response.setStatus(500);
- //CarbonUIMessage uiMsg = new CarbonUIMessage(CarbonUIMessage.ERROR, e.getMessage(), e);
- //session.setAttribute(CarbonUIMessage.ID, uiMsg);
-%>
-<span id="responseMsg"><%=e.getMessage()%></span>
-<%
- }
-%>
\ No newline at end of file
[08/11] Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl.xsl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl.xsl b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl.xsl
new file mode 100644
index 0000000..bdfd057
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl.xsl
@@ -0,0 +1,702 @@
+<?xml version="1.0"?>
+<!--
+ ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ exclude-result-prefixes="wsdl xs wsoap">
+ <!--
+ Created by: Jonathan Marsh <jo...@wso2.com>
+ 23 October 2006
+ 7 November 2006 - JM: code review and cleanup + linked binding operations, added support for xs:import, wsdl:import
+ -->
+ <xsl:import href="annotated-xsd.xsl"/>
+
+ <xsl:output method="html" indent="yes" encoding="UTF-8"/>
+
+ <!--
+ Many schemas refer to the built-in schema types. In order to navigate to those types, one needs
+ to know where to load the schema for schemas, hopefully a local version with this stylesheet
+ applied so the user can continue to navigate.
+ -->
+ <xsl:param name="xsd-schema-location" select="'/service-mgt/styles/XMLSchema.xsd'"/>
+
+ <!-- QName resolving functions require the targetNamespace, so stuff it in a global variable. -->
+ <xsl:variable name="targetNamespace" select="wsdl:definitions/@targetNamespace"/>
+ <xsl:variable name="schemaTargetNamespace"
+ select="wsdl:definitions/wsdl:types/xs:schema/@targetNamespace"/>
+
+ <!-- Mozilla doesn't support the namespace axis, which makes simulating namespace declarations
+ problematic. At least we can try alternate reconstruction methods if we know the functionality
+ isn't there. -->
+ <xsl:variable name="supports-namespace-axis" select="count(/*/namespace::*) > 0"/>
+
+ <!-- === Main ========================================
+ Main template for the wsdl document
+ -->
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title>WSDL 1.1 for
+ <xsl:value-of select="wsdl:definitions/@targetNamespace"/>
+ </title>
+ <style type="text/css">
+ <xsl:call-template name="css"/>
+ <![CDATA[
+.annotation-area {width:19em}
+.schema-block {background-color:#EEE;}
+.schema {padding-left:7em; text-indent:-5em}
+.schema-top-level {padding-left: 8em; text-indent:-5em}
+.wsdl-top-level {padding-left: 6em; text-indent:-5em}
+.wsdl-second-level {padding-left: 7em; text-indent:-5em}
+.wsdl-message {padding-left: 6em; text-indent:-5em}
+
+.definitions {padding-left:5em; margin-bottom:1em; text-indent:-5em}
+.operation {background-color:rgb(215,206,221); text-align:right; border: 1px dashed black; padding:.5em}
+.message {background-color:rgb(240,206,206); text-align:right; border: 1px dashed black; padding:.5em}
+.portType {background-color:rgb(185,218,192); text-align:right; border: 1px dashed black; padding:.5em}
+.binding {background-color:rgb(218,208,185); text-align:right; border: 1px dashed black; padding:.5em}
+.service {background-color:rgb(240,197,166); text-align:right; border: 1px dashed black; padding:.5em}
+]]>
+ </style>
+ </head>
+ <body>
+ <xsl:apply-templates select="wsdl:definitions"/>
+ <p/>
+ <hr/>
+ <table cellpadding="0" cellspacing="0" id="index">
+ <xsl:if test="wsdl:definitions/wsdl:types/xs:schema">
+ <xsl:for-each select="wsdl:definitions/wsdl:types">
+ <xsl:call-template name="generate-xsd-index"/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:call-template name="generate-wsdl-index"/>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+ <!-- === Elements ========================================
+ The following templates format elements of various flavors
+ (xs:schema, children of xs:schema, grandchildren etc. of schema, and extension elements
+ -->
+ <xsl:template match="wsdl:definitions">
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="annotation-area">
+ <div class="sidebar">
+ <xsl:call-template name="index-reference"/>
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <div class="definitions">
+ <xsl:call-template name="element-start"/>
+ </div>
+ </td>
+ </tr>
+ <xsl:apply-templates/>
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="source-area">
+ <div class="definitions">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+ <xsl:template match="wsdl:definitions/wsdl:*">
+ <xsl:variable name="identifier">
+ <xsl:if test="@name">
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="@name"/>
+ </xsl:if>
+ </xsl:variable>
+ <tr>
+ <xsl:choose>
+ <xsl:when
+ test="not(self::wsdl:documentation or self::wsdl:import or self::wsdl:include)">
+ <td class="annotation-area">
+ <div class="sidebar {local-name()} sidebar-title">
+ <xsl:if test="$identifier">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$identifier"/>
+ </xsl:attribute>
+ </xsl:if>
+ <span class="sidebar-title-highlight">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:call-template name="wsdl-referenced-by"/>
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td colspan="2" class="annotation-area"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="source-area">
+ <div>
+ <xsl:choose>
+ <xsl:when test="self::wsdl:message">
+ <xsl:attribute name="class">wsdl-message</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">wsdl-top-level</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="element-start"/>
+ </div>
+ <div class="wsdl-top-level">
+ <xsl:apply-templates/>
+ </div>
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="wsdl:definitions/wsdl:portType">
+ <tr>
+ <td class="annotation-area">
+ <div class="sidebar portType sidebar-title">
+ <a name="_portType_{@name}"></a>
+ <span class="sidebar-title-highlight">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:call-template name="wsdl-referenced-by"/>
+ <xsl:call-template name="interface-defines"/>
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-start"/>
+ <xsl:apply-templates select="wsdl:documentation"/>
+ </div>
+ </td>
+ </tr>
+ <xsl:apply-templates select="node()[not(self::wsdl:documentation)]"/>
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="source-area">
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="wsdl:portType/wsdl:operation">
+ <tr>
+ <td class="annotation-area">
+ <div class="sidebar operation sidebar-title">
+ <a name="_operation_{@name}"></a>
+ <span class="sidebar-title-highlight">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:call-template name="wsdl-referenced-by"/>
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <div class="wsdl-second-level">
+ <xsl:call-template name="element-start"/>
+ </div>
+ <div class="wsdl-second-level">
+ <xsl:apply-templates/>
+ </div>
+ <div class="wsdl-second-level">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="wsdl:definitions/wsdl:types">
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="source-area">
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-start"/>
+ </div>
+ </td>
+ </tr>
+ <xsl:apply-templates/>
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="source-area">
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="xs:schema">
+ <tr>
+ <td colspan="2" class="schema-block annotation-area"/>
+ <td class="schema-block source-area">
+ <div class="schema">
+ <xsl:call-template name="element-start"/>
+ </div>
+ </td>
+ </tr>
+ <xsl:apply-templates/>
+ <tr>
+ <td colspan="2" class="schema-block annotation-area"/>
+ <td class="schema-block source-area">
+ <div class="schema">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="xs:*">
+ <xsl:apply-imports/>
+ </xsl:template>
+ <xsl:template match="wsdl:* | wsoap:*">
+ <div class="indent">
+ <div>
+ <xsl:call-template name="element-start"/>
+ </div>
+ <xsl:apply-templates/>
+ <div>
+ <xsl:call-template name="element-end"/>
+ </div>
+ </div>
+ </xsl:template>
+
+ <!-- === Attributes =========================================
+ The following templates format attributes of various flavors
+ -->
+ <xsl:template match="wsdl:*/@id">
+ <a name="{@id}"/>
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:binding/wsdl:operation/@name" priority="1">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-wsdl-reference"/>
+ <xsl:text>#_operation_</xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:*/@name">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:part/@element">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-schema-reference"/>
+ <xsl:text>#_</xsl:text>
+ <xsl:value-of select="name()"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="substring-after(.,':')"/>
+ </xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template
+ match="wsdl:input/@message | wsdl:output/@message | wsdl:port/@binding | wsdl:binding/@type">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-wsdl-reference"/>
+ <xsl:text>#_</xsl:text>
+ <xsl:choose>
+ <xsl:when test="name() = 'type'">portType</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="name()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="substring-after(.,':')"/>
+ </xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:*/@id">
+ <a name="{@id}"/>
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:*/@* | wsoap:*/@*" priority="0">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- === Comments ========================================
+ The following template formats comment nodes
+ -->
+ <xsl:template match="wsdl:definitions/comment()">
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="schema-top-level source-area">
+ <div class="markup-comment">
+ <xsl:text><!--</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>--></xsl:text>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="wsdl:portType/comment()">
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="wsdl-second-level source-area">
+ <div class="markup-comment">
+ <xsl:text><!--</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>--></xsl:text>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <!-- === Library templates ========================================
+ Library of useful named templates
+ -->
+ <xsl:template name="insert-wsdl-reference">
+ <xsl:if test="parent::wsdl:operation">
+ <a href="#_operation_{../@name}">
+ <xsl:value-of select="../@name"/>
+ </a>
+ <xsl:text>operation of the</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="ancestor-or-self::*[last() - 1]">
+ <a href="#_{local-name(.)}_{@name}">
+ <xsl:value-of select="@name"/>
+ </a>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="wsdl-referenced-by">
+ <xsl:variable name="target" select="@name"/>
+ <xsl:if test="parent::wsdl:definitions">
+ <div class="sidebar-text">
+ <xsl:variable name="extended-by" select="//wsdl:*[substring-after(@element | @message | @binding
+ | @type,':') = $target]"/>
+ <xsl:if test="count($extended-by) > 0">
+ <div class="referenced-list">Referenced by:</div>
+ <ul>
+ <xsl:for-each select="$extended-by">
+ <xsl:sort select="@element | @message | @binding | @type"/>
+ <li class="referenced-item">
+ <xsl:call-template name="insert-wsdl-reference"/>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="interface-defines">
+ <xsl:variable name="target" select="@name"/>
+ <div class="sidebar-text">
+ <xsl:if test="wsdl:operation">
+ <div class="referenced-list">Defines operations:</div>
+ <ul>
+ <xsl:for-each select="wsdl:operation">
+ <xsl:sort select="@name"/>
+ <li class="referenced-item">
+ <a href="#_operation_{@name}">
+ <xsl:value-of select="@name"/>
+ </a>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </div>
+ </xsl:template>
+ <xsl:template name="additional-references">
+ <xsl:param name="target"/>
+ <xsl:variable name="referenced-by"
+ select="/wsdl:definitions/wsdl:message/wsdl:part[substring-after(@element,':') = $target]"/>
+ <xsl:if test="count($referenced-by) > 0">
+ <div class="referenced-list">Referenced from WSDL by:</div>
+ <ul>
+ <xsl:for-each select="$referenced-by">
+ <xsl:sort select="@element"/>
+ <li class="referenced-item">
+ <xsl:call-template name="insert-wsdl-reference"/>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="external-wsdl-reference">
+ <xsl:choose>
+ <xsl:when test="$supports-namespace-axis">
+ <xsl:if test="not(../namespace::*[. = $targetNamespace and name(.) =
+ substring-before(current(),':')])">
+ <xsl:variable name="prefix" select="substring-before(.,':')"/>
+ <xsl:variable name="uri" select="../namespace::*[name(.) = $prefix]"/>
+ <xsl:value-of
+ select="/wsdl:definitions/wsdl:import[@namespace=$uri]/@location"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
+ test="substring-before(current(),':')= 'xs' or substring-before(current(),':')= 'xsd'">
+ <xsl:value-of select="$xsd-schema-location"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- the link is broken - Bad Mozilla -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="external-schema-reference">
+ <xsl:choose>
+ <xsl:when test="$supports-namespace-axis">
+ <xsl:if test="not(../namespace::*[. = $schemaTargetNamespace and name(.) =
+ substring-before(current(),':')])">
+ <xsl:variable name="prefix" select="substring-before(.,':')"/>
+ <xsl:variable name="uri" select="../namespace::*[name(.) = $prefix]"/>
+ <xsl:choose>
+ <xsl:when test="$uri = 'http://www.w3.org/2001/XMLSchema'">
+ <xsl:value-of select="$xsd-schema-location"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
+ select="/wsdl:definitions/wsdl:types/xs:schema/xs:import[@namespace=$uri]/@schemaLocation"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
+ test="substring-before(current(),':')= 'xs' or substring-before(current(),':')= 'xsd'">
+ <xsl:value-of select="$xsd-schema-location"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- the link is broken - Bad Mozilla -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="generate-wsdl-index">
+ <xsl:if test="wsdl:definitions/wsdl:message">
+ <tr>
+ <td id="message-list" class="annotation-area">
+ <div class="message sidebar sidebar-title-highlight">Index of messages</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="wsdl:definitions/wsdl:message">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="wsdl:definitions/wsdl:portType">
+ <tr>
+ <td id="portType-list" class="annotation-area">
+ <div class="portType sidebar sidebar-title-highlight">Index of portTypes</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="wsdl:definitions/wsdl:portType">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="wsdl:definitions/wsdl:portType/wsdl:operation">
+ <tr>
+ <td id="operation-list" class="annotation-area">
+ <div class="operation sidebar sidebar-title-highlight">Index of operations</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="wsdl:definitions/wsdl:portType/wsdl:operation">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="wsdl:definitions/wsdl:binding">
+ <tr>
+ <td id="binding-list" class="annotation-area">
+ <div class="binding sidebar sidebar-title-highlight">Index of bindings</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="wsdl:definitions/wsdl:binding">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="wsdl:definitions/wsdl:service">
+ <tr>
+ <td id="service-list" class="annotation-area">
+ <div class="service sidebar sidebar-title-highlight">Index of services</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="wsdl:definitions/wsdl:service">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="index-reference">
+ <div class="note sidebar-text">See the
+ <a href="#index">index</a>
+ of
+ <xsl:variable name="ss1">
+ <xsl:if test="wsdl:types/xs:schema/xs:complexType">
+ <a href="#complexType-list">complexTypes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss2">
+ <xsl:copy-of select="$ss1"/>
+ <xsl:if test="wsdl:types/xs:schema/xs:simpleType">
+ <xsl:if test="$ss1!=''">,</xsl:if>
+ <a href="#simpleType-list">simpleTypes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss3">
+ <xsl:copy-of select="$ss2"/>
+ <xsl:if test="wsdl:types/xs:schema/xs:element">
+ <xsl:if test="$ss2!=''">,</xsl:if>
+ <a href="#global-element-list">global elements</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss4">
+ <xsl:copy-of select="$ss3"/>
+ <xsl:if test="wsdl:types/xs:schema/*//xs:element[@name]">
+ <xsl:if test="$ss3!=''">,</xsl:if>
+ <a href="#local-element-list">local elements</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss5">
+ <xsl:copy-of select="$ss4"/>
+ <xsl:if test="wsdl:types/xs:schema/xs:attribute">
+ <xsl:if test="$ss4!=''">,</xsl:if>
+ <a href="#global-attribute-list">global attributes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss6">
+ <xsl:copy-of select="$ss5"/>
+ <xsl:if test="wsdl:types/xs:schema/*//xs:attribute[@name]">
+ <xsl:if test="$ss5!=''">,</xsl:if>
+ <a href="#local-attribute-list">local attributes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss7">
+ <xsl:copy-of select="$ss6"/>
+ <xsl:if test="wsdl:types/xs:schema/xs:group">
+ <xsl:if test="$ss6!=''">,</xsl:if>
+ <a href="#model-group-list">model groups</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss8">
+ <xsl:copy-of select="$ss7"/>
+ <xsl:if test="wsdl:types/xs:schema/xs:attributeGroup">
+ <xsl:if test="$ss7!=''">,</xsl:if>
+ <a href="#attributeGroup-list">attribute groups</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss9">
+ <xsl:copy-of select="$ss8"/>
+ <xsl:if test="wsdl:message">
+ <xsl:if test="$ss8!=''">,</xsl:if>
+ <a href="#message-list">messages</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss10">
+ <xsl:copy-of select="$ss9"/>
+ <xsl:if test="wsdl:portType">
+ <xsl:if test="$ss9!=''">,</xsl:if>
+ <a href="#portType-list">portTypes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss11">
+ <xsl:copy-of select="$ss10"/>
+ <xsl:if test="wsdl:portType/wsdl:operation">
+ <xsl:if test="$ss10!=''">,</xsl:if>
+ <a href="#operation-list">operations</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss12">
+ <xsl:copy-of select="$ss11"/>
+ <xsl:if test="wsdl:binding">
+ <xsl:if test="$ss11!=''">,</xsl:if>
+ <a href="#binding-list">bindings</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss13">
+ <xsl:copy-of select="$ss12"/>
+ <xsl:if test="wsdl:service">
+ <xsl:if test="$ss12!=''">,</xsl:if>
+ <a href="#service-list">services</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:copy-of select="$ss13"/>
+ <xsl:text>defined in this wsdl</xsl:text>
+ </div>
+ </xsl:template>
+</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl2.xsl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl2.xsl b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl2.xsl
new file mode 100644
index 0000000..cdb07fd
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl2.xsl
@@ -0,0 +1,721 @@
+<?xml version="1.0"?>
+<!--
+ ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:wsdl="http://www.w3.org/ns/wsdl"
+ xmlns:wsoap="http://www.w3.org/ns/wsdl/soap"
+ xmlns:whttp="http://www.w3.org/ns/wsdl/http"
+ xmlns:wrpc="http://www.w3.org/ns/wsdl/rpc"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ exclude-result-prefixes="wsdl xs wsoap">
+ <!--
+ Created by: Jonathan Marsh <jo...@wso2.com>
+ 8 November 2006
+ -->
+ <xsl:import href="annotated-xsd.xsl"/>
+
+ <xsl:output method="html" indent="yes" encoding="UTF-8"/>
+
+ <!--
+ Many schemas refer to the built-in schema types. In order to navigate to those types, one needs
+ to know where to load the schema for schemas, hopefully a local version with this stylesheet
+ applied so the user can continue to navigate.
+ -->
+ <xsl:param name="xsd-schema-location" select="'/service-mgt/styles/XMLSchema.xsd'"/>
+
+ <!-- QName resolving functions require the targetNamespace, so stuff it in a global variable. -->
+ <xsl:variable name="targetNamespace" select="wsdl:description/@targetNamespace"/>
+ <xsl:variable name="schemaTargetNamespace"
+ select="wsdl:description/wsdl:types/xs:schema/@targetNamespace"/>
+
+ <!-- Mozilla doesn't support the namespace axis, which makes simulating namespace declarations
+ problematic. At least we can try alternate reconstruction methods if we know the functionality
+ isn't there. -->
+ <xsl:variable name="supports-namespace-axis" select="count(/*/namespace::*) > 0"/>
+
+ <!-- === Main ========================================
+ Main template for the wsdl document
+ -->
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title>WSDL 2.0 for
+ <xsl:value-of select="wsdl:description/@targetNamespace"/>
+ </title>
+ <style type="text/css">
+ <xsl:call-template name="css"/>
+ <![CDATA[
+.annotation-area {width:19em}
+.schema-block {background-color:#EEE;}
+.schema {padding-left:7em; text-indent:-5em}
+.schema-top-level {padding-left: 8em; text-indent:-5em}
+.wsdl-top-level {padding-left: 6em; text-indent:-5em}
+.wsdl-second-level {padding-left: 7em; text-indent:-5em}
+.wsdl-message {padding-left: 6em; text-indent:-5em}
+
+.description {padding-left:5em; margin-bottom:1em; text-indent:-5em}
+.operation {background-color:rgb(215,206,221); text-align:right; border: 1px dashed black; padding:.5em}
+.fault {background-color:rgb(240,206,206); text-align:right; border: 1px dashed black; padding:.5em}
+.interface {background-color:rgb(185,218,192); text-align:right; border: 1px dashed black; padding:.5em}
+.binding {background-color:rgb(218,208,185); text-align:right; border: 1px dashed black; padding:.5em}
+.service {background-color:rgb(240,197,166); text-align:right; border: 1px dashed black; padding:.5em}
+]]>
+ </style>
+ </head>
+ <body>
+ <xsl:apply-templates select="wsdl:description"/>
+ <p/>
+ <hr/>
+ <table cellpadding="0" cellspacing="0" id="index">
+ <xsl:if test="wsdl:description/wsdl:types/xs:schema">
+ <xsl:for-each select="wsdl:description/wsdl:types">
+ <xsl:call-template name="generate-xsd-index"/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:call-template name="generate-wsdl-index"/>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+ <!-- === Elements ========================================
+ The following templates format elements of various flavors
+ (wsdl:description, children of wsdl:description, grandchildren etc. of wsdl:description,
+ and extension elements
+ -->
+ <xsl:template match="wsdl:description">
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="annotation-area">
+ <div class="sidebar">
+ <xsl:call-template name="index-reference"/>
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <div class="description">
+ <xsl:call-template name="element-start"/>
+ </div>
+ </td>
+ </tr>
+ <xsl:apply-templates/>
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="source-area">
+ <div class="description">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+ <xsl:template match="wsdl:description/wsdl:*">
+ <xsl:variable name="identifier">
+ <xsl:if test="@name">
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="@name"/>
+ </xsl:if>
+ </xsl:variable>
+ <tr>
+ <xsl:choose>
+ <xsl:when
+ test="not(self::wsdl:documentation or self::wsdl:import or self::wsdl:include)">
+ <td class="annotation-area">
+ <div class="sidebar {local-name()} sidebar-title">
+ <xsl:if test="$identifier">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$identifier"/>
+ </xsl:attribute>
+ </xsl:if>
+ <span class="sidebar-title-highlight">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:call-template name="wsdl-referenced-by"/>
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td colspan="2" class="annotation-area"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="source-area">
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-start"/>
+ </div>
+ <div class="wsdl-top-level">
+ <xsl:apply-templates/>
+ </div>
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="wsdl:description/wsdl:interface">
+ <tr>
+ <td class="annotation-area">
+ <div class="sidebar interface sidebar-title">
+ <a name="_interface_{@name}"></a>
+ <span class="sidebar-title-highlight">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:call-template name="wsdl-referenced-by"/>
+ <xsl:call-template name="interface-defines"/>
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-start"/>
+ <xsl:apply-templates select="wsdl:documentation"/>
+ </div>
+ </td>
+ </tr>
+ <xsl:apply-templates select="node()[not(self::wsdl:documentation)]"/>
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="source-area">
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="wsdl:interface/wsdl:operation | wsdl:interface/wsdl:fault">
+ <tr>
+ <td class="annotation-area">
+ <div class="sidebar {local-name()} sidebar-title">
+ <a name="_{local-name()}_{@name}"></a>
+ <span class="sidebar-title-highlight">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:call-template name="wsdl-referenced-by"/>
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <div class="wsdl-second-level">
+ <xsl:call-template name="element-start"/>
+ </div>
+ <div class="wsdl-second-level">
+ <xsl:apply-templates/>
+ </div>
+ <div class="wsdl-second-level">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="wsdl:description/wsdl:types">
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="source-area">
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-start"/>
+ </div>
+ </td>
+ </tr>
+ <xsl:apply-templates/>
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="source-area">
+ <div class="wsdl-top-level">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="xs:schema | xs:import">
+ <tr>
+ <td colspan="2" class="schema-block annotation-area"/>
+ <td class="schema-block source-area">
+ <div class="schema">
+ <xsl:call-template name="element-start"/>
+ </div>
+ </td>
+ </tr>
+ <xsl:apply-templates/>
+ <tr>
+ <td colspan="2" class="schema-block annotation-area"/>
+ <td class="schema-block source-area">
+ <div class="schema">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="xs:*">
+ <xsl:apply-imports/>
+ </xsl:template>
+ <xsl:template match="wsdl:* | wsoap:* | whttp:*">
+ <div class="indent">
+ <div>
+ <xsl:call-template name="element-start"/>
+ </div>
+ <xsl:apply-templates/>
+ <div>
+ <xsl:call-template name="element-end"/>
+ </div>
+ </div>
+ </xsl:template>
+
+ <!-- === Attributes =========================================
+ The following templates format attributes of various flavors
+ -->
+ <xsl:template match="wsdl:binding/wsdl:operation/@name | wsdl:binding/wsdl:fault/@name"
+ priority="1">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-wsdl-reference"/>
+ <xsl:text>#_</xsl:text>
+ <xsl:value-of select="local-name(parent::*)"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:*/@name">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template
+ match="wsdl:input/@element[not(contains(.,'#'))] | wsdl:output/@element[not(contains(.,'#'))] | wsdl:fault/@element[not(contains(.,'#'))]">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-schema-reference"/>
+ <xsl:text>#_</xsl:text>
+ <xsl:value-of select="name()"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="substring-after(.,':')"/>
+ </xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:infault/@ref | wsdl:outfault/@ref |wsdl:fault/@ref">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-schema-reference"/>
+ <xsl:text>#_fault_</xsl:text>
+ <xsl:value-of select="substring-after(.,':')"/>
+ </xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:operation/@ref">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-schema-reference"/>
+ <xsl:text>#_operation_</xsl:text>
+ <xsl:value-of select="substring-after(.,':')"/>
+ </xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:service/@interface | wsdl:interface/@extends">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-schema-reference"/>
+ <xsl:text>#_interface_</xsl:text>
+ <xsl:value-of select="substring-after(.,':')"/>
+ </xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:endpoint/@binding">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-schema-reference"/>
+ <xsl:text>#_binding_</xsl:text>
+ <xsl:value-of select="substring-after(.,':')"/>
+ </xsl:with-param>
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="wsdl:*/@* | wsoap:*/@* | whttp:*/@*" priority="0">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="native-attribute" select="true()"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- === Comments ========================================
+ The following template formats comment nodes
+ -->
+ <xsl:template match="wsdl:description/comment()">
+ <tr>
+ <td colspan="2" class="annotation-area"/>
+ <td class="source-area">
+ <div class="schema-top-level markup-comment">
+ <xsl:text><!--</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>--></xsl:text>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="wsdl:interface/comment()">
+ <div class="markup-comment double-indent">
+ <xsl:text><!--</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>--></xsl:text>
+ </div>
+ </xsl:template>
+
+ <!-- === Library templates ========================================
+ Library of useful named templates
+ -->
+ <xsl:template name="insert-wsdl-reference">
+ <xsl:if test="parent::wsdl:operation">
+ <a href="#_operation_{../@name}">
+ <xsl:value-of select="../@name"/>
+ </a>
+ <xsl:text>operation of the</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="ancestor-or-self::*[last() - 1]">
+ <a href="#_{local-name(.)}_{@name}">
+ <xsl:value-of select="@name"/>
+ </a>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="wsdl-referenced-by">
+ <xsl:variable name="target" select="@name"/>
+ <xsl:if test="parent::wsdl:description">
+ <div class="sidebar-text">
+ <xsl:variable name="extended-by" select="//wsdl:*[substring-after(@element | @binding
+ | @interface,':') = $target]"/>
+ <xsl:if test="count($extended-by) > 0">
+ <div class="referenced-list">Referenced by:</div>
+ <ul>
+ <xsl:for-each select="$extended-by">
+ <xsl:sort select="@element | @binding | @interface"/>
+ <li class="referenced-item">
+ <xsl:call-template name="insert-wsdl-reference"/>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="interface-defines">
+ <xsl:variable name="target" select="@name"/>
+ <div class="sidebar-text">
+ <xsl:if test="wsdl:fault">
+ <div class="referenced-list">Defines faults:</div>
+ <ul>
+ <xsl:for-each select="wsdl:fault">
+ <xsl:sort select="@name"/>
+ <li class="referenced-item">
+ <a href="#_fault_{@name}">
+ <xsl:value-of select="@name"/>
+ </a>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ <xsl:if test="wsdl:operation">
+ <div class="referenced-list">Defines operations:</div>
+ <ul>
+ <xsl:for-each select="wsdl:operation">
+ <xsl:sort select="@name"/>
+ <li class="referenced-item">
+ <a href="#_operation_{@name}">
+ <xsl:value-of select="@name"/>
+ </a>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </div>
+ </xsl:template>
+ <xsl:template name="additional-references">
+ <xsl:param name="target"/>
+ <xsl:variable name="referenced-by"
+ select="/wsdl:description/wsdl:interface/wsdl:operation/wsdl:*[substring-after(@element,':') = $target]"/>
+ <xsl:if test="count($referenced-by) > 0">
+ <div class="referenced-list">Referenced from WSDL by:</div>
+ <ul>
+ <xsl:for-each select="$referenced-by">
+ <xsl:sort select="@element"/>
+ <li class="referenced-item">
+ <xsl:call-template name="insert-wsdl-reference"/>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="external-wsdl-reference">
+ <xsl:choose>
+ <xsl:when test="$supports-namespace-axis">
+ <xsl:if test="not(../namespace::*[. = $targetNamespace and name(.) =
+ substring-before(current(),':')])">
+ <xsl:variable name="prefix" select="substring-before(.,':')"/>
+ <xsl:variable name="uri" select="../namespace::*[name(.) = $prefix]"/>
+ <xsl:value-of
+ select="/wsdl:description/wsdl:import[@namespace=$uri]/@location"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
+ test="substring-before(current(),':')= 'xs' or substring-before(current(),':')= 'xsd'">
+ <xsl:value-of select="$xsd-schema-location"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- the link is broken - Bad Mozilla -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="external-schema-reference">
+ <xsl:choose>
+ <xsl:when test="$supports-namespace-axis">
+ <xsl:if test="not(../namespace::*[. = $schemaTargetNamespace and name(.) =
+ substring-before(current(),':')])">
+ <xsl:variable name="prefix" select="substring-before(.,':')"/>
+ <xsl:variable name="uri" select="../namespace::*[name(.) = $prefix]"/>
+ <xsl:choose>
+ <xsl:when test="$uri = 'http://www.w3.org/2001/XMLSchema'">
+ <xsl:value-of select="$xsd-schema-location"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
+ select="/wsdl:description/wsdl:types/xs:import[@namespace=$uri]/@schemaLocation"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
+ test="substring-before(current(),':')= 'xs' or substring-before(current(),':')= 'xsd'">
+ <xsl:value-of select="$xsd-schema-location"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- the link is broken - Bad Mozilla -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="generate-wsdl-index">
+ <xsl:if test="wsdl:description/wsdl:interface">
+ <tr>
+ <td id="interface-list" class="annotation-area">
+ <div class="interface sidebar sidebar-title-highlight">Index of interfaces</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="wsdl:description/wsdl:interface">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="wsdl:description/wsdl:interface/wsdl:fault">
+ <tr>
+ <td id="fault-list" class="annotation-area">
+ <div class="fault sidebar sidebar-title-highlight">Index of faults</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="wsdl:description/wsdl:interface/wsdl:fault">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="wsdl:description/wsdl:interface/wsdl:operation">
+ <tr>
+ <td id="operation-list" class="annotation-area">
+ <div class="operation sidebar sidebar-title-highlight">Index of operations</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="wsdl:description/wsdl:interface/wsdl:operation">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="wsdl:description/wsdl:binding">
+ <tr>
+ <td id="binding-list" class="annotation-area">
+ <div class="binding sidebar sidebar-title-highlight">Index of bindings</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="wsdl:description/wsdl:binding">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="wsdl:description/wsdl:service">
+ <tr>
+ <td id="service-list" class="annotation-area">
+ <div class="service sidebar sidebar-title-highlight">Index of services</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="wsdl:description/wsdl:service">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="index-reference">
+ <div class="note sidebar-text">See the
+ <a href="#index">index</a>
+ of
+ <xsl:variable name="ss1">
+ <xsl:if test="wsdl:types/xs:schema/xs:complexType">
+ <a href="#complexType-list">complexTypes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss2">
+ <xsl:copy-of select="$ss1"/>
+ <xsl:if test="wsdl:types/xs:schema/xs:simpleType">
+ <xsl:if test="$ss1!=''">,</xsl:if>
+ <a href="#simpleType-list">simpleTypes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss3">
+ <xsl:copy-of select="$ss2"/>
+ <xsl:if test="wsdl:types/xs:schema/xs:element">
+ <xsl:if test="$ss2!=''">,</xsl:if>
+ <a href="#global-element-list">global elements</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss4">
+ <xsl:copy-of select="$ss3"/>
+ <xsl:if test="wsdl:types/xs:schema/*//xs:element[@name]">
+ <xsl:if test="$ss3!=''">,</xsl:if>
+ <a href="#local-element-list">local elements</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss5">
+ <xsl:copy-of select="$ss4"/>
+ <xsl:if test="wsdl:types/xs:schema/xs:attribute">
+ <xsl:if test="$ss4!=''">,</xsl:if>
+ <a href="#global-attribute-list">global attributes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss6">
+ <xsl:copy-of select="$ss5"/>
+ <xsl:if test="wsdl:types/xs:schema/*//xs:attribute[@name]">
+ <xsl:if test="$ss5!=''">,</xsl:if>
+ <a href="#local-attribute-list">local attributes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss7">
+ <xsl:copy-of select="$ss6"/>
+ <xsl:if test="wsdl:types/xs:schema/xs:group">
+ <xsl:if test="$ss6!=''">,</xsl:if>
+ <a href="#model-group-list">model groups</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss8">
+ <xsl:copy-of select="$ss7"/>
+ <xsl:if test="wsdl:types/xs:schema/xs:attributeGroup">
+ <xsl:if test="$ss7!=''">,</xsl:if>
+ <a href="#attributeGroup-list">attribute groups</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss9">
+ <xsl:copy-of select="$ss8"/>
+ <xsl:if test="wsdl:interface">
+ <xsl:if test="$ss8!=''">,</xsl:if>
+ <a href="#interface-list">interfaces</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss10">
+ <xsl:copy-of select="$ss9"/>
+ <xsl:if test="wsdl:interface/wsdl:fault">
+ <xsl:if test="$ss9!=''">,</xsl:if>
+ <a href="#fault-list">faults</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss11">
+ <xsl:copy-of select="$ss10"/>
+ <xsl:if test="wsdl:interface/wsdl:operation">
+ <xsl:if test="$ss10!=''">,</xsl:if>
+ <a href="#operation-list">operations</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss12">
+ <xsl:copy-of select="$ss11"/>
+ <xsl:if test="wsdl:binding">
+ <xsl:if test="$ss11!=''">,</xsl:if>
+ <a href="#binding-list">bindings</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss13">
+ <xsl:copy-of select="$ss12"/>
+ <xsl:if test="wsdl:service">
+ <xsl:if test="$ss12!=''">,</xsl:if>
+ <a href="#service-list">services</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:copy-of select="$ss13"/>
+ <xsl:text>defined in this wsdl</xsl:text>
+ </div>
+ </xsl:template>
+</xsl:stylesheet>
[09/11] Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/XMLSchema.xsd
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/XMLSchema.xsd b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/XMLSchema.xsd
new file mode 100644
index 0000000..9c851a5
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/XMLSchema.xsd
@@ -0,0 +1,2383 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="annotated-xsd.xsl"?>
+<!--
+ ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<!-- XML Schema schema for XML Schemas: Part 1: Structures -->
+<!-- Note this schema is NOT the normative structures schema. -->
+<!-- The prose copy in the structures REC is the normative -->
+<!-- version (which shouldn't differ from this one except for -->
+<!-- this comment and entity expansions, but just in case -->
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
+ <!-- provide ID type information even for parsers which only read the
+ internal subset -->
+ <!ATTLIST xs:schema
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:complexType
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:complexContent
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:simpleContent
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:extension
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:element
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:group
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:all
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:choice
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:sequence
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:any
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:anyAttribute
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:attribute
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:attributeGroup
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:unique
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:key
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:keyref
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:selector
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:field
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:include
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:import
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:redefine
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:notation
+ id ID #IMPLIED
+ >
+ <!--
+ keep this schema XML1.0 DTD valid
+ -->
+ <!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>
+ <!ELEMENT hfp:hasFacet EMPTY>
+ <!ATTLIST hfp:hasFacet
+ name NMTOKEN #REQUIRED
+ >
+ <!ELEMENT hfp:hasProperty EMPTY>
+ <!ATTLIST hfp:hasProperty
+ name NMTOKEN #REQUIRED
+ value CDATA #REQUIRED
+ >
+ <!--
+ Make sure that processors that do not read the external
+ subset will know about the various IDs we declare
+ -->
+ <!ATTLIST xs:simpleType
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:maxExclusive
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:minExclusive
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:maxInclusive
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:minInclusive
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:totalDigits
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:fractionDigits
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:length
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:minLength
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:maxLength
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:enumeration
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:pattern
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:appinfo
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:documentation
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:list
+ id ID #IMPLIED
+ >
+ <!ATTLIST xs:union
+ id ID #IMPLIED
+ >
+ ]>
+<xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all"
+ elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
+ <xs:annotation>
+ <xs:documentation>
+ Part 1 version: Id: XMLSchema.xsd,v 1.53 2003/02/24 17:40:07 ht Exp
+ Part 2 version: Id: datatypes.xsd,v 1.60 2003/04/05 11:02:30 ht Exp
+ </xs:documentation>
+ </xs:annotation>
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/XML/Group/2002/09/xmlschema-1/structures-with-errata.html">
+ The schema corresponding to this document is normative,
+ with respect to the syntactic constraints it expresses in the
+ XML Schema language. The documentation (within <documentation> elements)
+ below, is not normative, but rather highlights important aspects of
+ the W3C Recommendation of which this is a part
+ </xs:documentation>
+ </xs:annotation>
+ <xs:annotation>
+ <xs:documentation>
+ The simpleType element and all of its members are defined
+ towards the end of this schema document
+ </xs:documentation>
+ </xs:annotation>
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd">
+ <xs:annotation>
+ <xs:documentation>
+ Get access to the xml: attribute groups for xml:lang
+ as declared on 'schema' and 'documentation' below
+ </xs:documentation>
+ </xs:annotation>
+ </xs:import>
+ <xs:complexType name="openAttrs">
+ <xs:annotation>
+ <xs:documentation>
+ This type is extended by almost all schema types
+ to allow attributes from other namespaces to be
+ added to user schemas.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:restriction base="xs:anyType">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="annotated">
+ <xs:annotation>
+ <xs:documentation>
+ This type is extended by all types which allow annotation
+ other than <schema> itself
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="xs:openAttrs">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:ID"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:group name="schemaTop">
+ <xs:annotation>
+ <xs:documentation>
+ This group is for the
+ elements which occur freely at the top level of schemas.
+ All of their types are based on the "annotated" type by extension.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:choice>
+ <xs:group ref="xs:redefinable"/>
+ <xs:element ref="xs:element"/>
+ <xs:element ref="xs:attribute"/>
+ <xs:element ref="xs:notation"/>
+ </xs:choice>
+ </xs:group>
+ <xs:group name="redefinable">
+ <xs:annotation>
+ <xs:documentation>
+ This group is for the
+ elements which can self-redefine (see <redefine> below).
+ </xs:documentation>
+ </xs:annotation>
+ <xs:choice>
+ <xs:element ref="xs:simpleType"/>
+ <xs:element ref="xs:complexType"/>
+ <xs:element ref="xs:group"/>
+ <xs:element ref="xs:attributeGroup"/>
+ </xs:choice>
+ </xs:group>
+ <xs:simpleType name="formChoice">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="qualified"/>
+ <xs:enumeration value="unqualified"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="reducedDerivationControl">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:derivationControl">
+ <xs:enumeration value="extension"/>
+ <xs:enumeration value="restriction"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="derivationSet">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use
+ </xs:documentation>
+ <xs:documentation>
+ #all or (possibly empty) subset of {extension, restriction}
+ </xs:documentation>
+ </xs:annotation>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="#all"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:list itemType="xs:reducedDerivationControl"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ <xs:element name="schema" id="schema">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:openAttrs">
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="xs:include"/>
+ <xs:element ref="xs:import"/>
+ <xs:element ref="xs:redefine"/>
+ <xs:element ref="xs:annotation"/>
+ </xs:choice>
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="xs:schemaTop"/>
+ <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:sequence>
+ <xs:attribute name="targetNamespace" type="xs:anyURI"/>
+ <xs:attribute name="version" type="xs:normalizedString"/>
+ <xs:attribute name="finalDefault" type="xs:derivationSet" use="optional"
+ default=""/>
+ <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/>
+ <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional"
+ default="unqualified"/>
+ <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional"
+ default="unqualified"/>
+ <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute ref="xml:lang"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:key name="element">
+ <xs:selector xpath="xs:element"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+ <xs:key name="attribute">
+ <xs:selector xpath="xs:attribute"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+ <xs:key name="type">
+ <xs:selector xpath="xs:complexType|xs:simpleType"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+ <xs:key name="group">
+ <xs:selector xpath="xs:group"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+ <xs:key name="attributeGroup">
+ <xs:selector xpath="xs:attributeGroup"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+ <xs:key name="notation">
+ <xs:selector xpath="xs:notation"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+ <xs:key name="identityConstraint">
+ <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+ </xs:element>
+ <xs:simpleType name="allNNI">
+ <xs:annotation>
+ <xs:documentation>
+ for maxOccurs
+ </xs:documentation>
+ </xs:annotation>
+ <xs:union memberTypes="xs:nonNegativeInteger">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="unbounded"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ <xs:attributeGroup name="occurs">
+ <xs:annotation>
+ <xs:documentation>
+ for all particles
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="minOccurs" type="xs:nonNegativeInteger" use="optional" default="1"/>
+ <xs:attribute name="maxOccurs" type="xs:allNNI" use="optional" default="1"/>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="defRef">
+ <xs:annotation>
+ <xs:documentation>
+ for element, group and attributeGroup,
+ which both define and reference
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="name" type="xs:NCName"/>
+ <xs:attribute name="ref" type="xs:QName"/>
+ </xs:attributeGroup>
+ <xs:group name="typeDefParticle">
+ <xs:annotation>
+ <xs:documentation>
+ 'complexType' uses this
+ </xs:documentation>
+ </xs:annotation>
+ <xs:choice>
+ <xs:element name="group" type="xs:groupRef"/>
+ <xs:element ref="xs:all"/>
+ <xs:element ref="xs:choice"/>
+ <xs:element ref="xs:sequence"/>
+ </xs:choice>
+ </xs:group>
+ <xs:group name="nestedParticle">
+ <xs:choice>
+ <xs:element name="element" type="xs:localElement"/>
+ <xs:element name="group" type="xs:groupRef"/>
+ <xs:element ref="xs:choice"/>
+ <xs:element ref="xs:sequence"/>
+ <xs:element ref="xs:any"/>
+ </xs:choice>
+ </xs:group>
+ <xs:group name="particle">
+ <xs:choice>
+ <xs:element name="element" type="xs:localElement"/>
+ <xs:element name="group" type="xs:groupRef"/>
+ <xs:element ref="xs:all"/>
+ <xs:element ref="xs:choice"/>
+ <xs:element ref="xs:sequence"/>
+ <xs:element ref="xs:any"/>
+ </xs:choice>
+ </xs:group>
+ <xs:complexType name="attribute">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="xs:defRef"/>
+ <xs:attribute name="type" type="xs:QName"/>
+ <xs:attribute name="use" use="optional" default="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="prohibited"/>
+ <xs:enumeration value="optional"/>
+ <xs:enumeration value="required"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="default" type="xs:string"/>
+ <xs:attribute name="fixed" type="xs:string"/>
+ <xs:attribute name="form" type="xs:formChoice"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="topLevelAttribute">
+ <xs:complexContent>
+ <xs:restriction base="xs:attribute">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
+ </xs:sequence>
+ <xs:attribute name="ref" use="prohibited"/>
+ <xs:attribute name="form" use="prohibited"/>
+ <xs:attribute name="use" use="prohibited"/>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:group name="attrDecls">
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="attribute" type="xs:attribute"/>
+ <xs:element name="attributeGroup" type="xs:attributeGroupRef"/>
+ </xs:choice>
+ <xs:element ref="xs:anyAttribute" minOccurs="0"/>
+ </xs:sequence>
+ </xs:group>
+ <xs:element name="anyAttribute" type="xs:wildcard" id="anyAttribute">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:group name="complexTypeModel">
+ <xs:choice>
+ <xs:element ref="xs:simpleContent"/>
+ <xs:element ref="xs:complexContent"/>
+ <xs:sequence>
+ <xs:annotation>
+ <xs:documentation>
+ This branch is short for
+ <complexContent>
+ <restriction base="xs:anyType">
+ ...
+ </restriction>
+ </complexContent>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ </xs:choice>
+ </xs:group>
+ <xs:complexType name="complexType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:group ref="xs:complexTypeModel"/>
+ <xs:attribute name="name" type="xs:NCName">
+ <xs:annotation>
+ <xs:documentation>
+ Will be restricted to required or forbidden
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false">
+ <xs:annotation>
+ <xs:documentation>
+ Not allowed if simpleContent child is chosen.
+ May be overriden by setting on complexContent child.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
+ <xs:attribute name="final" type="xs:derivationSet"/>
+ <xs:attribute name="block" type="xs:derivationSet"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="topLevelComplexType">
+ <xs:complexContent>
+ <xs:restriction base="xs:complexType">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:complexTypeModel"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="localComplexType">
+ <xs:complexContent>
+ <xs:restriction base="xs:complexType">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:complexTypeModel"/>
+ </xs:sequence>
+ <xs:attribute name="name" use="prohibited"/>
+ <xs:attribute name="abstract" use="prohibited"/>
+ <xs:attribute name="final" use="prohibited"/>
+ <xs:attribute name="block" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="restrictionType">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:choice minOccurs="0">
+ <xs:group ref="xs:typeDefParticle"/>
+ <xs:group ref="xs:simpleRestrictionModel"/>
+ </xs:choice>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:attribute name="base" type="xs:QName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="complexRestrictionType">
+ <xs:complexContent>
+ <xs:restriction base="xs:restrictionType">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>This choice is added simply to
+ make this a valid restriction per the REC
+ </xs:documentation>
+ </xs:annotation>
+ <xs:group ref="xs:typeDefParticle"/>
+ </xs:choice>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="extensionType">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:attribute name="base" type="xs:QName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="complexContent" id="complexContent">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:choice>
+ <xs:element name="restriction" type="xs:complexRestrictionType"/>
+ <xs:element name="extension" type="xs:extensionType"/>
+ </xs:choice>
+ <xs:attribute name="mixed" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>
+ Overrides any setting on complexType parent.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="simpleRestrictionType">
+ <xs:complexContent>
+ <xs:restriction base="xs:restrictionType">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>This choice is added simply to
+ make this a valid restriction per the REC
+ </xs:documentation>
+ </xs:annotation>
+ <xs:group ref="xs:simpleRestrictionModel"/>
+ </xs:choice>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="simpleExtensionType">
+ <xs:complexContent>
+ <xs:restriction base="xs:extensionType">
+ <xs:sequence>
+ <xs:annotation>
+ <xs:documentation>
+ No typeDefParticle group reference
+ </xs:documentation>
+ </xs:annotation>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="simpleContent" id="simpleContent">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:choice>
+ <xs:element name="restriction" type="xs:simpleRestrictionType"/>
+ <xs:element name="extension" type="xs:simpleExtensionType"/>
+ </xs:choice>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="complexType" type="xs:topLevelComplexType" id="complexType">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:simpleType name="blockSet">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use
+ </xs:documentation>
+ <xs:documentation>
+ #all or (possibly empty) subset of {substitution, extension,
+ restriction}
+ </xs:documentation>
+ </xs:annotation>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="#all"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:restriction base="xs:derivationControl">
+ <xs:enumeration value="extension"/>
+ <xs:enumeration value="restriction"/>
+ <xs:enumeration value="substitution"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ <xs:complexType name="element" abstract="true">
+ <xs:annotation>
+ <xs:documentation>
+ The element element can be used either
+ at the top level to define an element-type binding globally,
+ or within a content model to either reference a globally-defined
+ element or type or declare an element-type binding locally.
+ The ref form is not allowed at the top level.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:choice minOccurs="0">
+ <xs:element name="simpleType" type="xs:localSimpleType"/>
+ <xs:element name="complexType" type="xs:localComplexType"/>
+ </xs:choice>
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="xs:defRef"/>
+ <xs:attribute name="type" type="xs:QName"/>
+ <xs:attribute name="substitutionGroup" type="xs:QName"/>
+ <xs:attributeGroup ref="xs:occurs"/>
+ <xs:attribute name="default" type="xs:string"/>
+ <xs:attribute name="fixed" type="xs:string"/>
+ <xs:attribute name="nillable" type="xs:boolean" use="optional" default="false"/>
+ <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
+ <xs:attribute name="final" type="xs:derivationSet"/>
+ <xs:attribute name="block" type="xs:blockSet"/>
+ <xs:attribute name="form" type="xs:formChoice"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="topLevelElement">
+ <xs:complexContent>
+ <xs:restriction base="xs:element">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0">
+ <xs:element name="simpleType" type="xs:localSimpleType"/>
+ <xs:element name="complexType" type="xs:localComplexType"/>
+ </xs:choice>
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="ref" use="prohibited"/>
+ <xs:attribute name="form" use="prohibited"/>
+ <xs:attribute name="minOccurs" use="prohibited"/>
+ <xs:attribute name="maxOccurs" use="prohibited"/>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="localElement">
+ <xs:complexContent>
+ <xs:restriction base="xs:element">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0">
+ <xs:element name="simpleType" type="xs:localSimpleType"/>
+ <xs:element name="complexType" type="xs:localComplexType"/>
+ </xs:choice>
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="substitutionGroup" use="prohibited"/>
+ <xs:attribute name="final" use="prohibited"/>
+ <xs:attribute name="abstract" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="element" type="xs:topLevelElement" id="element">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="group" abstract="true">
+ <xs:annotation>
+ <xs:documentation>
+ group type for explicit groups, named top-level groups and
+ group references
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:attributeGroup ref="xs:defRef"/>
+ <xs:attributeGroup ref="xs:occurs"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="realGroup">
+ <xs:complexContent>
+ <xs:restriction base="xs:group">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element ref="xs:all"/>
+ <xs:element ref="xs:choice"/>
+ <xs:element ref="xs:sequence"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="namedGroup">
+ <xs:complexContent>
+ <xs:restriction base="xs:realGroup">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="1" maxOccurs="1">
+ <xs:element name="all">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:restriction base="xs:all">
+ <xs:group ref="xs:allModel"/>
+ <xs:attribute name="minOccurs" use="prohibited"/>
+ <xs:attribute name="maxOccurs" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="choice" type="xs:simpleExplicitGroup"/>
+ <xs:element name="sequence" type="xs:simpleExplicitGroup"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ <xs:attribute name="ref" use="prohibited"/>
+ <xs:attribute name="minOccurs" use="prohibited"/>
+ <xs:attribute name="maxOccurs" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="groupRef">
+ <xs:complexContent>
+ <xs:restriction base="xs:realGroup">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="ref" use="required" type="xs:QName"/>
+ <xs:attribute name="name" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="explicitGroup">
+ <xs:annotation>
+ <xs:documentation>
+ group type for the three kinds of group
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:restriction base="xs:group">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:NCName" use="prohibited"/>
+ <xs:attribute name="ref" type="xs:QName" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="simpleExplicitGroup">
+ <xs:complexContent>
+ <xs:restriction base="xs:explicitGroup">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="minOccurs" use="prohibited"/>
+ <xs:attribute name="maxOccurs" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:group name="allModel">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>This choice with min/max is here to
+ avoid a pblm with the Elt:All/Choice/Seq
+ Particle derivation constraint
+ </xs:documentation>
+ </xs:annotation>
+ <xs:element name="element">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:documentation>restricted max/min</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:restriction base="xs:localElement">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0">
+ <xs:element name="simpleType" type="xs:localSimpleType"/>
+ <xs:element name="complexType" type="xs:localComplexType"/>
+ </xs:choice>
+ <xs:group ref="xs:identityConstraint" minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="minOccurs" use="optional" default="1">
+ <xs:simpleType>
+ <xs:restriction base="xs:nonNegativeInteger">
+ <xs:enumeration value="0"/>
+ <xs:enumeration value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="maxOccurs" use="optional" default="1">
+ <xs:simpleType>
+ <xs:restriction base="xs:allNNI">
+ <xs:enumeration value="0"/>
+ <xs:enumeration value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:group>
+ <xs:complexType name="all">
+ <xs:annotation>
+ <xs:documentation>
+ Only elements allowed inside
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:restriction base="xs:explicitGroup">
+ <xs:group ref="xs:allModel"/>
+ <xs:attribute name="minOccurs" use="optional" default="1">
+ <xs:simpleType>
+ <xs:restriction base="xs:nonNegativeInteger">
+ <xs:enumeration value="0"/>
+ <xs:enumeration value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="maxOccurs" use="optional" default="1">
+ <xs:simpleType>
+ <xs:restriction base="xs:allNNI">
+ <xs:enumeration value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="all" id="all" type="xs:all">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="choice" type="xs:explicitGroup" id="choice">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="sequence" type="xs:explicitGroup" id="sequence">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="group" type="xs:namedGroup" id="group">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="wildcard">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="namespace" type="xs:namespaceList" use="optional"
+ default="##any"/>
+ <xs:attribute name="processContents" use="optional" default="strict">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="skip"/>
+ <xs:enumeration value="lax"/>
+ <xs:enumeration value="strict"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="any" id="any">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:wildcard">
+ <xs:attributeGroup ref="xs:occurs"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:annotation>
+ <xs:documentation>
+ simple type for the value of the 'namespace' attr of
+ 'any' and 'anyAttribute'
+ </xs:documentation>
+ </xs:annotation>
+ <xs:annotation>
+ <xs:documentation>
+ Value is
+ ##any - - any non-conflicting WFXML/attribute at all
+
+ ##other - - any non-conflicting WFXML/attribute from
+ namespace other than targetNS
+
+ ##local - - any unqualified non-conflicting WFXML/attribute
+
+ one or - - any non-conflicting WFXML/attribute from
+ more URI the listed namespaces
+ references
+ (space separated)
+
+ ##targetNamespace or ##local may appear in the above list, to
+ refer to the targetNamespace of the enclosing
+ schema or an absent targetNamespace respectively
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType name="namespaceList">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use
+ </xs:documentation>
+ </xs:annotation>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="##any"/>
+ <xs:enumeration value="##other"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:anyURI">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="##targetNamespace"/>
+ <xs:enumeration value="##local"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ <xs:element name="attribute" type="xs:topLevelAttribute" id="attribute">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="attributeGroup" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:group ref="xs:attrDecls"/>
+ <xs:attributeGroup ref="xs:defRef"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="namedAttributeGroup">
+ <xs:complexContent>
+ <xs:restriction base="xs:attributeGroup">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ <xs:attribute name="ref" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="attributeGroupRef">
+ <xs:complexContent>
+ <xs:restriction base="xs:attributeGroup">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="ref" use="required" type="xs:QName"/>
+ <xs:attribute name="name" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="attributeGroup" type="xs:namedAttributeGroup" id="attributeGroup">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="include" id="include">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="redefine" id="redefine">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:openAttrs">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="xs:annotation"/>
+ <xs:group ref="xs:redefinable"/>
+ </xs:choice>
+ <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
+ <xs:attribute name="id" type="xs:ID"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="import" id="import">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="namespace" type="xs:anyURI"/>
+ <xs:attribute name="schemaLocation" type="xs:anyURI"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="selector" id="selector">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="xpath" use="required">
+ <xs:simpleType>
+ <xs:annotation>
+ <xs:documentation>A subset of XPath expressions for use
+ in selectors
+ </xs:documentation>
+ <xs:documentation>A utility type, not for public
+ use
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:annotation>
+ <xs:documentation>The following pattern is intended to allow
+ XPath
+ expressions per the following EBNF:
+ Selector ::= Path ( '|' Path )*
+ Path ::= ('.//')? Step ( '/' Step )*
+ Step ::= '.' | NameTest
+ NameTest ::= QName | '*' | NCName ':' '*'
+ child:: is also allowed
+ </xs:documentation>
+ </xs:annotation>
+ <xs:pattern
+ value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*">
+ </xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="field" id="field">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="xpath" use="required">
+ <xs:simpleType>
+ <xs:annotation>
+ <xs:documentation>A subset of XPath expressions for use
+ in fields
+ </xs:documentation>
+ <xs:documentation>A utility type, not for public
+ use
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:annotation>
+ <xs:documentation>The following pattern is intended to allow
+ XPath
+ expressions per the same EBNF as for selector,
+ with the following change:
+ Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
+ </xs:documentation>
+ </xs:annotation>
+ <xs:pattern
+ value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*">
+ </xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="keybase">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:element ref="xs:selector"/>
+ <xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:group name="identityConstraint">
+ <xs:annotation>
+ <xs:documentation>The three kinds of identity constraints, all with
+ type of or derived from 'keybase'.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:choice>
+ <xs:element ref="xs:unique"/>
+ <xs:element ref="xs:key"/>
+ <xs:element ref="xs:keyref"/>
+ </xs:choice>
+ </xs:group>
+ <xs:element name="unique" type="xs:keybase" id="unique">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="key" type="xs:keybase" id="key">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="keyref" id="keyref">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:keybase">
+ <xs:attribute name="refer" type="xs:QName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="notation" id="notation">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ <xs:attribute name="public" type="xs:public"/>
+ <xs:attribute name="system" type="xs:anyURI"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:simpleType name="public">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use
+ </xs:documentation>
+ <xs:documentation>
+ A public identifier, per ISO 8879
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token"/>
+ </xs:simpleType>
+ <xs:element name="appinfo" id="appinfo">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any processContents="lax"/>
+ </xs:sequence>
+ <xs:attribute name="source" type="xs:anyURI"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="documentation" id="documentation">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any processContents="lax"/>
+ </xs:sequence>
+ <xs:attribute name="source" type="xs:anyURI"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="annotation" id="annotation">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:openAttrs">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="xs:appinfo"/>
+ <xs:element ref="xs:documentation"/>
+ </xs:choice>
+ <xs:attribute name="id" type="xs:ID"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:annotation>
+ <xs:documentation>
+ notations for use within XML Schema schemas
+ </xs:documentation>
+ </xs:annotation>
+ <xs:notation name="XMLSchemaStructures" public="structures"
+ system="http://www.w3.org/2000/08/XMLSchema.xsd"/>
+ <xs:notation name="XML" public="REC-xml-19980210"
+ system="http://www.w3.org/TR/1998/REC-xml-19980210"/>
+ <xs:complexType name="anyType" mixed="true">
+ <xs:annotation>
+ <xs:documentation>
+ Not the real urType, but as close an approximation as we can
+ get in the XML representation
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+ </xs:sequence>
+ <xs:anyAttribute processContents="lax"/>
+ </xs:complexType>
+ <xs:annotation>
+ <xs:documentation>
+ First the built-in primitive datatypes. These definitions are for
+ information only, the real built-in definitions are magic.
+ </xs:documentation>
+ <xs:documentation>
+ For each built-in datatype in this schema (both primitive and
+ derived) can be uniquely addressed via a URI constructed
+ as follows:
+ 1) the base URI is the URI of the XML Schema namespace
+ 2) the fragment identifier is the name of the datatype
+
+ For example, to address the int datatype, the URI is:
+
+ http://www.w3.org/2001/XMLSchema#int
+
+ Additionally, each facet definition element can be uniquely
+ addressed via a URI constructed as follows:
+ 1) the base URI is the URI of the XML Schema namespace
+ 2) the fragment identifier is the name of the facet
+
+ For example, to address the maxInclusive facet, the URI is:
+
+ http://www.w3.org/2001/XMLSchema#maxInclusive
+
+ Additionally, each facet usage in a built-in datatype definition
+ can be uniquely addressed via a URI constructed as follows:
+ 1) the base URI is the URI of the XML Schema namespace
+ 2) the fragment identifier is the name of the datatype, followed
+ by a period (".") followed by the name of the facet
+
+ For example, to address the usage of the maxInclusive facet in
+ the definition of int, the URI is:
+
+ http://www.w3.org/2001/XMLSchema#int.maxInclusive
+
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType name="string" id="string">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#string"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="preserve" id="string.preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="boolean" id="boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="finite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#boolean"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="boolean.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="float" id="float">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="total"/>
+ <hfp:hasProperty name="bounded" value="true"/>
+ <hfp:hasProperty name="cardinality" value="finite"/>
+ <hfp:hasProperty name="numeric" value="true"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#float"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="float.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="double" id="double">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="total"/>
+ <hfp:hasProperty name="bounded" value="true"/>
+ <hfp:hasProperty name="cardinality" value="finite"/>
+ <hfp:hasProperty name="numeric" value="true"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#double"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="double.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="decimal" id="decimal">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="totalDigits"/>
+ <hfp:hasFacet name="fractionDigits"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="total"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="true"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#decimal"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="decimal.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="duration" id="duration">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#duration"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="duration.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="dateTime" id="dateTime">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#dateTime"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="dateTime.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="time" id="time">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#time"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="time.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="date" id="date">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#date"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="date.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="gYearMonth" id="gYearMonth">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="gYearMonth.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="gYear" id="gYear">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gYear"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="gYear.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="gMonthDay" id="gMonthDay">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="gMonthDay.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="gDay" id="gDay">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gDay"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="gDay.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="gMonth" id="gMonth">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonth"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="gMonth.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="hexBinary" id="hexBinary">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#binary"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="hexBinary.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="base64Binary" id="base64Binary">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="base64Binary.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="anyURI" id="anyURI">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#anyURI"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="anyURI.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="QName" id="QName">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#QName"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="QName.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="NOTATION" id="NOTATION">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/>
+ <xs:documentation>
+ NOTATION cannot be used directly in a schema; rather a type
+ must be derived from it by specifying at least one enumeration
+ facet whose value is the name of a NOTATION declared in the
+ schema.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true" id="NOTATION.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:annotation>
+ <xs:documentation>
+ Now the derived primitive types
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType name="normalizedString" id="normalizedString">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:whiteSpace value="replace" id="normalizedString.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="token" id="token">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#token"/>
+ </xs:annotation>
+ <xs:restriction base="xs:normalizedString">
+ <xs:whiteSpace value="collapse" id="token.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="language" id="language">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#language"/>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:pattern value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" id="language.pattern">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-LanguageID">
+ pattern specifies the content of section 2.12 of XML 1.0e2
+ and RFC 3066 (Revised version of RFC 1766).
+ </xs:documentation>
+ </xs:annotation>
+ </xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="IDREFS" id="IDREFS">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>
+ </xs:annotation>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list itemType="xs:IDREF"/>
+ </xs:simpleType>
+ <xs:minLength value="1" id="IDREFS.minLength"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="ENTITIES" id="ENTITIES">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>
+ </xs:annotation>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list itemType="xs:ENTITY"/>
+ </xs:simpleType>
+ <xs:minLength value="1" id="ENTITIES.minLength"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="NMTOKEN" id="NMTOKEN">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:pattern value="\c+" id="NMTOKEN.pattern">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
+ pattern matches production 7 from the XML spec
+ </xs:documentation>
+ </xs:annotation>
+ </xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="NMTOKENS" id="NMTOKENS">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>
+ </xs:annotation>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list itemType="xs:NMTOKEN"/>
+ </xs:simpleType>
+ <xs:minLengt
<TRUNCATED>
[11/11] git commit: Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Posted by la...@apache.org.
Refactoring org.wso2.carbon.cartridge.mgt.ui to org.apache.stratos.cartridge.mgt.ui
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/f5c169db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/f5c169db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/f5c169db
Branch: refs/heads/master
Commit: f5c169db9fe55ac754df76421542ec28c4e5ddcf
Parents: 0763d6f
Author: Lahiru Sandaruwan <la...@wso2.com>
Authored: Sun Jul 7 17:47:33 2013 +0530
Committer: Lahiru Sandaruwan <la...@wso2.com>
Committed: Sun Jul 7 17:47:33 2013 +0530
----------------------------------------------------------------------
.../org.apache.stratos.cartridge.mgt.ui/pom.xml | 95 +
.../cartridge/mgt/ui/CartridgeAdminClient.java | 278 ++
.../cartridge/mgt/ui/CartridgeConstans.java | 0
.../stratos/cartridge/mgt/ui/Payload.java | 14 +
.../mgt/ui/RepoNotificationClient.java | 52 +
.../mgt/ui/RepoNotificationServlet.java | 57 +
.../stratos/cartridge/mgt/ui/Repository.java | 14 +
.../CartridgeManagementUIActivator.java | 59 +
.../src/main/resources/META-INF/component.xml | 103 +
.../cartridge/mgt/ui/i18n/Resources.properties | 96 +
.../web/cartridge-mgt/available_cartridges.jsp | 188 ++
.../web/cartridge-mgt/docs/userguide.html | 41 +
.../web/cartridge-mgt/images/ajax-loading.gif | Bin 0 -> 1849 bytes
.../web/cartridge-mgt/images/cartridge.png | Bin 0 -> 463 bytes
.../resources/web/cartridge-mgt/images/list.gif | Bin 0 -> 216 bytes
.../web/cartridge-mgt/images/search.gif | Bin 0 -> 578 bytes
.../web/cartridge-mgt/images/subscribe.gif | Bin 0 -> 718 bytes
.../web/cartridge-mgt/images/unsubscribe.png | Bin 0 -> 742 bytes
.../resources/web/cartridge-mgt/js/common.js | 76 +
.../web/cartridge-mgt/js/jquery.blockUI-1.33.js | 361 +++
.../main/resources/web/cartridge-mgt/list.jsp | 0
.../resources/web/cartridge-mgt/map_domain.jsp | 120 +
.../cartridge-mgt/map_domain_ajaxprocessor.jsp | 69 +
.../remove_domain_ajaxprocessor.jsp | 62 +
.../web/cartridge-mgt/styles/XMLSchema.dtd | 418 +++
.../web/cartridge-mgt/styles/XMLSchema.xsd | 2383 ++++++++++++++++++
.../web/cartridge-mgt/styles/annotated-wsdl.xsl | 702 ++++++
.../cartridge-mgt/styles/annotated-wsdl2.xsl | 721 ++++++
.../web/cartridge-mgt/styles/annotated-xsd.xsl | 850 +++++++
.../resources/web/cartridge-mgt/styles/atom.xsl | 130 +
.../web/cartridge-mgt/styles/datatypes.dtd | 216 ++
.../resources/web/cartridge-mgt/styles/rss.xsl | 116 +
.../resources/web/cartridge-mgt/subscribe.jsp | 305 +++
.../cartridge-mgt/subscribe_ajaxprocessor.jsp | 90 +
.../web/cartridge-mgt/subscribed_cartridges.jsp | 176 ++
.../subscribed_cartridges_ajaxprocessor.jsp | 281 +++
.../cartridge-mgt/sync_repo_ajaxprocessor.jsp | 62 +
.../cartridge-mgt/test_git_ajaxprocessor.jsp | 73 +
.../cartridge-mgt/unsubscribe_ajaxprocessor.jsp | 66 +
.../2.1.3/pom.xml | 85 -
.../cartridge/mgt/ui/CartridgeAdminClient.java | 275 --
.../cartridge/mgt/ui/CartridgeConstans.java | 0
.../wso2/carbon/cartridge/mgt/ui/Payload.java | 14 -
.../mgt/ui/RepoNotificationClient.java | 52 -
.../mgt/ui/RepoNotificationServlet.java | 57 -
.../carbon/cartridge/mgt/ui/Repository.java | 14 -
.../CartridgeManagementUIActivator.java | 56 -
.../src/main/resources/META-INF/component.xml | 93 -
.../cartridge/mgt/ui/i18n/Resources.properties | 96 -
.../web/cartridge-mgt/available_cartridges.jsp | 186 --
.../web/cartridge-mgt/docs/userguide.html | 41 -
.../web/cartridge-mgt/images/ajax-loading.gif | Bin 1849 -> 0 bytes
.../web/cartridge-mgt/images/cartridge.png | Bin 463 -> 0 bytes
.../resources/web/cartridge-mgt/images/list.gif | Bin 216 -> 0 bytes
.../web/cartridge-mgt/images/search.gif | Bin 578 -> 0 bytes
.../web/cartridge-mgt/images/subscribe.gif | Bin 718 -> 0 bytes
.../web/cartridge-mgt/images/unsubscribe.png | Bin 742 -> 0 bytes
.../resources/web/cartridge-mgt/js/common.js | 76 -
.../web/cartridge-mgt/js/jquery.blockUI-1.33.js | 361 ---
.../main/resources/web/cartridge-mgt/list.jsp | 0
.../resources/web/cartridge-mgt/map_domain.jsp | 118 -
.../cartridge-mgt/map_domain_ajaxprocessor.jsp | 67 -
.../remove_domain_ajaxprocessor.jsp | 60 -
.../web/cartridge-mgt/styles/XMLSchema.dtd | 418 ---
.../web/cartridge-mgt/styles/XMLSchema.xsd | 2383 ------------------
.../web/cartridge-mgt/styles/annotated-wsdl.xsl | 702 ------
.../cartridge-mgt/styles/annotated-wsdl2.xsl | 721 ------
.../web/cartridge-mgt/styles/annotated-xsd.xsl | 850 -------
.../resources/web/cartridge-mgt/styles/atom.xsl | 130 -
.../web/cartridge-mgt/styles/datatypes.dtd | 216 --
.../resources/web/cartridge-mgt/styles/rss.xsl | 116 -
.../resources/web/cartridge-mgt/subscribe.jsp | 303 ---
.../cartridge-mgt/subscribe_ajaxprocessor.jsp | 88 -
.../web/cartridge-mgt/subscribed_cartridges.jsp | 174 --
.../subscribed_cartridges_ajaxprocessor.jsp | 279 --
.../cartridge-mgt/sync_repo_ajaxprocessor.jsp | 60 -
.../cartridge-mgt/test_git_ajaxprocessor.jsp | 71 -
.../cartridge-mgt/unsubscribe_ajaxprocessor.jsp | 64 -
78 files changed, 8274 insertions(+), 8226 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/pom.xml b/components/org.apache.stratos.cartridge.mgt.ui/pom.xml
new file mode 100644
index 0000000..8763c7a
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/pom.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.wso2.carbon</groupId>
+ <artifactId>stratos-components</artifactId>
+ <version>2.1.0</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.apache.stratos.cartridge.mgt.ui</artifactId>
+ <version>2.1.3</version>
+ <packaging>bundle</packaging>
+ <name>WSO2 Carbon - Cartridge Management UI</name>
+ <description>Cartridge management UI bundle</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.wso2.carbon</groupId>
+ <artifactId>org.wso2.carbon.ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.wso2.carbon</groupId>
+ <artifactId>org.wso2.carbon.utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.wso2.carbon</groupId>
+ <artifactId>org.apache.stratos.adc.mgt.stub</artifactId>
+ <version>4.1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.wso2.carbon</groupId>
+ <artifactId>org.apache.stratos.adc.reponotification.service.stub</artifactId>
+ <version>4.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+ <Bundle-Name>${project.artifactId}</Bundle-Name>
+ <Export-Package>
+ !org.apache.stratos.cartridge.mgt.ui.internal,
+ org.apache.stratos.cartridge.mgt.ui.*;version="2.1.3"
+ </Export-Package>
+ <Bundle-Activator>
+ org.apache.stratos.cartridge.mgt.ui.internal.CartridgeManagementUIActivator
+ </Bundle-Activator>
+ <Private-Package>org.apache.stratos.cartridge.mgt.ui.internal</Private-Package>
+ <Carbon-Component>UIBundle</Carbon-Component>
+ <Import-Package>
+ !org.apache.stratos.cartridge.mgt.ui.*,
+ org.wso2.carbon.adc.mgt.stub.*;version="1.0.0",
+ *;resolution:=optional
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/CartridgeAdminClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/CartridgeAdminClient.java b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/CartridgeAdminClient.java
new file mode 100644
index 0000000..a7b538b
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/CartridgeAdminClient.java
@@ -0,0 +1,278 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.cartridge.mgt.ui;
+
+import java.rmi.RemoteException;
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.adc.mgt.dto.xsd.CartridgeWrapper;
+import org.wso2.carbon.adc.mgt.dto.xsd.PolicyDefinition;
+import org.wso2.carbon.adc.mgt.dto.xsd.RepositoryInformation;
+import org.wso2.carbon.adc.mgt.dto.xsd.SubscriptionInfo;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceADCExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceAlreadySubscribedExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceDomainMappingExistsExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceDuplicateCartridgeAliasExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceInvalidCartridgeAliasExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceInvalidRepositoryExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceNotSubscribedExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServicePolicyExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceRepositoryCredentialsRequiredExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceRepositoryRequiredExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceRepositoryTransportExceptionException;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceStub;
+import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceUnregisteredCartridgeExceptionException;
+
+/**
+ * Client which communicates with the Application Management service of ADC
+ */
+public class CartridgeAdminClient {
+ public static final String BUNDLE = "org.apache.stratos.cartridge.mgt.ui.i18n.Resources";
+ public static final int MILLISECONDS_PER_MINUTE = 60 * 1000;
+ private static final Log log = LogFactory.getLog(CartridgeAdminClient.class);
+ private ResourceBundle bundle;
+ public ApplicationManagementServiceStub stub;
+
+ public CartridgeAdminClient(String cookie, String backendServerURL, ConfigurationContext configCtx, Locale locale) throws AxisFault {
+ if (log.isDebugEnabled()) {
+ log.debug("Creating CartridgeAdminClient for " + backendServerURL);
+ }
+ if (cookie == null || cookie.trim().length() == 0) {
+ if (log.isDebugEnabled()) {
+ log.debug("Cookie not found. Cannot create CartridgeAdminClient for " + backendServerURL);
+ }
+ throw new RuntimeException("Session has expired");
+ }
+ String serviceURL = backendServerURL + "ApplicationManagementService";
+ bundle = ResourceBundle.getBundle(BUNDLE, locale);
+
+ stub = new ApplicationManagementServiceStub(configCtx, serviceURL);
+ ServiceClient client = stub._getServiceClient();
+ Options option = client.getOptions();
+ option.setManageSession(true);
+ option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
+ option.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
+ }
+
+ public CartridgeWrapper getPagedAvailableCartridges(String cartridgeSearchString, int pageNumber, boolean multiTenant) {
+ try {
+ return stub.getPagedAvailableCartridges(cartridgeSearchString, pageNumber, multiTenant);
+ } catch (ApplicationManagementServiceADCExceptionException e) {
+ handleException("cannot.list.available.cartridges", e);
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ }
+ return null;
+ }
+
+ public CartridgeWrapper getPagedSubscribedCartridges(String cartridgeSearchString, int pageNumber) {
+ try {
+ return stub.getPagedSubscribedCartridges(cartridgeSearchString, pageNumber);
+ } catch (ApplicationManagementServiceADCExceptionException e) {
+ handleException("cannot.list.subscribed.cartridges", e);
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ }
+ return null;
+ }
+
+ public String addDomainMapping(String mappedDomain, String cartridgeAlias) {
+ String host = null;
+ try {
+ host = stub.addDomainMapping(mappedDomain, cartridgeAlias);
+ } catch (ApplicationManagementServiceADCExceptionException e) {
+ handleException("cannot.mapdomain", e);
+ } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
+ handleException("notsubscribed.error", e, cartridgeAlias);
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ } catch (ApplicationManagementServiceDomainMappingExistsExceptionException e) {
+ handleException("domainmapping.exists.error", e, mappedDomain, cartridgeAlias);
+ }
+
+ return host;
+ }
+
+ public void removeDomainMapping(String cartridgeAlias) {
+ try {
+ stub.removeDomainMapping(cartridgeAlias);
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ } catch (ApplicationManagementServiceADCExceptionException e) {
+ handleException("cannot.removedomain", e);
+ } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
+ handleException("notsubscribed.error", e, cartridgeAlias);
+ }
+ }
+
+ public void synchronizeRepository(String cartridgeAlias) {
+ try {
+ stub.synchronizeRepository(cartridgeAlias);
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ } catch (ApplicationManagementServiceADCExceptionException e) {
+ handleException("cannot.syncrepo", e);
+ } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
+ handleException("notsubscribed.error", e, cartridgeAlias);
+ }
+ }
+
+ public RepositoryInformation testRepositoryConnection(String repoURL, String repoUsername, String repoPassword, boolean privateRepo) {
+ try {
+ return stub.testRepositoryConnection(repoURL, repoUsername, repoPassword, privateRepo);
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ } catch (ApplicationManagementServiceADCExceptionException e) {
+ handleException("cannot.testrepo", e);
+ } catch (ApplicationManagementServiceRepositoryRequiredExceptionException e) {
+ handleException("repository.required", e);
+ } catch (ApplicationManagementServiceRepositoryTransportExceptionException e) {
+ handleException("repository.transport.error", e, repoURL);
+ } catch (ApplicationManagementServiceRepositoryCredentialsRequiredExceptionException e) {
+ handleException("repository.credentials.required", e, repoURL);
+ } catch (ApplicationManagementServiceInvalidRepositoryExceptionException e) {
+ handleException("repository.invalid.error", e, repoURL);
+ }
+ return null;
+ }
+
+ public void unsubscribe(String alias) {
+ try {
+ stub.unsubscribe(alias);
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ } catch (ApplicationManagementServiceADCExceptionException e) {
+ handleException("cannot.unsubscribe", e);
+ } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
+ handleException("notsubscribed.error", e, alias);
+ }
+ }
+
+ public PolicyDefinition[] getPolicyDefinitions() {
+ try {
+ return stub.getPolicyDefinitions();
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ }
+ return null;
+ }
+
+ public boolean isFeatureEnabled(String feature) {
+ try {
+ return stub.isFeatureEnabled(feature);
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ }
+ return false;
+ }
+
+ public SubscriptionInfo subscribeToCartridge(String cartridgeType,
+ String cartridgeAlias,
+ String policy,
+ String repositoryUrl,
+ boolean privateRepo,
+ String repoUserName,
+ String repoPassword,
+ String otherCartridgeType,
+ String otherCartridgeAlias) {
+
+ if (log.isInfoEnabled()) {
+ log.info("Subscribing to a Cartridge: " + cartridgeType + ", Alias: " + cartridgeAlias);
+ }
+
+ if (otherCartridgeAlias != null && otherCartridgeAlias.trim().length() > 0) {
+ // currently passing empty strings for repo user name and
+ // passwords
+ try {
+ stub.subscribe(otherCartridgeType, otherCartridgeAlias, policy, null, false, "", "", null, null);
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ } catch (ApplicationManagementServiceADCExceptionException e) {
+ handleException("cannot.subscribe", e);
+ } catch (ApplicationManagementServiceRepositoryRequiredExceptionException e) {
+ handleException("repository.required", e);
+ } catch (ApplicationManagementServiceUnregisteredCartridgeExceptionException e) {
+ handleException("cartridge.notregistered", e, otherCartridgeType);
+ } catch (ApplicationManagementServiceInvalidCartridgeAliasExceptionException e) {
+ handleException("cartridge.invalid.alias", e, otherCartridgeAlias);
+ } catch (ApplicationManagementServiceAlreadySubscribedExceptionException e) {
+ handleException("cartridge.already.subscribed", e, e.getFaultMessage().getAlreadySubscribedException()
+ .getCartridgeType());
+ } catch (ApplicationManagementServiceDuplicateCartridgeAliasExceptionException e) {
+ handleException("cartridge.alias.duplicate", e, otherCartridgeAlias);
+ } catch (ApplicationManagementServicePolicyExceptionException e) {
+ handleException("policy.error", e);
+ } catch (ApplicationManagementServiceRepositoryTransportExceptionException e) {
+ handleException("repository.transport.error", e, repositoryUrl);
+ } catch (ApplicationManagementServiceRepositoryCredentialsRequiredExceptionException e) {
+ handleException("repository.credentials.required", e, repositoryUrl);
+ } catch (ApplicationManagementServiceInvalidRepositoryExceptionException e) {
+ handleException("repository.invalid.error", e, repositoryUrl);
+ }
+ }
+
+ try {
+ return stub.subscribe(cartridgeType, cartridgeAlias, policy, repositoryUrl, privateRepo, repoUserName,
+ repoPassword, otherCartridgeType, otherCartridgeAlias);
+ } catch (RemoteException e) {
+ handleException("remote.error", e);
+ } catch (ApplicationManagementServiceADCExceptionException e) {
+ handleException("cannot.subscribe", e);
+ } catch (ApplicationManagementServiceRepositoryRequiredExceptionException e) {
+ handleException("repository.required", e);
+ } catch (ApplicationManagementServiceUnregisteredCartridgeExceptionException e) {
+ handleException("cartridge.notregistered", e, cartridgeType);
+ } catch (ApplicationManagementServiceInvalidCartridgeAliasExceptionException e) {
+ handleException("cartridge.invalid.alias", e, cartridgeAlias);
+ } catch (ApplicationManagementServiceAlreadySubscribedExceptionException e) {
+ handleException("cartridge.already.subscribed", e, e.getFaultMessage().getAlreadySubscribedException()
+ .getCartridgeType());
+ } catch (ApplicationManagementServiceDuplicateCartridgeAliasExceptionException e) {
+ handleException("cartridge.alias.duplicate", e, cartridgeAlias);
+ } catch (ApplicationManagementServicePolicyExceptionException e) {
+ handleException("policy.error", e);
+ } catch (ApplicationManagementServiceRepositoryTransportExceptionException e) {
+ handleException("repository.transport.error", e, repositoryUrl);
+ } catch (ApplicationManagementServiceRepositoryCredentialsRequiredExceptionException e) {
+ handleException("repository.credentials.required", e, repositoryUrl);
+ } catch (ApplicationManagementServiceInvalidRepositoryExceptionException e) {
+ handleException("repository.invalid.error", e, repositoryUrl);
+ }
+ return null;
+ }
+
+ private void handleException(String msgKey, Exception e, Object... args) {
+ String msg = bundle.getString(msgKey);
+ if (args != null) {
+ msg = MessageFormat.format(msg, args);
+ }
+ log.error(msg, e);
+ throw new RuntimeException(msg, e);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/CartridgeConstans.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/CartridgeConstans.java b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/CartridgeConstans.java
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/Payload.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/Payload.java b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/Payload.java
new file mode 100644
index 0000000..8bd5948
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/Payload.java
@@ -0,0 +1,14 @@
+package org.apache.stratos.cartridge.mgt.ui;
+
+public class Payload {
+ private Repository repository;
+
+ public Repository getRepository() {
+ return repository;
+ }
+
+ public void setRepository(Repository repository) {
+ this.repository = repository;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/RepoNotificationClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/RepoNotificationClient.java b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/RepoNotificationClient.java
new file mode 100644
index 0000000..5eedf29
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/RepoNotificationClient.java
@@ -0,0 +1,52 @@
+package org.apache.stratos.cartridge.mgt.ui;
+
+import java.rmi.RemoteException;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.adc.reponotification.stub.RepoNotificationServiceException;
+import org.wso2.carbon.adc.reponotification.stub.RepoNotificationServiceStub;
+
+public class RepoNotificationClient {
+
+ private ResourceBundle bundle;
+ public RepoNotificationServiceStub stub;
+ public static final String BUNDLE = "org.apache.stratos.cartridge.mgt.ui.i18n.Resources";
+ private static final Log log = LogFactory.getLog(RepoNotificationClient.class);
+
+ public RepoNotificationClient(String cookie, String backendServerURL,
+ ConfigurationContext configCtx, Locale locale) throws AxisFault {
+ String serviceURL = backendServerURL + "RepoNotificationService";
+ bundle = ResourceBundle.getBundle(BUNDLE, locale);
+
+ stub = new RepoNotificationServiceStub(configCtx, serviceURL);
+ ServiceClient client = stub._getServiceClient();
+ Options option = client.getOptions();
+ option.setManageSession(true);
+ option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
+ option.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
+ }
+
+ public void synchronize(String repositoryURL) throws AxisFault {
+ try {
+ stub.synchronize(repositoryURL);
+ } catch (RemoteException e) {
+ handleException("cannot.unsubscribe", e);
+ } catch (RepoNotificationServiceException e) {
+ handleException("cannot.unsubscribe", e);
+ }
+ }
+
+ private void handleException(String msgKey, Exception e) throws AxisFault {
+ String msg = bundle.getString(msgKey);
+ log.error(msg, e);
+ throw new AxisFault(msg, e);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/RepoNotificationServlet.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/RepoNotificationServlet.java b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/RepoNotificationServlet.java
new file mode 100644
index 0000000..ff51094
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/RepoNotificationServlet.java
@@ -0,0 +1,57 @@
+package org.apache.stratos.cartridge.mgt.ui;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.utils.ServerConstants;
+
+import com.google.gson.Gson;
+
+public class RepoNotificationServlet extends HttpServlet {
+
+ private static final long serialVersionUID = 4315990619456849911L;
+ private static final Log log = LogFactory
+ .getLog(RepoNotificationServlet.class);
+
+ public RepoNotificationServlet() {
+ }
+
+ @Override
+ public void doPost(HttpServletRequest request, HttpServletResponse response) {
+ String payload = request.getParameter("payload");
+ log.info(" repository payload received ");
+
+ String repositoryURL;
+
+ Gson gson = new Gson();
+ Payload p = gson.fromJson(payload, Payload.class);
+ repositoryURL = p.getRepository().getUrl();
+ try {
+ String backendServerURL = CarbonUIUtil.getServerURL(
+ getServletContext(), request.getSession());
+ ConfigurationContext configContext = (ConfigurationContext) getServletContext()
+ .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+ String cookie = (String) request.getSession().getAttribute(
+ ServerConstants.ADMIN_SERVICE_COOKIE);
+ new RepoNotificationClient(cookie, backendServerURL, configContext,
+ request.getLocale()).synchronize(repositoryURL);
+ } catch (Exception e) {
+ log.error("Exception is occurred in synchronize, Reason : "
+ + e.getMessage());
+ }
+
+ }
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) {
+
+ this.doPost(req, res);
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/Repository.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/Repository.java b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/Repository.java
new file mode 100644
index 0000000..3275e83
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/Repository.java
@@ -0,0 +1,14 @@
+package org.apache.stratos.cartridge.mgt.ui;
+
+public class Repository {
+ private String url;
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/internal/CartridgeManagementUIActivator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/internal/CartridgeManagementUIActivator.java b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/internal/CartridgeManagementUIActivator.java
new file mode 100644
index 0000000..364c5e7
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/java/org/apache/stratos/cartridge/mgt/ui/internal/CartridgeManagementUIActivator.java
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.cartridge.mgt.ui.internal;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.wso2.carbon.utils.CarbonUtils;
+
+/**
+ * Activator for the Cartridge Management Bundle
+ */
+public class CartridgeManagementUIActivator implements BundleActivator {
+
+ private static final Log log = LogFactory.getLog(CartridgeManagementUIActivator.class);
+
+ public void start(final BundleContext bundleContext) {
+
+ if (!CarbonUtils.isRunningInStandaloneMode()) {
+ // uninstall this component
+ Thread th = new Thread() {
+ public void run() {
+ try {
+ bundleContext.getBundle().uninstall();
+ } catch (Throwable e) {
+ log.warn("Error occurred while uninstalling cartridge-mgt UI bundle", e);
+ }
+ }
+ };
+ try {
+ th.join();
+ } catch (InterruptedException ignored) {
+ }
+ th.start();
+ }
+ }
+
+ public void stop(BundleContext bundleContext) {
+ // No implementation required for this method
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/META-INF/component.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/META-INF/component.xml b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/META-INF/component.xml
new file mode 100644
index 0000000..aa15795
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/META-INF/component.xml
@@ -0,0 +1,103 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<component xmlns="http://products.wso2.org/carbon">
+ <menus>
+ <menu>
+ <id>available_cartridges_menu</id>
+ <i18n-key>cartridge.available.services.menu</i18n-key>
+ <i18n-bundle>org.apache.stratos.cartridge.mgt.ui.i18n.Resources</i18n-bundle>
+ <parent-menu>manage_menu</parent-menu>
+ <link>#</link>
+ <region>region1</region>
+ <order>1</order>
+ <icon>../cartridge-mgt/images/cartridge.png</icon>
+ <style-class>home</style-class>
+ <require-permission>/permission/admin/manage/cartridges</require-permission>
+ <require-not-super-tenant>true</require-not-super-tenant>
+ </menu>
+ <menu>
+ <id>available_multitenant_cartridges</id>
+ <i18n-key>cartridges.available.multitenant</i18n-key>
+ <i18n-bundle>org.apache.stratos.cartridge.mgt.ui.i18n.Resources</i18n-bundle>
+ <parent-menu>available_cartridges_menu</parent-menu>
+ <link>../cartridge-mgt/available_cartridges.jsp</link>
+ <region>region1</region>
+ <order>2</order>
+ <icon>../cartridge-mgt/images/list.gif</icon>
+ <style-class>home</style-class>
+ <require-permission>/permission/admin/manage/cartridges</require-permission>
+ <require-not-super-tenant>true</require-not-super-tenant>
+ </menu>
+ <menu>
+ <id>available_singletenant_cartridges</id>
+ <i18n-key>cartridges.available.singletenant</i18n-key>
+ <i18n-bundle>org.apache.stratos.cartridge.mgt.ui.i18n.Resources</i18n-bundle>
+ <parent-menu>available_cartridges_menu</parent-menu>
+ <link>../cartridge-mgt/available_cartridges.jsp</link>
+ <region>region1</region>
+ <order>3</order>
+ <icon>../cartridge-mgt/images/list.gif</icon>
+ <style-class>home</style-class>
+ <require-permission>/permission/admin/manage/cartridges</require-permission>
+ <require-not-super-tenant>true</require-not-super-tenant>
+ </menu>
+ <menu>
+ <id>subscribed_cartridges_menu</id>
+ <i18n-key>cartridge.subscribed.services.menu</i18n-key>
+ <i18n-bundle>org.apache.stratos.cartridge.mgt.ui.i18n.Resources</i18n-bundle>
+ <parent-menu>manage_menu</parent-menu>
+ <link>#</link>
+ <region>region1</region>
+ <order>4</order>
+ <icon>../cartridge-mgt/images/cartridge.png</icon>
+ <style-class>home</style-class>
+ <require-permission>/permission/admin/manage/cartridges</require-permission>
+ <require-not-super-tenant>true</require-not-super-tenant>
+ </menu>
+ <menu>
+ <id>subscribed_cartridges</id>
+ <i18n-key>cartridges.subscribed.list</i18n-key>
+ <i18n-bundle>org.apache.stratos.cartridge.mgt.ui.i18n.Resources</i18n-bundle>
+ <parent-menu>subscribed_cartridges_menu</parent-menu>
+ <link>../cartridge-mgt/subscribed_cartridges.jsp</link>
+ <region>region1</region>
+ <order>5</order>
+ <icon>../cartridge-mgt/images/list.gif</icon>
+ <style-class>home</style-class>
+ <require-permission>/permission/admin/manage/cartridges</require-permission>
+ <require-not-super-tenant>true</require-not-super-tenant>
+ </menu>
+ </menus>
+ <servlets>
+ <servlet id="RepoNotificationServlet">
+ <servlet-name>RepoNotificationServlet</servlet-name>
+ <url-pattern>/repo_notification</url-pattern>
+ <display-name>Repository Notification Servlet</display-name>
+ <servlet-class>org.apache.stratos.cartridge.mgt.ui.RepoNotificationServlet</servlet-class>
+ </servlet>
+ </servlets>
+ <framework-configuration>
+ <bypass>
+ <authentication>
+ <link>/repo_notification</link>
+ </authentication>
+ </bypass>
+ </framework-configuration>
+</component>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/org/apache/stratos/cartridge/mgt/ui/i18n/Resources.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/org/apache/stratos/cartridge/mgt/ui/i18n/Resources.properties b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/org/apache/stratos/cartridge/mgt/ui/i18n/Resources.properties
new file mode 100644
index 0000000..d8d8ed1
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/org/apache/stratos/cartridge/mgt/ui/i18n/Resources.properties
@@ -0,0 +1,96 @@
+list=List
+
+remote.error=Error connecting to back-end service.
+notsubscribed.error=You have not subscribed to {0}
+
+cartridge.information=Cartridge Information
+cartridge.connect.information=Connect Cartridge Information
+cartridge.available.services.menu=Available Cartridges
+cartridge.subscribed.services.menu=Subscribed Cartridges
+cartridges=Cartridges
+cartridges.available.multitenant=Multi-Tenant Cartridges
+cartridges.available.singletenant=Single-Tenant Cartridges
+cartridges.subscribed.list=List Cartridges
+cartrigdes.available.header=Available Cartridges
+cartrigdes.subscribed.header=Subscribed Cartridges
+cartridge.display.name=Cartridge Name
+cartridge.version=Version
+cartridge.description=Description
+cartridge.tenancymodel=Tenancy Model
+search.cartrigdes=Search Cartridges
+subscribe.new.cartridge=Subscribe to a New Cartridge
+subscribe.to=Subscribe to {0} Cartridge
+subscribed.cartridges=Subscribed cartridges
+no.subscribed.cartridges=There are no Subscribed cartridges
+no.cartridges.found=No Cartridges Found
+already.subscribed=Already Subscribed
+
+cartridge.notregistered=Cartridge {0} is not registered
+cartridge.invalid.alias=The provided cartridge alias is not valid. The alias can contain only lowercase characters and numbers.
+cartridge.already.subscribed=You have already subscribed for cartridge type {0}
+cartridge.alias.duplicate=Duplicate cartridge alias {0}
+
+policy.error=Could not load policy.
+
+ip=IP
+mapdomain.information=Map Domain Information
+mapdomain.to=Map Domain to Alias
+mapdomain=Map Domain
+removedomain=Remove Domain
+mappeddomain=Mapped Domain
+cannot.mapdomain=Map Domain failed
+cannot.removedomain=Mapped Domain removal failed
+domainmapping.exists.error=Provided domain mapping {0} already exists
+
+syncrepo=Synchronize
+cannot.syncrepo=Synchronization failed
+
+repository.information=Git Repository Information
+repository.required=An external repository required
+repository.credentials.required=Username and Password are required for the repository: {0}
+repository.transport.error=Error connecting to the repository: {0}
+repository.invalid.error=Invalid repository: {0}
+
+select.cartridge.file=Select the file to upload
+invalid.cartridge.file=Selected file is invalid
+cartridge.app=Cartridge Application
+upload.application=Upload Applications
+app.archiveapp=Upload new applications
+upload=Upload
+cancel=Cancel
+subscribe=Subscribe
+unsubscribe=Unsubscribe
+url=Access URL(s)
+repo.url=Repository URL
+upload.apps=Upload Apps
+policy=Policy
+
+type=Type
+status=Status
+instance.count=Running Instances
+alias=Alias
+action=Action
+search=Search
+
+username=Username
+password=Password
+
+next=next
+prev=prev
+
+appmgt.add.app.menu=Add
+appmgt.listservices.menu=List
+appmgt.services.menu=Cartridge Applications
+select.cartridge=Select a Cartridge
+no.selected.cartridge=Please select a cartridge
+cartridge=Cartridge
+
+successfully.subscribed=Successfully subscribed.
+
+cartridge.unsubscribe.prompt=Are you sure you want to unsubscribe?
+
+cannot.testrepo=An error occurred when testing repository connection.
+cannot.list.available.cartridges=An error occurred when getting available cartridges.
+cannot.list.subscribed.cartridges=An error occurred when getting subscribed cartridges.
+cannot.unsubscribe=Unsubscribe unsuccessful
+cannot.subscribe=Subscribe unsuccessful
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/available_cartridges.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/available_cartridges.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/available_cartridges.jsp
new file mode 100644
index 0000000..b854937
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/available_cartridges.jsp
@@ -0,0 +1,188 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
+<%@ page import="org.wso2.carbon.CarbonConstants"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
+<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
+<%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient"%>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.CartridgeWrapper"%>
+<%@ page import="org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceADCExceptionException"%>
+<%@ page import="java.text.SimpleDateFormat"%>
+<%@ page import="java.util.ResourceBundle"%>
+<%@ page import="java.util.ArrayList"%>
+
+<jsp:include page="../dialog/display_messages.jsp" />
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext =
+ (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ CartridgeAdminClient client;
+ Cartridge[] cartridges = null;
+
+ String item = request.getParameter("item");
+ boolean multiTenant = "available_multitenant_cartridges".equals(item);
+
+ int numberOfPages = 0;
+ String pageNumber = request.getParameter("pageNumber");
+ if (pageNumber == null) {
+ pageNumber = "0";
+ }
+ int pageNumberInt = 0;
+ try {
+ pageNumberInt = Integer.parseInt(pageNumber);
+ } catch (NumberFormatException ignored) {
+ }
+
+ String cartridgeSearchString = request.getParameter("cartridgeSearchString");
+ if (cartridgeSearchString == null) {
+ cartridgeSearchString = "";
+ }
+
+ try {
+ client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
+ CartridgeWrapper cartridgeWrapper = client.getPagedAvailableCartridges(cartridgeSearchString, pageNumberInt, multiTenant);
+ if (cartridgeWrapper != null) {
+ numberOfPages = cartridgeWrapper.getNumberOfPages();
+ cartridges = cartridgeWrapper.getCartridges();
+ }
+ } catch (Exception e) {
+ response.setStatus(500);
+ CarbonUIMessage uiMsg = new CarbonUIMessage(CarbonUIMessage.ERROR, e.getMessage(), e);
+ session.setAttribute(CarbonUIMessage.ID, uiMsg);
+%>
+<jsp:include page="../admin/error.jsp" />
+<%
+ return;
+ }
+
+ ResourceBundle bundle = ResourceBundle.getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
+%>
+
+<fmt:bundle basename="org.apache.stratos.cartridge.mgt.ui.i18n.Resources">
+ <carbon:breadcrumb label="cartrigdes.available.header" resourceBundle="org.apache.stratos.cartridge.mgt.ui.i18n.Resources"
+ topPage="false" request="<%=request%>" />
+
+ <script type="text/javascript">
+ function searchCartridges() {
+ document.searchForm.submit();
+ }
+ </script>
+
+ <div id="middle">
+ <h2>
+ <fmt:message key="cartrigdes.available.header" />
+ </h2>
+
+ <div id="workArea">
+ <form action="available_cartridges.jsp" name="searchForm">
+ <table class="styledLeft">
+ <tr>
+ <td>
+ <table style="border: 0;">
+ <tbody>
+ <tr style="border: 0;">
+ <td style="border: 0;"><fmt:message key="search.cartrigdes" /> <input type="text"
+ name="cartridgeSearchString" value="<%=cartridgeSearchString != null ? cartridgeSearchString : ""%>" />
+ </td>
+ <td style="border: 0;"><a class="icon-link" href="#" style="background-image: url(images/search.gif);"
+ onclick="searchCartridges(); return false;" alt="<fmt:message key="search"/>"> </a></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <input type="hidden" name="item" value="<%=item%>" />
+ </form>
+
+ <p> </p>
+ <%
+ if (cartridges != null) {
+ String parameters = "cartridgeSearchString=" + cartridgeSearchString + "&item=" + item;
+ %>
+
+ <carbon:paginator pageNumber="<%=pageNumberInt%>" numberOfPages="<%=numberOfPages%>" page="available_cartridges.jsp"
+ pageNumberParameterName="pageNumber" resourceBundle="org.apache.stratos.cartridge.mgt.ui.i18n.Resources" prevKey="prev"
+ nextKey="next" parameters="<%=parameters%>" />
+ <p> </p>
+
+ <form name="cartridgesForm" method="post">
+ <input type="hidden" name="pageNumber" value="<%=pageNumber%>" />
+ <table class="styledLeft" id="cartridgesTable" style="width: 100%">
+ <thead>
+ <tr>
+ <th style="width: 15%"><fmt:message key="cartridge.display.name" /></th>
+ <th style="width: 80px"><fmt:message key="cartridge.version" /></th>
+ <th><fmt:message key="cartridge.description" /></th>
+ <th style="width: 15%"><fmt:message key="action" /></th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <%
+ for (Cartridge cartridge : cartridges) {
+ boolean subscribed = "SUBSCRIBED".equals(cartridge.getStatus());
+ %>
+
+ <tr>
+ <td><%=(cartridge.getDisplayName() != null ? cartridge.getDisplayName() : "")%></td>
+ <td><%=(cartridge.getVersion() != null ? cartridge.getVersion() : "")%></td>
+ <td><%=(cartridge.getDescription() != null ? cartridge.getDescription() : "")%></td>
+ <td>
+ <% if (!subscribed) { %>
+ <a href="./subscribe.jsp?cartridgeType=<%=cartridge.getCartridgeType()%>&cartridgeProvider=<%=cartridge.getProvider()%>&multiTenant=<%=cartridge.getMultiTenant()%>&item=<%=item%>"
+ style="background-image: url(images/subscribe.gif);" class="icon-link"> <fmt:message key="subscribe" /></a>
+ <% } else { %>
+ <fmt:message key="already.subscribed" />
+ <% } %>
+ </td>
+ </tr>
+ <%
+ }
+ %>
+ </tbody>
+ </table>
+ </form>
+ <p> </p>
+ <carbon:paginator pageNumber="<%=pageNumberInt%>" numberOfPages="<%=numberOfPages%>" page="available_cartridges.jsp"
+ pageNumberParameterName="pageNumber" resourceBundle="org.apache.stratos.cartridge.mgt.ui.i18n.Resources" prevKey="prev"
+ nextKey="next" parameters="<%=parameters%>" />
+ <%
+ } else {
+ %>
+ <b><fmt:message key="no.cartridges.found" /></b>
+ <%
+ }
+ %>
+ </div>
+ </div>
+ <script type="text/javascript">
+ alternateTableRows('cartridgesTable', 'tableEvenRow', 'tableOddRow');
+ </script>
+</fmt:bundle>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/docs/userguide.html
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/docs/userguide.html b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/docs/userguide.html
new file mode 100644
index 0000000..326738d
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/docs/userguide.html
@@ -0,0 +1,41 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Cartridge Management - User Guide</title>
+<link href="../../admin/css/documentation.css" rel="stylesheet"
+ type="text/css" media="all" />
+</head>
+
+<body>
+
+
+ <h1>Cartridge Management</h1>
+
+
+ <p>
+ Please refer WSO2 Stratos 2.0 Wiki <a
+ href="http://docs.wso2.org/wiki/display/Stratos200/GUI+User+Guide">GUI
+ User Guide</a> for more information.
+ </p>
+
+
+</body>
+
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/ajax-loading.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/ajax-loading.gif b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/ajax-loading.gif
new file mode 100644
index 0000000..168d273
Binary files /dev/null and b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/ajax-loading.gif differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/cartridge.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/cartridge.png b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/cartridge.png
new file mode 100644
index 0000000..3cef1d5
Binary files /dev/null and b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/cartridge.png differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/list.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/list.gif b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/list.gif
new file mode 100644
index 0000000..638d8ab
Binary files /dev/null and b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/list.gif differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/search.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/search.gif b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/search.gif
new file mode 100644
index 0000000..86f81ed
Binary files /dev/null and b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/search.gif differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/subscribe.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/subscribe.gif b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/subscribe.gif
new file mode 100644
index 0000000..3b0b695
Binary files /dev/null and b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/subscribe.gif differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/unsubscribe.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/unsubscribe.png b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/unsubscribe.png
new file mode 100644
index 0000000..0c71c3c
Binary files /dev/null and b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/images/unsubscribe.png differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/js/common.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/js/common.js b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/js/common.js
new file mode 100644
index 0000000..76910b2
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/js/common.js
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2013, WSO2, Inc. http://wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+function setStratosFormSubmitFunction(form, validateFunction,
+ ajaxprocessorPage, successPage, commandButton) {
+ jQuery(form).submit(
+ function(event) {
+ if (validateFunction && typeof validateFunction == "function"
+ && !validateFunction()) {
+ return false;
+ }
+
+ postToBEService(ajaxprocessorPage, jQuery(form).serialize(), successPage, commandButton);
+ return false;
+ });
+}
+
+function postToBEService(ajaxprocessorPage, data, successPage, commandButton, validateFunction) {
+ if (validateFunction && typeof validateFunction == "function"
+ && !validateFunction()) {
+ return;
+ }
+ showWait(commandButton);
+ jQuery.post(ajaxprocessorPage, data).done(
+ function(data, textStatus, jqXHR) {
+ stopWait(commandButton);
+ var msg = jQuery(jqXHR.responseText).filter('#responseMsg')
+ .text();
+ if (successPage) {
+ CARBON.showInfoDialog(msg, function() {
+ location.href = successPage;
+ });
+ } else {
+ CARBON.showInfoDialog(msg);
+ }
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ var msg = jQuery(jqXHR.responseText).filter('#responseMsg').text();
+ if (msg && msg.length > 0) {
+ CARBON.showErrorDialog(msg);
+ } else {
+ // Ignore
+ // Refer SPI-310
+ }
+ }).complete(function() {
+ stopWait(commandButton);
+ });
+}
+
+function showWait(commandButton) {
+ jQuery.blockUI('Please wait...');
+ if (commandButton) {
+ jQuery(commandButton).attr("disabled", "disabled");
+ }
+ //jQuery("body").css("cursor", "wait");
+}
+
+function stopWait(commandButton) {
+ jQuery.unblockUI();
+ if (commandButton) {
+ jQuery(commandButton).removeAttr("disabled");
+ }
+ //jQuery("body").css("cursor", "auto");
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/js/jquery.blockUI-1.33.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/js/jquery.blockUI-1.33.js b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/js/jquery.blockUI-1.33.js
new file mode 100644
index 0000000..2b0a360
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/js/jquery.blockUI-1.33.js
@@ -0,0 +1,361 @@
+/*
+ * jQuery blockUI plugin
+ * Version 1.33 (09/14/2007)
+ * @requires jQuery v1.1.1
+ *
+ * $Id$
+ *
+ * Examples at: http://malsup.com/jquery/block/
+ * Copyright (c) 2007 M. Alsup
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+ (function($) {
+/**
+ * blockUI provides a mechanism for blocking user interaction with a page (or parts of a page).
+ * This can be an effective way to simulate synchronous behavior during ajax operations without
+ * locking the browser. It will prevent user operations for the current page while it is
+ * active ane will return the page to normal when it is deactivate. blockUI accepts the following
+ * two optional arguments:
+ *
+ * message (String|Element|jQuery): The message to be displayed while the UI is blocked. The message
+ * argument can be a plain text string like "Processing...", an HTML string like
+ * "<h1><img src="busy.gif" /> Please wait...</h1>", a DOM element, or a jQuery object.
+ * The default message is "<h1>Please wait...</h1>"
+ *
+ * css (Object): Object which contains css property/values to override the default styles of
+ * the message. Use this argument if you wish to override the default
+ * styles. The css Object should be in a format suitable for the jQuery.css
+ * function. For example:
+ * $.blockUI({
+ * backgroundColor: '#ff8',
+ * border: '5px solid #f00,
+ * fontWeight: 'bold'
+ * });
+ *
+ * The default blocking message used when blocking the entire page is "<h1>Please wait...</h1>"
+ * but this can be overridden by assigning a value to $.blockUI.defaults.pageMessage in your
+ * own code. For example:
+ *
+ * $.blockUI.defaults.pageMessage = "<h1>Bitte Wartezeit</h1>";
+ *
+ * The default message styling can also be overridden. For example:
+ *
+ * $.extend($.blockUI.defaults.pageMessageCSS, { color: '#00a', backgroundColor: '#0f0' });
+ *
+ * The default styles work well for simple messages like "Please wait", but for longer messages
+ * style overrides may be necessary.
+ *
+ * @example $.blockUI();
+ * @desc prevent user interaction with the page (and show the default message of 'Please wait...')
+ *
+ * @example $.blockUI( { backgroundColor: '#f00', color: '#fff'} );
+ * @desc prevent user interaction and override the default styles of the message to use a white on red color scheme
+ *
+ * @example $.blockUI('Processing...');
+ * @desc prevent user interaction and display the message "Processing..." instead of the default message
+ *
+ * @name blockUI
+ * @param String|jQuery|Element message Message to display while the UI is blocked
+ * @param Object css Style object to control look of the message
+ * @cat Plugins/blockUI
+ */
+$.blockUI = function(msg, css, opts) {
+ $.blockUI.impl.install(window, msg, css, opts);
+};
+
+// expose version number so other plugins can interogate
+$.blockUI.version = 1.33;
+
+/**
+ * unblockUI removes the UI block that was put in place by blockUI
+ *
+ * @example $.unblockUI();
+ * @desc unblocks the page
+ *
+ * @name unblockUI
+ * @cat Plugins/blockUI
+ */
+$.unblockUI = function(opts) {
+ $.blockUI.impl.remove(window, opts);
+};
+
+/**
+ * Blocks user interaction with the selected elements. (Hat tip: Much of
+ * this logic comes from Brandon Aaron's bgiframe plugin. Thanks, Brandon!)
+ * By default, no message is displayed when blocking elements.
+ *
+ * @example $('div.special').block();
+ * @desc prevent user interaction with all div elements with the 'special' class.
+ *
+ * @example $('div.special').block('Please wait');
+ * @desc prevent user interaction with all div elements with the 'special' class
+ * and show a message over the blocked content.
+ *
+ * @name block
+ * @type jQuery
+ * @param String|jQuery|Element message Message to display while the element is blocked
+ * @param Object css Style object to control look of the message
+ * @cat Plugins/blockUI
+ */
+$.fn.block = function(msg, css, opts) {
+ return this.each(function() {
+ if (!this.$pos_checked) {
+ if ($.css(this,"position") == 'static')
+ this.style.position = 'relative';
+ if ($.browser.msie) this.style.zoom = 1; // force 'hasLayout' in IE
+ this.$pos_checked = 1;
+ }
+ $.blockUI.impl.install(this, msg, css, opts);
+ });
+};
+
+/**
+ * Unblocks content that was blocked by "block()"
+ *
+ * @example $('div.special').unblock();
+ * @desc unblocks all div elements with the 'special' class.
+ *
+ * @name unblock
+ * @type jQuery
+ * @cat Plugins/blockUI
+ */
+$.fn.unblock = function(opts) {
+ return this.each(function() {
+ $.blockUI.impl.remove(this, opts);
+ });
+};
+
+/**
+ * displays the first matched element in a "display box" above a page overlay.
+ *
+ * @example $('#myImage').displayBox();
+ * @desc displays "myImage" element in a box
+ *
+ * @name displayBox
+ * @type jQuery
+ * @cat Plugins/blockUI
+ */
+$.fn.displayBox = function(css, fn, isFlash) {
+ var msg = this[0];
+ if (!msg) return;
+ var $msg = $(msg);
+ css = css || {};
+
+ var w = $msg.width() || $msg.attr('width') || css.width || $.blockUI.defaults.displayBoxCSS.width;
+ var h = $msg.height() || $msg.attr('height') || css.height || $.blockUI.defaults.displayBoxCSS.height ;
+ if (w[w.length-1] == '%') {
+ var ww = document.documentElement.clientWidth || document.body.clientWidth;
+ w = parseInt(w) || 100;
+ w = (w * ww) / 100;
+ }
+ if (h[h.length-1] == '%') {
+ var hh = document.documentElement.clientHeight || document.body.clientHeight;
+ h = parseInt(h) || 100;
+ h = (h * hh) / 100;
+ }
+
+ var ml = '-' + parseInt(w)/2 + 'px';
+ var mt = '-' + parseInt(h)/2 + 'px';
+
+ // supress opacity on overlay if displaying flash content on mac/ff platform
+ var ua = navigator.userAgent.toLowerCase();
+ var opts = {
+ displayMode: fn || 1,
+ noalpha: isFlash && /mac/.test(ua) && /firefox/.test(ua)
+ };
+
+ $.blockUI.impl.install(window, msg, { width: w, height: h, marginTop: mt, marginLeft: ml }, opts);
+};
+
+
+// override these in your code to change the default messages and styles
+$.blockUI.defaults = {
+ // the message displayed when blocking the entire page
+ pageMessage: '<h1>Please wait...</h1>',
+ // the message displayed when blocking an element
+ elementMessage: '', // none
+ // styles for the overlay iframe
+ overlayCSS: { backgroundColor: '#fff', opacity: '0.5' },
+ // styles for the message when blocking the entire page
+ pageMessageCSS: { width:'250px', margin:'-50px 0 0 -125px', top:'50%', left:'50%', textAlign:'center', color:'#000', backgroundColor:'#fff', border:'3px solid #aaa' },
+ // styles for the message when blocking an element
+ elementMessageCSS: { width:'250px', padding:'10px', textAlign:'center', backgroundColor:'#fff'},
+ // styles for the displayBox
+ displayBoxCSS: { width: '400px', height: '400px', top:'50%', left:'50%' },
+ // allow body element to be stetched in ie6
+ ie6Stretch: 1,
+ // supress tab nav from leaving blocking content?
+ allowTabToLeave: 0,
+ // Title attribute for overlay when using displayBox
+ closeMessage: 'Click to close',
+ // use fadeOut effect when unblocking (can be overridden on unblock call)
+ fadeOut: 1,
+ // fadeOut transition time in millis
+ fadeTime: 400
+};
+
+// the gory details
+$.blockUI.impl = {
+ box: null,
+ boxCallback: null,
+ pageBlock: null,
+ pageBlockEls: [],
+ op8: window.opera && window.opera.version() < 9,
+ ie6: $.browser.msie && /MSIE 6.0/.test(navigator.userAgent),
+ install: function(el, msg, css, opts) {
+ opts = opts || {};
+ this.boxCallback = typeof opts.displayMode == 'function' ? opts.displayMode : null;
+ this.box = opts.displayMode ? msg : null;
+ var full = (el == window);
+
+ // use logical settings for opacity support based on browser but allow overrides via opts arg
+ var noalpha = this.op8 || $.browser.mozilla && /Linux/.test(navigator.platform);
+ if (typeof opts.alphaOverride != 'undefined')
+ noalpha = opts.alphaOverride == 0 ? 1 : 0;
+
+ if (full && this.pageBlock) this.remove(window, {fadeOut:0});
+ // check to see if we were only passed the css object (a literal)
+ if (msg && typeof msg == 'object' && !msg.jquery && !msg.nodeType) {
+ css = msg;
+ msg = null;
+ }
+ msg = msg ? (msg.nodeType ? $(msg) : msg) : full ? $.blockUI.defaults.pageMessage : $.blockUI.defaults.elementMessage;
+ if (opts.displayMode)
+ var basecss = jQuery.extend({}, $.blockUI.defaults.displayBoxCSS);
+ else
+ var basecss = jQuery.extend({}, full ? $.blockUI.defaults.pageMessageCSS : $.blockUI.defaults.elementMessageCSS);
+ css = jQuery.extend(basecss, css || {});
+ var f = ($.browser.msie) ? $('<iframe class="blockUI" style="z-index:1000;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="javascript:false;"></iframe>')
+ : $('<div class="blockUI" style="display:none"></div>');
+ var w = $('<div class="blockUI" style="z-index:1001;cursor:wait;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
+ var m = full ? $('<div class="blockUI blockMsg" style="z-index:1002;cursor:wait;padding:0;position:fixed"></div>')
+ : $('<div class="blockUI" style="display:none;z-index:1002;cursor:wait;position:absolute"></div>');
+ w.css('position', full ? 'fixed' : 'absolute');
+ if (msg) m.css(css);
+ if (!noalpha) w.css($.blockUI.defaults.overlayCSS);
+ if (this.op8) w.css({ width:''+el.clientWidth,height:''+el.clientHeight }); // lame
+ if ($.browser.msie) f.css('opacity','0.0');
+
+ $([f[0],w[0],m[0]]).appendTo(full ? 'body' : el);
+
+ // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
+ var expr = $.browser.msie && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
+ if (this.ie6 || expr) {
+ // stretch content area if it's short
+ if (full && $.blockUI.defaults.ie6Stretch && $.boxModel)
+ $('html,body').css('height','100%');
+
+ // fix ie6 problem when blocked element has a border width
+ if ((this.ie6 || !$.boxModel) && !full) {
+ var t = this.sz(el,'borderTopWidth'), l = this.sz(el,'borderLeftWidth');
+ var fixT = t ? '(0 - '+t+')' : 0;
+ var fixL = l ? '(0 - '+l+')' : 0;
+ }
+
+ // simulate fixed position
+ $.each([f,w,m], function(i,o) {
+ var s = o[0].style;
+ s.position = 'absolute';
+ if (i < 2) {
+ full ? s.setExpression('height','document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + "px"')
+ : s.setExpression('height','this.parentNode.offsetHeight + "px"');
+ full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
+ : s.setExpression('width','this.parentNode.offsetWidth + "px"');
+ if (fixL) s.setExpression('left', fixL);
+ if (fixT) s.setExpression('top', fixT);
+ }
+ else {
+ if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
+ s.marginTop = 0;
+ }
+ });
+ }
+ if (opts.displayMode) {
+ w.css('cursor','default').attr('title', $.blockUI.defaults.closeMessage);
+ m.css('cursor','default');
+ $([f[0],w[0],m[0]]).removeClass('blockUI').addClass('displayBox');
+ $().click($.blockUI.impl.boxHandler).bind('keypress', $.blockUI.impl.boxHandler);
+ }
+ else
+ this.bind(1, el);
+ m.append(msg).show();
+ if (msg.jquery) msg.show();
+ if (opts.displayMode) return;
+ if (full) {
+ this.pageBlock = m[0];
+ this.pageBlockEls = $(':input:enabled:visible',this.pageBlock);
+ setTimeout(this.focus, 20);
+ }
+ else this.center(m[0]);
+ },
+ remove: function(el, opts) {
+ var o = $.extend({}, $.blockUI.defaults, opts);
+ this.bind(0, el);
+ var full = el == window;
+ var els = full ? $('body').children().filter('.blockUI') : $('.blockUI', el);
+ if (full) this.pageBlock = this.pageBlockEls = null;
+
+ if (o.fadeOut) {
+ els.fadeOut(o.fadeTime, function() {
+ if (this.parentNode) this.parentNode.removeChild(this);
+ });
+ }
+ else els.remove();
+ },
+ boxRemove: function(el) {
+ $().unbind('click',$.blockUI.impl.boxHandler).unbind('keypress', $.blockUI.impl.boxHandler);
+ if (this.boxCallback)
+ this.boxCallback(this.box);
+ $('body .displayBox').hide().remove();
+ },
+ // event handler to suppress keyboard/mouse events when blocking
+ handler: function(e) {
+ if (e.keyCode && e.keyCode == 9) {
+ if ($.blockUI.impl.pageBlock && !$.blockUI.defaults.allowTabToLeave) {
+ var els = $.blockUI.impl.pageBlockEls;
+ var fwd = !e.shiftKey && e.target == els[els.length-1];
+ var back = e.shiftKey && e.target == els[0];
+ if (fwd || back) {
+ setTimeout(function(){$.blockUI.impl.focus(back)},10);
+ return false;
+ }
+ }
+ }
+ if ($(e.target).parents('div.blockMsg').length > 0)
+ return true;
+ return $(e.target).parents().children().filter('div.blockUI').length == 0;
+ },
+ boxHandler: function(e) {
+ if ((e.keyCode && e.keyCode == 27) || (e.type == 'click' && $(e.target).parents('div.blockMsg').length == 0))
+ $.blockUI.impl.boxRemove();
+ return true;
+ },
+ // bind/unbind the handler
+ bind: function(b, el) {
+ var full = el == window;
+ // don't bother unbinding if there is nothing to unbind
+ if (!b && (full && !this.pageBlock || !full && !el.$blocked)) return;
+ if (!full) el.$blocked = b;
+ var $e = $(el).find('a,:input');
+ $.each(['mousedown','mouseup','keydown','keypress','click'], function(i,o) {
+ $e[b?'bind':'unbind'](o, $.blockUI.impl.handler);
+ });
+ },
+ focus: function(back) {
+ if (!$.blockUI.impl.pageBlockEls) return;
+ var e = $.blockUI.impl.pageBlockEls[back===true ? $.blockUI.impl.pageBlockEls.length-1 : 0];
+ if (e) e.focus();
+ },
+ center: function(el) {
+ var p = el.parentNode, s = el.style;
+ var l = ((p.offsetWidth - el.offsetWidth)/2) - this.sz(p,'borderLeftWidth');
+ var t = ((p.offsetHeight - el.offsetHeight)/2) - this.sz(p,'borderTopWidth');
+ s.left = l > 0 ? (l+'px') : '0';
+ s.top = t > 0 ? (t+'px') : '0';
+ },
+ sz: function(el, p) { return parseInt($.css(el,p))||0; }
+};
+
+})(jQuery);
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/list.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/list.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/list.jsp
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/map_domain.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/map_domain.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/map_domain.jsp
new file mode 100644
index 0000000..134b7b2
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/map_domain.jsp
@@ -0,0 +1,120 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
+<%@ page import="org.wso2.carbon.CarbonConstants"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
+<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
+<%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient"%>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
+<%@ page import="java.text.SimpleDateFormat"%>
+<%@ page import="java.util.ResourceBundle"%>
+<jsp:include page="../dialog/display_messages.jsp" />
+
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+ String cartridgeAlias = request.getParameter("cartridge_alias");
+ String domain = request.getParameter("domain");
+
+ if (cartridgeAlias == null || cartridgeAlias.trim().length() == 0) {
+ response.setStatus(500);
+ CarbonUIMessage uiMsg = new CarbonUIMessage(
+ CarbonUIMessage.ERROR, "Cartridge Alias Not Specified");
+ session.setAttribute(CarbonUIMessage.ID, uiMsg);
+%>
+<jsp:include page="../admin/error.jsp" />
+<%
+ return;
+ }
+%>
+<fmt:bundle basename="org.apache.stratos.cartridge.mgt.ui.i18n.Resources">
+ <carbon:breadcrumb label="mapdomain" resourceBundle="org.apache.stratos.cartridge.mgt.ui.i18n.Resources" topPage="true"
+ request="<%=request%>" />
+ <div id="middle">
+ <h2>
+ <fmt:message key="mapdomain.to" />
+ <%=cartridgeAlias%></h2>
+ <div id="workArea">
+ <form id="mapDomainForm" name="mapDomain">
+ <input name="cartridge_alias" type="hidden" value="<%=cartridgeAlias%>" />
+ <table id="tblMapDomain" width="100%" class="styledLeft">
+ <thead>
+ <tr>
+ <th><fmt:message key="mapdomain.information" /></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="nopadding">
+ <table class="normal-nopadding" cellspacing="0">
+ <tbody>
+ <tr>
+ <td style="width: 30%"><label>Cartridge Alias</label><span
+ class="required">*</span></td>
+ <td><span><%=cartridgeAlias%></span></td>
+ </tr>
+ <tr>
+ <td><label for="domain">Domain</label><span
+ class="required">*</span></td>
+ <td><input id="domain" name="domain" type="text"
+ style="width: 250px" maxlength="300"
+ value="<%=(domain != null ? domain : "")%>" /></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr id="buttonRow">
+ <td class="buttonRow"><input id="mapDomainSave"
+ type="submit" class="button" value="Save"> <input
+ id="mapDomainCancelButton" type="button" class="button"
+ value="Cancel" onclick="cancelMapDomain();"></td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+ </div>
+ </div>
+
+ <script type="text/javascript">
+ jQuery(document).ready(
+ function() {
+ setStratosFormSubmitFunction("#mapDomainForm", validate,
+ "map_domain_ajaxprocessor.jsp",
+ "subscribed_cartridges.jsp", "#mapDomainSave");
+ });
+
+ function validate() {
+ if (jQuery("#domain").val().length == 0) {
+ CARBON.showErrorDialog('Please enter a value for domain.');
+ return false;
+ }
+ return true;
+ }
+
+ function cancelMapDomain() {
+ location.href = "subscribed_cartridges.jsp";
+ }
+ </script>
+ <script type="text/javascript" src="js/jquery.blockUI-1.33.js"></script>
+ <script type="text/javascript" src="js/common.js"></script>
+</fmt:bundle>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/map_domain_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/map_domain_ajaxprocessor.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/map_domain_ajaxprocessor.jsp
new file mode 100644
index 0000000..0d30e7e
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/map_domain_ajaxprocessor.jsp
@@ -0,0 +1,69 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
+<%@ page import="org.wso2.carbon.CarbonConstants"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
+<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
+<%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient"%>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
+<%@ page import="java.text.SimpleDateFormat"%>
+<%@ page import="java.util.ResourceBundle"%>
+<jsp:include page="../dialog/display_messages.jsp" />
+
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+
+ ResourceBundle bundle = ResourceBundle.getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
+
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext = (ConfigurationContext) config.getServletContext().getAttribute(
+ CarbonConstants.CONFIGURATION_CONTEXT);
+
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ CartridgeAdminClient client;
+
+ String cartridgeAlias = request.getParameter("cartridge_alias");
+ String mappedDomain = request.getParameter("domain");
+ try {
+ client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
+ String host = client.addDomainMapping(mappedDomain, cartridgeAlias);
+ String message = "";
+ if (host != null) {
+ //CarbonUIMessage.sendCarbonUIMessage
+ message = "Your own domain is successfully added. Please CNAME it to system's domain: " + host + ".";
+ } //else {
+ //TODO: Handle this scenario
+ //CarbonUIMessage.sendCarbonUIMessage("Your own domain is added", CarbonUIMessage.WARNING, request);
+ //}
+%>
+<span id="responseMsg"><%=message%></span>
+<%
+ } catch (Exception e) {
+ //CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request);
+ response.setStatus(500);
+%>
+<span id="responseMsg"><%=e.getMessage()%></span>
+<%
+ }
+%>
\ No newline at end of file
[10/11] Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/remove_domain_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/remove_domain_ajaxprocessor.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/remove_domain_ajaxprocessor.jsp
new file mode 100644
index 0000000..75a0ac1
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/remove_domain_ajaxprocessor.jsp
@@ -0,0 +1,62 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
+<%@ page import="org.wso2.carbon.CarbonConstants"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
+<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
+<%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient"%>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
+<%@ page import="java.text.SimpleDateFormat"%>
+<%@ page import="java.util.ResourceBundle"%>
+<jsp:include page="../dialog/display_messages.jsp" />
+
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+
+ ResourceBundle bundle = ResourceBundle.getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
+
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext = (ConfigurationContext) config.getServletContext().getAttribute(
+ CarbonConstants.CONFIGURATION_CONTEXT);
+
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ CartridgeAdminClient client;
+
+ String cartridgeAlias = request.getParameter("cartridge_alias");
+ try {
+ client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
+ client.removeDomainMapping(cartridgeAlias);
+ //CarbonUIMessage.sendCarbonUIMessage("Domain removed.", CarbonUIMessage.INFO, request);
+ String message = "Domain removed.";
+%>
+<span id="responseMsg"><%=message%></span>
+<%
+ } catch (Exception e) {
+ //CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request);
+ response.setStatus(500);
+%>
+<span id="responseMsg"><%=e.getMessage()%></span>
+<%
+ }
+%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/XMLSchema.dtd
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/XMLSchema.dtd b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/XMLSchema.dtd
new file mode 100644
index 0000000..562ad3e
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/XMLSchema.dtd
@@ -0,0 +1,418 @@
+<!--
+ ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<!-- DTD for XML Schemas: Part 1: Structures
+ Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"
+ Official Location: http://www.w3.org/2001/XMLSchema.dtd -->
+<!-- $Id: XMLSchema.dtd,v 1.31 2001/10/24 15:50:16 ht Exp $ -->
+<!-- Note this DTD is NOT normative, or even definitive. --> <!--d-->
+<!-- prose copy in the structures REC is the definitive version --> <!--d-->
+<!-- (which shouldn't differ from this one except for this --> <!--d-->
+<!-- comment and entity expansions, but just in case) --> <!--d-->
+<!-- With the exception of cases with multiple namespace
+ prefixes for the XML Schema namespace, any XML document which is
+ not valid per this DTD given redefinitions in its internal subset of the
+ 'p' and 's' parameter entities below appropriate to its namespace
+ declaration of the XML Schema namespace is almost certainly not
+ a valid schema. -->
+
+<!-- The simpleType element and its constituent parts
+ are defined in XML Schema: Part 2: Datatypes -->
+<!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >
+
+<!ENTITY % p 'xs:'> <!-- can be overriden in the internal subset of a
+ schema document to establish a different
+ namespace prefix -->
+<!ENTITY % s ':xs'> <!-- if %p is defined (e.g. as foo:) then you must
+ also define %s as the suffix for the appropriate
+ namespace declaration (e.g. :foo) -->
+<!ENTITY % nds 'xmlns%s;'>
+
+<!-- Define all the element names, with optional prefix -->
+<!ENTITY % schema "%p;schema">
+<!ENTITY % complexType "%p;complexType">
+<!ENTITY % complexContent "%p;complexContent">
+<!ENTITY % simpleContent "%p;simpleContent">
+<!ENTITY % extension "%p;extension">
+<!ENTITY % element "%p;element">
+<!ENTITY % unique "%p;unique">
+<!ENTITY % key "%p;key">
+<!ENTITY % keyref "%p;keyref">
+<!ENTITY % selector "%p;selector">
+<!ENTITY % field "%p;field">
+<!ENTITY % group "%p;group">
+<!ENTITY % all "%p;all">
+<!ENTITY % choice "%p;choice">
+<!ENTITY % sequence "%p;sequence">
+<!ENTITY % any "%p;any">
+<!ENTITY % anyAttribute "%p;anyAttribute">
+<!ENTITY % attribute "%p;attribute">
+<!ENTITY % attributeGroup "%p;attributeGroup">
+<!ENTITY % include "%p;include">
+<!ENTITY % import "%p;import">
+<!ENTITY % redefine "%p;redefine">
+<!ENTITY % notation "%p;notation">
+
+<!-- annotation elements -->
+<!ENTITY % annotation "%p;annotation">
+<!ENTITY % appinfo "%p;appinfo">
+<!ENTITY % documentation "%p;documentation">
+
+<!-- Customisation entities for the ATTLIST of each element type.
+ Define one of these if your schema takes advantage of the
+ anyAttribute='##other' in the schema for schemas -->
+
+<!ENTITY % schemaAttrs ''>
+<!ENTITY % complexTypeAttrs ''>
+<!ENTITY % complexContentAttrs ''>
+<!ENTITY % simpleContentAttrs ''>
+<!ENTITY % extensionAttrs ''>
+<!ENTITY % elementAttrs ''>
+<!ENTITY % groupAttrs ''>
+<!ENTITY % allAttrs ''>
+<!ENTITY % choiceAttrs ''>
+<!ENTITY % sequenceAttrs ''>
+<!ENTITY % anyAttrs ''>
+<!ENTITY % anyAttributeAttrs ''>
+<!ENTITY % attributeAttrs ''>
+<!ENTITY % attributeGroupAttrs ''>
+<!ENTITY % uniqueAttrs ''>
+<!ENTITY % keyAttrs ''>
+<!ENTITY % keyrefAttrs ''>
+<!ENTITY % selectorAttrs ''>
+<!ENTITY % fieldAttrs ''>
+<!ENTITY % includeAttrs ''>
+<!ENTITY % importAttrs ''>
+<!ENTITY % redefineAttrs ''>
+<!ENTITY % notationAttrs ''>
+<!ENTITY % annotationAttrs ''>
+<!ENTITY % appinfoAttrs ''>
+<!ENTITY % documentationAttrs ''>
+
+<!ENTITY % complexDerivationSet "CDATA">
+ <!-- #all or space-separated list drawn from derivationChoice -->
+<!ENTITY % blockSet "CDATA">
+ <!-- #all or space-separated list drawn from
+ derivationChoice + 'substitution' -->
+
+<!ENTITY % mgs '%all; | %choice; | %sequence;'>
+<!ENTITY % cs '%choice; | %sequence;'>
+<!ENTITY % formValues '(qualified|unqualified)'>
+
+
+<!ENTITY % attrDecls '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
+
+<!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'>
+
+<!-- This is used in part2 -->
+<!ENTITY % restriction1 '((%mgs; | %group;)?)'>
+
+%xs-datatypes;
+
+<!-- the duplication below is to produce an unambiguous content model
+ which allows annotation everywhere -->
+<!ELEMENT %schema; ((%include; | %import; | %redefine; | %annotation;)*,
+ ((%simpleType; | %complexType;
+ | %element; | %attribute;
+ | %attributeGroup; | %group;
+ | %notation; ),
+ (%annotation;)*)* )>
+<!ATTLIST %schema;
+ targetNamespace %URIref; #IMPLIED
+ version CDATA #IMPLIED
+ %nds; %URIref; #FIXED 'http://www.w3.org/2001/XMLSchema'
+ xmlns CDATA #IMPLIED
+ finalDefault %complexDerivationSet; ''
+ blockDefault %blockSet; ''
+ id ID #IMPLIED
+ elementFormDefault %formValues; 'unqualified'
+ attributeFormDefault %formValues; 'unqualified'
+ xml:lang CDATA #IMPLIED
+ %schemaAttrs;>
+<!-- Note the xmlns declaration is NOT in the Schema for Schemas,
+ because at the Infoset level where schemas operate,
+ xmlns(:prefix) is NOT an attribute! -->
+<!-- The declaration of xmlns is a convenience for schema authors -->
+
+<!-- The id attribute here and below is for use in external references
+ from non-schemas using simple fragment identifiers.
+ It is NOT used for schema-to-schema reference, internal or
+ external. -->
+
+<!-- a type is a named content type specification which allows attribute
+ declarations-->
+<!-- -->
+
+<!ELEMENT %complexType; ((%annotation;)?,
+ (%simpleContent;|%complexContent;|
+ %particleAndAttrs;))>
+
+<!ATTLIST %complexType;
+ name %NCName; #IMPLIED
+ id ID #IMPLIED
+ abstract %boolean; #IMPLIED
+ final %complexDerivationSet; #IMPLIED
+ block %complexDerivationSet; #IMPLIED
+ mixed (true|false) 'false'
+ %complexTypeAttrs;>
+
+<!-- particleAndAttrs is shorthand for a root type -->
+<!-- mixed is disallowed if simpleContent, overriden if complexContent
+ has one too. -->
+
+<!-- If anyAttribute appears in one or more referenced attributeGroups
+ and/or explicitly, the intersection of the permissions is used -->
+
+<!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))>
+<!ATTLIST %complexContent;
+ mixed (true|false) #IMPLIED
+ id ID #IMPLIED
+ %complexContentAttrs;>
+
+<!-- restriction should use the branch defined above, not the simple
+ one from part2; extension should use the full model -->
+
+<!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))>
+<!ATTLIST %simpleContent;
+ id ID #IMPLIED
+ %simpleContentAttrs;>
+
+<!-- restriction should use the simple branch from part2, not the
+ one defined above; extension should have no particle -->
+
+<!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>
+<!ATTLIST %extension;
+ base %QName; #REQUIRED
+ id ID #IMPLIED
+ %extensionAttrs;>
+
+<!-- an element is declared by either:
+ a name and a type (either nested or referenced via the type attribute)
+ or a ref to an existing element declaration -->
+
+<!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
+ (%unique; | %key; | %keyref;)*)>
+<!-- simpleType or complexType only if no type|ref attribute -->
+<!-- ref not allowed at top level -->
+<!ATTLIST %element;
+ name %NCName; #IMPLIED
+ id ID #IMPLIED
+ ref %QName; #IMPLIED
+ type %QName; #IMPLIED
+ minOccurs %nonNegativeInteger; #IMPLIED
+ maxOccurs CDATA #IMPLIED
+ nillable %boolean; #IMPLIED
+ substitutionGroup %QName; #IMPLIED
+ abstract %boolean; #IMPLIED
+ final %complexDerivationSet; #IMPLIED
+ block %blockSet; #IMPLIED
+ default CDATA #IMPLIED
+ fixed CDATA #IMPLIED
+ form %formValues; #IMPLIED
+ %elementAttrs;>
+<!-- type and ref are mutually exclusive.
+ name and ref are mutually exclusive, one is required -->
+<!-- In the absence of type AND ref, type defaults to type of
+ substitutionGroup, if any, else the ur-type, i.e. unconstrained -->
+<!-- default and fixed are mutually exclusive -->
+
+<!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
+<!ATTLIST %group;
+ name %NCName; #IMPLIED
+ ref %QName; #IMPLIED
+ minOccurs %nonNegativeInteger; #IMPLIED
+ maxOccurs CDATA #IMPLIED
+ id ID #IMPLIED
+ %groupAttrs;>
+
+<!ELEMENT %all; ((%annotation;)?, (%element;)*)>
+<!ATTLIST %all;
+ minOccurs (1) #IMPLIED
+ maxOccurs (1) #IMPLIED
+ id ID #IMPLIED
+ %allAttrs;>
+
+<!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
+<!ATTLIST %choice;
+ minOccurs %nonNegativeInteger; #IMPLIED
+ maxOccurs CDATA #IMPLIED
+ id ID #IMPLIED
+ %choiceAttrs;>
+
+<!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
+<!ATTLIST %sequence;
+ minOccurs %nonNegativeInteger; #IMPLIED
+ maxOccurs CDATA #IMPLIED
+ id ID #IMPLIED
+ %sequenceAttrs;>
+
+<!-- an anonymous grouping in a model, or
+ a top-level named group definition, or a reference to same -->
+
+<!-- Note that if order is 'all', group is not allowed inside.
+ If order is 'all' THIS group must be alone (or referenced alone) at
+ the top level of a content model -->
+<!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside -->
+<!-- Should allow minOccurs=0 inside order='all' . . . -->
+
+<!ELEMENT %any; (%annotation;)?>
+<!ATTLIST %any;
+ namespace CDATA '##any'
+ processContents (skip|lax|strict) 'strict'
+ minOccurs %nonNegativeInteger; '1'
+ maxOccurs CDATA '1'
+ id ID #IMPLIED
+ %anyAttrs;>
+
+<!-- namespace is interpreted as follows:
+ ##any - - any non-conflicting WFXML at all
+
+ ##other - - any non-conflicting WFXML from namespace other
+ than targetNamespace
+
+ ##local - - any unqualified non-conflicting WFXML/attribute
+ one or - - any non-conflicting WFXML from
+ more URI the listed namespaces
+ references
+
+ ##targetNamespace ##local may appear in the above list,
+ with the obvious meaning -->
+
+<!ELEMENT %anyAttribute; (%annotation;)?>
+<!ATTLIST %anyAttribute;
+ namespace CDATA '##any'
+ processContents (skip|lax|strict) 'strict'
+ id ID #IMPLIED
+ %anyAttributeAttrs;>
+<!-- namespace is interpreted as for 'any' above -->
+
+<!-- simpleType only if no type|ref attribute -->
+<!-- ref not allowed at top level, name iff at top level -->
+<!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>
+<!ATTLIST %attribute;
+ name %NCName; #IMPLIED
+ id ID #IMPLIED
+ ref %QName; #IMPLIED
+ type %QName; #IMPLIED
+ use (prohibited|optional|required) #IMPLIED
+ default CDATA #IMPLIED
+ fixed CDATA #IMPLIED
+ form %formValues; #IMPLIED
+ %attributeAttrs;>
+<!-- type and ref are mutually exclusive.
+ name and ref are mutually exclusive, one is required -->
+<!-- default for use is optional when nested, none otherwise -->
+<!-- default and fixed are mutually exclusive -->
+<!-- type attr and simpleType content are mutually exclusive -->
+
+<!-- an attributeGroup is a named collection of attribute decls, or a
+ reference thereto -->
+<!ELEMENT %attributeGroup; ((%annotation;)?,
+ (%attribute; | %attributeGroup;)*,
+ (%anyAttribute;)?) >
+<!ATTLIST %attributeGroup;
+ name %NCName; #IMPLIED
+ id ID #IMPLIED
+ ref %QName; #IMPLIED
+ %attributeGroupAttrs;>
+
+<!-- ref iff no content, no name. ref iff not top level -->
+
+<!-- better reference mechanisms -->
+<!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
+<!ATTLIST %unique;
+ name %NCName; #REQUIRED
+ id ID #IMPLIED
+ %uniqueAttrs;>
+
+<!ELEMENT %key; ((%annotation;)?, %selector;, (%field;)+)>
+<!ATTLIST %key;
+ name %NCName; #REQUIRED
+ id ID #IMPLIED
+ %keyAttrs;>
+
+<!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
+<!ATTLIST %keyref;
+ name %NCName; #REQUIRED
+ refer %QName; #REQUIRED
+ id ID #IMPLIED
+ %keyrefAttrs;>
+
+<!ELEMENT %selector; ((%annotation;)?)>
+<!ATTLIST %selector;
+ xpath %XPathExpr; #REQUIRED
+ id ID #IMPLIED
+ %selectorAttrs;>
+<!ELEMENT %field; ((%annotation;)?)>
+<!ATTLIST %field;
+ xpath %XPathExpr; #REQUIRED
+ id ID #IMPLIED
+ %fieldAttrs;>
+
+<!-- Schema combination mechanisms -->
+<!ELEMENT %include; (%annotation;)?>
+<!ATTLIST %include;
+ schemaLocation %URIref; #REQUIRED
+ id ID #IMPLIED
+ %includeAttrs;>
+
+<!ELEMENT %import; (%annotation;)?>
+<!ATTLIST %import;
+ namespace %URIref; #IMPLIED
+ schemaLocation %URIref; #IMPLIED
+ id ID #IMPLIED
+ %importAttrs;>
+
+<!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
+ %attributeGroup; | %group;)*>
+<!ATTLIST %redefine;
+ schemaLocation %URIref; #REQUIRED
+ id ID #IMPLIED
+ %redefineAttrs;>
+
+<!ELEMENT %notation; (%annotation;)?>
+<!ATTLIST %notation;
+ name %NCName; #REQUIRED
+ id ID #IMPLIED
+ public CDATA #REQUIRED
+ system %URIref; #IMPLIED
+ %notationAttrs;>
+
+<!-- Annotation is either application information or documentation -->
+<!-- By having these here they are available for datatypes as well
+ as all the structures elements -->
+
+<!ELEMENT %annotation; (%appinfo; | %documentation;)*>
+<!ATTLIST %annotation; %annotationAttrs;>
+
+<!-- User must define annotation elements in internal subset for this
+ to work -->
+<!ELEMENT %appinfo; ANY> <!-- too restrictive -->
+<!ATTLIST %appinfo;
+ source %URIref; #IMPLIED
+ id ID #IMPLIED
+ %appinfoAttrs;>
+<!ELEMENT %documentation; ANY> <!-- too restrictive -->
+<!ATTLIST %documentation;
+ source %URIref; #IMPLIED
+ id ID #IMPLIED
+ xml:lang CDATA #IMPLIED
+ %documentationAttrs;>
+
+<!NOTATION XMLSchemaStructures PUBLIC
+ 'structures' 'http://www.w3.org/2001/XMLSchema.xsd' >
+<!NOTATION XML PUBLIC
+ 'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' >
[05/11] Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/js/jquery.blockUI-1.33.js
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/js/jquery.blockUI-1.33.js b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/js/jquery.blockUI-1.33.js
deleted file mode 100644
index 2b0a360..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/js/jquery.blockUI-1.33.js
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- * jQuery blockUI plugin
- * Version 1.33 (09/14/2007)
- * @requires jQuery v1.1.1
- *
- * $Id$
- *
- * Examples at: http://malsup.com/jquery/block/
- * Copyright (c) 2007 M. Alsup
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
- (function($) {
-/**
- * blockUI provides a mechanism for blocking user interaction with a page (or parts of a page).
- * This can be an effective way to simulate synchronous behavior during ajax operations without
- * locking the browser. It will prevent user operations for the current page while it is
- * active ane will return the page to normal when it is deactivate. blockUI accepts the following
- * two optional arguments:
- *
- * message (String|Element|jQuery): The message to be displayed while the UI is blocked. The message
- * argument can be a plain text string like "Processing...", an HTML string like
- * "<h1><img src="busy.gif" /> Please wait...</h1>", a DOM element, or a jQuery object.
- * The default message is "<h1>Please wait...</h1>"
- *
- * css (Object): Object which contains css property/values to override the default styles of
- * the message. Use this argument if you wish to override the default
- * styles. The css Object should be in a format suitable for the jQuery.css
- * function. For example:
- * $.blockUI({
- * backgroundColor: '#ff8',
- * border: '5px solid #f00,
- * fontWeight: 'bold'
- * });
- *
- * The default blocking message used when blocking the entire page is "<h1>Please wait...</h1>"
- * but this can be overridden by assigning a value to $.blockUI.defaults.pageMessage in your
- * own code. For example:
- *
- * $.blockUI.defaults.pageMessage = "<h1>Bitte Wartezeit</h1>";
- *
- * The default message styling can also be overridden. For example:
- *
- * $.extend($.blockUI.defaults.pageMessageCSS, { color: '#00a', backgroundColor: '#0f0' });
- *
- * The default styles work well for simple messages like "Please wait", but for longer messages
- * style overrides may be necessary.
- *
- * @example $.blockUI();
- * @desc prevent user interaction with the page (and show the default message of 'Please wait...')
- *
- * @example $.blockUI( { backgroundColor: '#f00', color: '#fff'} );
- * @desc prevent user interaction and override the default styles of the message to use a white on red color scheme
- *
- * @example $.blockUI('Processing...');
- * @desc prevent user interaction and display the message "Processing..." instead of the default message
- *
- * @name blockUI
- * @param String|jQuery|Element message Message to display while the UI is blocked
- * @param Object css Style object to control look of the message
- * @cat Plugins/blockUI
- */
-$.blockUI = function(msg, css, opts) {
- $.blockUI.impl.install(window, msg, css, opts);
-};
-
-// expose version number so other plugins can interogate
-$.blockUI.version = 1.33;
-
-/**
- * unblockUI removes the UI block that was put in place by blockUI
- *
- * @example $.unblockUI();
- * @desc unblocks the page
- *
- * @name unblockUI
- * @cat Plugins/blockUI
- */
-$.unblockUI = function(opts) {
- $.blockUI.impl.remove(window, opts);
-};
-
-/**
- * Blocks user interaction with the selected elements. (Hat tip: Much of
- * this logic comes from Brandon Aaron's bgiframe plugin. Thanks, Brandon!)
- * By default, no message is displayed when blocking elements.
- *
- * @example $('div.special').block();
- * @desc prevent user interaction with all div elements with the 'special' class.
- *
- * @example $('div.special').block('Please wait');
- * @desc prevent user interaction with all div elements with the 'special' class
- * and show a message over the blocked content.
- *
- * @name block
- * @type jQuery
- * @param String|jQuery|Element message Message to display while the element is blocked
- * @param Object css Style object to control look of the message
- * @cat Plugins/blockUI
- */
-$.fn.block = function(msg, css, opts) {
- return this.each(function() {
- if (!this.$pos_checked) {
- if ($.css(this,"position") == 'static')
- this.style.position = 'relative';
- if ($.browser.msie) this.style.zoom = 1; // force 'hasLayout' in IE
- this.$pos_checked = 1;
- }
- $.blockUI.impl.install(this, msg, css, opts);
- });
-};
-
-/**
- * Unblocks content that was blocked by "block()"
- *
- * @example $('div.special').unblock();
- * @desc unblocks all div elements with the 'special' class.
- *
- * @name unblock
- * @type jQuery
- * @cat Plugins/blockUI
- */
-$.fn.unblock = function(opts) {
- return this.each(function() {
- $.blockUI.impl.remove(this, opts);
- });
-};
-
-/**
- * displays the first matched element in a "display box" above a page overlay.
- *
- * @example $('#myImage').displayBox();
- * @desc displays "myImage" element in a box
- *
- * @name displayBox
- * @type jQuery
- * @cat Plugins/blockUI
- */
-$.fn.displayBox = function(css, fn, isFlash) {
- var msg = this[0];
- if (!msg) return;
- var $msg = $(msg);
- css = css || {};
-
- var w = $msg.width() || $msg.attr('width') || css.width || $.blockUI.defaults.displayBoxCSS.width;
- var h = $msg.height() || $msg.attr('height') || css.height || $.blockUI.defaults.displayBoxCSS.height ;
- if (w[w.length-1] == '%') {
- var ww = document.documentElement.clientWidth || document.body.clientWidth;
- w = parseInt(w) || 100;
- w = (w * ww) / 100;
- }
- if (h[h.length-1] == '%') {
- var hh = document.documentElement.clientHeight || document.body.clientHeight;
- h = parseInt(h) || 100;
- h = (h * hh) / 100;
- }
-
- var ml = '-' + parseInt(w)/2 + 'px';
- var mt = '-' + parseInt(h)/2 + 'px';
-
- // supress opacity on overlay if displaying flash content on mac/ff platform
- var ua = navigator.userAgent.toLowerCase();
- var opts = {
- displayMode: fn || 1,
- noalpha: isFlash && /mac/.test(ua) && /firefox/.test(ua)
- };
-
- $.blockUI.impl.install(window, msg, { width: w, height: h, marginTop: mt, marginLeft: ml }, opts);
-};
-
-
-// override these in your code to change the default messages and styles
-$.blockUI.defaults = {
- // the message displayed when blocking the entire page
- pageMessage: '<h1>Please wait...</h1>',
- // the message displayed when blocking an element
- elementMessage: '', // none
- // styles for the overlay iframe
- overlayCSS: { backgroundColor: '#fff', opacity: '0.5' },
- // styles for the message when blocking the entire page
- pageMessageCSS: { width:'250px', margin:'-50px 0 0 -125px', top:'50%', left:'50%', textAlign:'center', color:'#000', backgroundColor:'#fff', border:'3px solid #aaa' },
- // styles for the message when blocking an element
- elementMessageCSS: { width:'250px', padding:'10px', textAlign:'center', backgroundColor:'#fff'},
- // styles for the displayBox
- displayBoxCSS: { width: '400px', height: '400px', top:'50%', left:'50%' },
- // allow body element to be stetched in ie6
- ie6Stretch: 1,
- // supress tab nav from leaving blocking content?
- allowTabToLeave: 0,
- // Title attribute for overlay when using displayBox
- closeMessage: 'Click to close',
- // use fadeOut effect when unblocking (can be overridden on unblock call)
- fadeOut: 1,
- // fadeOut transition time in millis
- fadeTime: 400
-};
-
-// the gory details
-$.blockUI.impl = {
- box: null,
- boxCallback: null,
- pageBlock: null,
- pageBlockEls: [],
- op8: window.opera && window.opera.version() < 9,
- ie6: $.browser.msie && /MSIE 6.0/.test(navigator.userAgent),
- install: function(el, msg, css, opts) {
- opts = opts || {};
- this.boxCallback = typeof opts.displayMode == 'function' ? opts.displayMode : null;
- this.box = opts.displayMode ? msg : null;
- var full = (el == window);
-
- // use logical settings for opacity support based on browser but allow overrides via opts arg
- var noalpha = this.op8 || $.browser.mozilla && /Linux/.test(navigator.platform);
- if (typeof opts.alphaOverride != 'undefined')
- noalpha = opts.alphaOverride == 0 ? 1 : 0;
-
- if (full && this.pageBlock) this.remove(window, {fadeOut:0});
- // check to see if we were only passed the css object (a literal)
- if (msg && typeof msg == 'object' && !msg.jquery && !msg.nodeType) {
- css = msg;
- msg = null;
- }
- msg = msg ? (msg.nodeType ? $(msg) : msg) : full ? $.blockUI.defaults.pageMessage : $.blockUI.defaults.elementMessage;
- if (opts.displayMode)
- var basecss = jQuery.extend({}, $.blockUI.defaults.displayBoxCSS);
- else
- var basecss = jQuery.extend({}, full ? $.blockUI.defaults.pageMessageCSS : $.blockUI.defaults.elementMessageCSS);
- css = jQuery.extend(basecss, css || {});
- var f = ($.browser.msie) ? $('<iframe class="blockUI" style="z-index:1000;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="javascript:false;"></iframe>')
- : $('<div class="blockUI" style="display:none"></div>');
- var w = $('<div class="blockUI" style="z-index:1001;cursor:wait;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
- var m = full ? $('<div class="blockUI blockMsg" style="z-index:1002;cursor:wait;padding:0;position:fixed"></div>')
- : $('<div class="blockUI" style="display:none;z-index:1002;cursor:wait;position:absolute"></div>');
- w.css('position', full ? 'fixed' : 'absolute');
- if (msg) m.css(css);
- if (!noalpha) w.css($.blockUI.defaults.overlayCSS);
- if (this.op8) w.css({ width:''+el.clientWidth,height:''+el.clientHeight }); // lame
- if ($.browser.msie) f.css('opacity','0.0');
-
- $([f[0],w[0],m[0]]).appendTo(full ? 'body' : el);
-
- // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
- var expr = $.browser.msie && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
- if (this.ie6 || expr) {
- // stretch content area if it's short
- if (full && $.blockUI.defaults.ie6Stretch && $.boxModel)
- $('html,body').css('height','100%');
-
- // fix ie6 problem when blocked element has a border width
- if ((this.ie6 || !$.boxModel) && !full) {
- var t = this.sz(el,'borderTopWidth'), l = this.sz(el,'borderLeftWidth');
- var fixT = t ? '(0 - '+t+')' : 0;
- var fixL = l ? '(0 - '+l+')' : 0;
- }
-
- // simulate fixed position
- $.each([f,w,m], function(i,o) {
- var s = o[0].style;
- s.position = 'absolute';
- if (i < 2) {
- full ? s.setExpression('height','document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + "px"')
- : s.setExpression('height','this.parentNode.offsetHeight + "px"');
- full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
- : s.setExpression('width','this.parentNode.offsetWidth + "px"');
- if (fixL) s.setExpression('left', fixL);
- if (fixT) s.setExpression('top', fixT);
- }
- else {
- if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
- s.marginTop = 0;
- }
- });
- }
- if (opts.displayMode) {
- w.css('cursor','default').attr('title', $.blockUI.defaults.closeMessage);
- m.css('cursor','default');
- $([f[0],w[0],m[0]]).removeClass('blockUI').addClass('displayBox');
- $().click($.blockUI.impl.boxHandler).bind('keypress', $.blockUI.impl.boxHandler);
- }
- else
- this.bind(1, el);
- m.append(msg).show();
- if (msg.jquery) msg.show();
- if (opts.displayMode) return;
- if (full) {
- this.pageBlock = m[0];
- this.pageBlockEls = $(':input:enabled:visible',this.pageBlock);
- setTimeout(this.focus, 20);
- }
- else this.center(m[0]);
- },
- remove: function(el, opts) {
- var o = $.extend({}, $.blockUI.defaults, opts);
- this.bind(0, el);
- var full = el == window;
- var els = full ? $('body').children().filter('.blockUI') : $('.blockUI', el);
- if (full) this.pageBlock = this.pageBlockEls = null;
-
- if (o.fadeOut) {
- els.fadeOut(o.fadeTime, function() {
- if (this.parentNode) this.parentNode.removeChild(this);
- });
- }
- else els.remove();
- },
- boxRemove: function(el) {
- $().unbind('click',$.blockUI.impl.boxHandler).unbind('keypress', $.blockUI.impl.boxHandler);
- if (this.boxCallback)
- this.boxCallback(this.box);
- $('body .displayBox').hide().remove();
- },
- // event handler to suppress keyboard/mouse events when blocking
- handler: function(e) {
- if (e.keyCode && e.keyCode == 9) {
- if ($.blockUI.impl.pageBlock && !$.blockUI.defaults.allowTabToLeave) {
- var els = $.blockUI.impl.pageBlockEls;
- var fwd = !e.shiftKey && e.target == els[els.length-1];
- var back = e.shiftKey && e.target == els[0];
- if (fwd || back) {
- setTimeout(function(){$.blockUI.impl.focus(back)},10);
- return false;
- }
- }
- }
- if ($(e.target).parents('div.blockMsg').length > 0)
- return true;
- return $(e.target).parents().children().filter('div.blockUI').length == 0;
- },
- boxHandler: function(e) {
- if ((e.keyCode && e.keyCode == 27) || (e.type == 'click' && $(e.target).parents('div.blockMsg').length == 0))
- $.blockUI.impl.boxRemove();
- return true;
- },
- // bind/unbind the handler
- bind: function(b, el) {
- var full = el == window;
- // don't bother unbinding if there is nothing to unbind
- if (!b && (full && !this.pageBlock || !full && !el.$blocked)) return;
- if (!full) el.$blocked = b;
- var $e = $(el).find('a,:input');
- $.each(['mousedown','mouseup','keydown','keypress','click'], function(i,o) {
- $e[b?'bind':'unbind'](o, $.blockUI.impl.handler);
- });
- },
- focus: function(back) {
- if (!$.blockUI.impl.pageBlockEls) return;
- var e = $.blockUI.impl.pageBlockEls[back===true ? $.blockUI.impl.pageBlockEls.length-1 : 0];
- if (e) e.focus();
- },
- center: function(el) {
- var p = el.parentNode, s = el.style;
- var l = ((p.offsetWidth - el.offsetWidth)/2) - this.sz(p,'borderLeftWidth');
- var t = ((p.offsetHeight - el.offsetHeight)/2) - this.sz(p,'borderTopWidth');
- s.left = l > 0 ? (l+'px') : '0';
- s.top = t > 0 ? (t+'px') : '0';
- },
- sz: function(el, p) { return parseInt($.css(el,p))||0; }
-};
-
-})(jQuery);
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/list.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/list.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/list.jsp
deleted file mode 100644
index e69de29..0000000
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/map_domain.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/map_domain.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/map_domain.jsp
deleted file mode 100644
index 37c096f..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/map_domain.jsp
+++ /dev/null
@@ -1,118 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2013, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
-<%@ page import="org.wso2.carbon.CarbonConstants"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
-<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
-<%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient"%>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
-<%@ page import="java.text.SimpleDateFormat"%>
-<%@ page import="java.util.ResourceBundle"%>
-<jsp:include page="../dialog/display_messages.jsp" />
-
-
-<%
- response.setHeader("Cache-Control", "no-cache");
- String cartridgeAlias = request.getParameter("cartridge_alias");
- String domain = request.getParameter("domain");
-
- if (cartridgeAlias == null || cartridgeAlias.trim().length() == 0) {
- response.setStatus(500);
- CarbonUIMessage uiMsg = new CarbonUIMessage(
- CarbonUIMessage.ERROR, "Cartridge Alias Not Specified");
- session.setAttribute(CarbonUIMessage.ID, uiMsg);
-%>
-<jsp:include page="../admin/error.jsp" />
-<%
- return;
- }
-%>
-<fmt:bundle basename="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources">
- <carbon:breadcrumb label="mapdomain" resourceBundle="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources" topPage="true"
- request="<%=request%>" />
- <div id="middle">
- <h2>
- <fmt:message key="mapdomain.to" />
- <%=cartridgeAlias%></h2>
- <div id="workArea">
- <form id="mapDomainForm" name="mapDomain">
- <input name="cartridge_alias" type="hidden" value="<%=cartridgeAlias%>" />
- <table id="tblMapDomain" width="100%" class="styledLeft">
- <thead>
- <tr>
- <th><fmt:message key="mapdomain.information" /></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="nopadding">
- <table class="normal-nopadding" cellspacing="0">
- <tbody>
- <tr>
- <td style="width: 30%"><label>Cartridge Alias</label><span
- class="required">*</span></td>
- <td><span><%=cartridgeAlias%></span></td>
- </tr>
- <tr>
- <td><label for="domain">Domain</label><span
- class="required">*</span></td>
- <td><input id="domain" name="domain" type="text"
- style="width: 250px" maxlength="300"
- value="<%=(domain != null ? domain : "")%>" /></td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr id="buttonRow">
- <td class="buttonRow"><input id="mapDomainSave"
- type="submit" class="button" value="Save"> <input
- id="mapDomainCancelButton" type="button" class="button"
- value="Cancel" onclick="cancelMapDomain();"></td>
- </tr>
- </tbody>
- </table>
- </form>
- </div>
- </div>
-
- <script type="text/javascript">
- jQuery(document).ready(
- function() {
- setStratosFormSubmitFunction("#mapDomainForm", validate,
- "map_domain_ajaxprocessor.jsp",
- "subscribed_cartridges.jsp", "#mapDomainSave");
- });
-
- function validate() {
- if (jQuery("#domain").val().length == 0) {
- CARBON.showErrorDialog('Please enter a value for domain.');
- return false;
- }
- return true;
- }
-
- function cancelMapDomain() {
- location.href = "subscribed_cartridges.jsp";
- }
- </script>
- <script type="text/javascript" src="js/jquery.blockUI-1.33.js"></script>
- <script type="text/javascript" src="js/common.js"></script>
-</fmt:bundle>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/map_domain_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/map_domain_ajaxprocessor.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/map_domain_ajaxprocessor.jsp
deleted file mode 100644
index 0543dcf..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/map_domain_ajaxprocessor.jsp
+++ /dev/null
@@ -1,67 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2013, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
-<%@ page import="org.wso2.carbon.CarbonConstants"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
-<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
-<%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient"%>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
-<%@ page import="java.text.SimpleDateFormat"%>
-<%@ page import="java.util.ResourceBundle"%>
-<jsp:include page="../dialog/display_messages.jsp" />
-
-
-<%
- response.setHeader("Cache-Control", "no-cache");
-
- ResourceBundle bundle = ResourceBundle.getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
-
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext = (ConfigurationContext) config.getServletContext().getAttribute(
- CarbonConstants.CONFIGURATION_CONTEXT);
-
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- CartridgeAdminClient client;
-
- String cartridgeAlias = request.getParameter("cartridge_alias");
- String mappedDomain = request.getParameter("domain");
- try {
- client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
- String host = client.addDomainMapping(mappedDomain, cartridgeAlias);
- String message = "";
- if (host != null) {
- //CarbonUIMessage.sendCarbonUIMessage
- message = "Your own domain is successfully added. Please CNAME it to system's domain: " + host + ".";
- } //else {
- //TODO: Handle this scenario
- //CarbonUIMessage.sendCarbonUIMessage("Your own domain is added", CarbonUIMessage.WARNING, request);
- //}
-%>
-<span id="responseMsg"><%=message%></span>
-<%
- } catch (Exception e) {
- //CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request);
- response.setStatus(500);
-%>
-<span id="responseMsg"><%=e.getMessage()%></span>
-<%
- }
-%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/remove_domain_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/remove_domain_ajaxprocessor.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/remove_domain_ajaxprocessor.jsp
deleted file mode 100644
index c210447..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/remove_domain_ajaxprocessor.jsp
+++ /dev/null
@@ -1,60 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2013, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
-<%@ page import="org.wso2.carbon.CarbonConstants"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
-<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
-<%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient"%>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
-<%@ page import="java.text.SimpleDateFormat"%>
-<%@ page import="java.util.ResourceBundle"%>
-<jsp:include page="../dialog/display_messages.jsp" />
-
-
-<%
- response.setHeader("Cache-Control", "no-cache");
-
- ResourceBundle bundle = ResourceBundle.getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
-
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext = (ConfigurationContext) config.getServletContext().getAttribute(
- CarbonConstants.CONFIGURATION_CONTEXT);
-
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- CartridgeAdminClient client;
-
- String cartridgeAlias = request.getParameter("cartridge_alias");
- try {
- client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
- client.removeDomainMapping(cartridgeAlias);
- //CarbonUIMessage.sendCarbonUIMessage("Domain removed.", CarbonUIMessage.INFO, request);
- String message = "Domain removed.";
-%>
-<span id="responseMsg"><%=message%></span>
-<%
- } catch (Exception e) {
- //CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request);
- response.setStatus(500);
-%>
-<span id="responseMsg"><%=e.getMessage()%></span>
-<%
- }
-%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/XMLSchema.dtd
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/XMLSchema.dtd b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/XMLSchema.dtd
deleted file mode 100644
index 562ad3e..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/XMLSchema.dtd
+++ /dev/null
@@ -1,418 +0,0 @@
-<!--
- ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<!-- DTD for XML Schemas: Part 1: Structures
- Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"
- Official Location: http://www.w3.org/2001/XMLSchema.dtd -->
-<!-- $Id: XMLSchema.dtd,v 1.31 2001/10/24 15:50:16 ht Exp $ -->
-<!-- Note this DTD is NOT normative, or even definitive. --> <!--d-->
-<!-- prose copy in the structures REC is the definitive version --> <!--d-->
-<!-- (which shouldn't differ from this one except for this --> <!--d-->
-<!-- comment and entity expansions, but just in case) --> <!--d-->
-<!-- With the exception of cases with multiple namespace
- prefixes for the XML Schema namespace, any XML document which is
- not valid per this DTD given redefinitions in its internal subset of the
- 'p' and 's' parameter entities below appropriate to its namespace
- declaration of the XML Schema namespace is almost certainly not
- a valid schema. -->
-
-<!-- The simpleType element and its constituent parts
- are defined in XML Schema: Part 2: Datatypes -->
-<!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >
-
-<!ENTITY % p 'xs:'> <!-- can be overriden in the internal subset of a
- schema document to establish a different
- namespace prefix -->
-<!ENTITY % s ':xs'> <!-- if %p is defined (e.g. as foo:) then you must
- also define %s as the suffix for the appropriate
- namespace declaration (e.g. :foo) -->
-<!ENTITY % nds 'xmlns%s;'>
-
-<!-- Define all the element names, with optional prefix -->
-<!ENTITY % schema "%p;schema">
-<!ENTITY % complexType "%p;complexType">
-<!ENTITY % complexContent "%p;complexContent">
-<!ENTITY % simpleContent "%p;simpleContent">
-<!ENTITY % extension "%p;extension">
-<!ENTITY % element "%p;element">
-<!ENTITY % unique "%p;unique">
-<!ENTITY % key "%p;key">
-<!ENTITY % keyref "%p;keyref">
-<!ENTITY % selector "%p;selector">
-<!ENTITY % field "%p;field">
-<!ENTITY % group "%p;group">
-<!ENTITY % all "%p;all">
-<!ENTITY % choice "%p;choice">
-<!ENTITY % sequence "%p;sequence">
-<!ENTITY % any "%p;any">
-<!ENTITY % anyAttribute "%p;anyAttribute">
-<!ENTITY % attribute "%p;attribute">
-<!ENTITY % attributeGroup "%p;attributeGroup">
-<!ENTITY % include "%p;include">
-<!ENTITY % import "%p;import">
-<!ENTITY % redefine "%p;redefine">
-<!ENTITY % notation "%p;notation">
-
-<!-- annotation elements -->
-<!ENTITY % annotation "%p;annotation">
-<!ENTITY % appinfo "%p;appinfo">
-<!ENTITY % documentation "%p;documentation">
-
-<!-- Customisation entities for the ATTLIST of each element type.
- Define one of these if your schema takes advantage of the
- anyAttribute='##other' in the schema for schemas -->
-
-<!ENTITY % schemaAttrs ''>
-<!ENTITY % complexTypeAttrs ''>
-<!ENTITY % complexContentAttrs ''>
-<!ENTITY % simpleContentAttrs ''>
-<!ENTITY % extensionAttrs ''>
-<!ENTITY % elementAttrs ''>
-<!ENTITY % groupAttrs ''>
-<!ENTITY % allAttrs ''>
-<!ENTITY % choiceAttrs ''>
-<!ENTITY % sequenceAttrs ''>
-<!ENTITY % anyAttrs ''>
-<!ENTITY % anyAttributeAttrs ''>
-<!ENTITY % attributeAttrs ''>
-<!ENTITY % attributeGroupAttrs ''>
-<!ENTITY % uniqueAttrs ''>
-<!ENTITY % keyAttrs ''>
-<!ENTITY % keyrefAttrs ''>
-<!ENTITY % selectorAttrs ''>
-<!ENTITY % fieldAttrs ''>
-<!ENTITY % includeAttrs ''>
-<!ENTITY % importAttrs ''>
-<!ENTITY % redefineAttrs ''>
-<!ENTITY % notationAttrs ''>
-<!ENTITY % annotationAttrs ''>
-<!ENTITY % appinfoAttrs ''>
-<!ENTITY % documentationAttrs ''>
-
-<!ENTITY % complexDerivationSet "CDATA">
- <!-- #all or space-separated list drawn from derivationChoice -->
-<!ENTITY % blockSet "CDATA">
- <!-- #all or space-separated list drawn from
- derivationChoice + 'substitution' -->
-
-<!ENTITY % mgs '%all; | %choice; | %sequence;'>
-<!ENTITY % cs '%choice; | %sequence;'>
-<!ENTITY % formValues '(qualified|unqualified)'>
-
-
-<!ENTITY % attrDecls '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
-
-<!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'>
-
-<!-- This is used in part2 -->
-<!ENTITY % restriction1 '((%mgs; | %group;)?)'>
-
-%xs-datatypes;
-
-<!-- the duplication below is to produce an unambiguous content model
- which allows annotation everywhere -->
-<!ELEMENT %schema; ((%include; | %import; | %redefine; | %annotation;)*,
- ((%simpleType; | %complexType;
- | %element; | %attribute;
- | %attributeGroup; | %group;
- | %notation; ),
- (%annotation;)*)* )>
-<!ATTLIST %schema;
- targetNamespace %URIref; #IMPLIED
- version CDATA #IMPLIED
- %nds; %URIref; #FIXED 'http://www.w3.org/2001/XMLSchema'
- xmlns CDATA #IMPLIED
- finalDefault %complexDerivationSet; ''
- blockDefault %blockSet; ''
- id ID #IMPLIED
- elementFormDefault %formValues; 'unqualified'
- attributeFormDefault %formValues; 'unqualified'
- xml:lang CDATA #IMPLIED
- %schemaAttrs;>
-<!-- Note the xmlns declaration is NOT in the Schema for Schemas,
- because at the Infoset level where schemas operate,
- xmlns(:prefix) is NOT an attribute! -->
-<!-- The declaration of xmlns is a convenience for schema authors -->
-
-<!-- The id attribute here and below is for use in external references
- from non-schemas using simple fragment identifiers.
- It is NOT used for schema-to-schema reference, internal or
- external. -->
-
-<!-- a type is a named content type specification which allows attribute
- declarations-->
-<!-- -->
-
-<!ELEMENT %complexType; ((%annotation;)?,
- (%simpleContent;|%complexContent;|
- %particleAndAttrs;))>
-
-<!ATTLIST %complexType;
- name %NCName; #IMPLIED
- id ID #IMPLIED
- abstract %boolean; #IMPLIED
- final %complexDerivationSet; #IMPLIED
- block %complexDerivationSet; #IMPLIED
- mixed (true|false) 'false'
- %complexTypeAttrs;>
-
-<!-- particleAndAttrs is shorthand for a root type -->
-<!-- mixed is disallowed if simpleContent, overriden if complexContent
- has one too. -->
-
-<!-- If anyAttribute appears in one or more referenced attributeGroups
- and/or explicitly, the intersection of the permissions is used -->
-
-<!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))>
-<!ATTLIST %complexContent;
- mixed (true|false) #IMPLIED
- id ID #IMPLIED
- %complexContentAttrs;>
-
-<!-- restriction should use the branch defined above, not the simple
- one from part2; extension should use the full model -->
-
-<!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))>
-<!ATTLIST %simpleContent;
- id ID #IMPLIED
- %simpleContentAttrs;>
-
-<!-- restriction should use the simple branch from part2, not the
- one defined above; extension should have no particle -->
-
-<!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>
-<!ATTLIST %extension;
- base %QName; #REQUIRED
- id ID #IMPLIED
- %extensionAttrs;>
-
-<!-- an element is declared by either:
- a name and a type (either nested or referenced via the type attribute)
- or a ref to an existing element declaration -->
-
-<!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
- (%unique; | %key; | %keyref;)*)>
-<!-- simpleType or complexType only if no type|ref attribute -->
-<!-- ref not allowed at top level -->
-<!ATTLIST %element;
- name %NCName; #IMPLIED
- id ID #IMPLIED
- ref %QName; #IMPLIED
- type %QName; #IMPLIED
- minOccurs %nonNegativeInteger; #IMPLIED
- maxOccurs CDATA #IMPLIED
- nillable %boolean; #IMPLIED
- substitutionGroup %QName; #IMPLIED
- abstract %boolean; #IMPLIED
- final %complexDerivationSet; #IMPLIED
- block %blockSet; #IMPLIED
- default CDATA #IMPLIED
- fixed CDATA #IMPLIED
- form %formValues; #IMPLIED
- %elementAttrs;>
-<!-- type and ref are mutually exclusive.
- name and ref are mutually exclusive, one is required -->
-<!-- In the absence of type AND ref, type defaults to type of
- substitutionGroup, if any, else the ur-type, i.e. unconstrained -->
-<!-- default and fixed are mutually exclusive -->
-
-<!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
-<!ATTLIST %group;
- name %NCName; #IMPLIED
- ref %QName; #IMPLIED
- minOccurs %nonNegativeInteger; #IMPLIED
- maxOccurs CDATA #IMPLIED
- id ID #IMPLIED
- %groupAttrs;>
-
-<!ELEMENT %all; ((%annotation;)?, (%element;)*)>
-<!ATTLIST %all;
- minOccurs (1) #IMPLIED
- maxOccurs (1) #IMPLIED
- id ID #IMPLIED
- %allAttrs;>
-
-<!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
-<!ATTLIST %choice;
- minOccurs %nonNegativeInteger; #IMPLIED
- maxOccurs CDATA #IMPLIED
- id ID #IMPLIED
- %choiceAttrs;>
-
-<!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
-<!ATTLIST %sequence;
- minOccurs %nonNegativeInteger; #IMPLIED
- maxOccurs CDATA #IMPLIED
- id ID #IMPLIED
- %sequenceAttrs;>
-
-<!-- an anonymous grouping in a model, or
- a top-level named group definition, or a reference to same -->
-
-<!-- Note that if order is 'all', group is not allowed inside.
- If order is 'all' THIS group must be alone (or referenced alone) at
- the top level of a content model -->
-<!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside -->
-<!-- Should allow minOccurs=0 inside order='all' . . . -->
-
-<!ELEMENT %any; (%annotation;)?>
-<!ATTLIST %any;
- namespace CDATA '##any'
- processContents (skip|lax|strict) 'strict'
- minOccurs %nonNegativeInteger; '1'
- maxOccurs CDATA '1'
- id ID #IMPLIED
- %anyAttrs;>
-
-<!-- namespace is interpreted as follows:
- ##any - - any non-conflicting WFXML at all
-
- ##other - - any non-conflicting WFXML from namespace other
- than targetNamespace
-
- ##local - - any unqualified non-conflicting WFXML/attribute
- one or - - any non-conflicting WFXML from
- more URI the listed namespaces
- references
-
- ##targetNamespace ##local may appear in the above list,
- with the obvious meaning -->
-
-<!ELEMENT %anyAttribute; (%annotation;)?>
-<!ATTLIST %anyAttribute;
- namespace CDATA '##any'
- processContents (skip|lax|strict) 'strict'
- id ID #IMPLIED
- %anyAttributeAttrs;>
-<!-- namespace is interpreted as for 'any' above -->
-
-<!-- simpleType only if no type|ref attribute -->
-<!-- ref not allowed at top level, name iff at top level -->
-<!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>
-<!ATTLIST %attribute;
- name %NCName; #IMPLIED
- id ID #IMPLIED
- ref %QName; #IMPLIED
- type %QName; #IMPLIED
- use (prohibited|optional|required) #IMPLIED
- default CDATA #IMPLIED
- fixed CDATA #IMPLIED
- form %formValues; #IMPLIED
- %attributeAttrs;>
-<!-- type and ref are mutually exclusive.
- name and ref are mutually exclusive, one is required -->
-<!-- default for use is optional when nested, none otherwise -->
-<!-- default and fixed are mutually exclusive -->
-<!-- type attr and simpleType content are mutually exclusive -->
-
-<!-- an attributeGroup is a named collection of attribute decls, or a
- reference thereto -->
-<!ELEMENT %attributeGroup; ((%annotation;)?,
- (%attribute; | %attributeGroup;)*,
- (%anyAttribute;)?) >
-<!ATTLIST %attributeGroup;
- name %NCName; #IMPLIED
- id ID #IMPLIED
- ref %QName; #IMPLIED
- %attributeGroupAttrs;>
-
-<!-- ref iff no content, no name. ref iff not top level -->
-
-<!-- better reference mechanisms -->
-<!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
-<!ATTLIST %unique;
- name %NCName; #REQUIRED
- id ID #IMPLIED
- %uniqueAttrs;>
-
-<!ELEMENT %key; ((%annotation;)?, %selector;, (%field;)+)>
-<!ATTLIST %key;
- name %NCName; #REQUIRED
- id ID #IMPLIED
- %keyAttrs;>
-
-<!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
-<!ATTLIST %keyref;
- name %NCName; #REQUIRED
- refer %QName; #REQUIRED
- id ID #IMPLIED
- %keyrefAttrs;>
-
-<!ELEMENT %selector; ((%annotation;)?)>
-<!ATTLIST %selector;
- xpath %XPathExpr; #REQUIRED
- id ID #IMPLIED
- %selectorAttrs;>
-<!ELEMENT %field; ((%annotation;)?)>
-<!ATTLIST %field;
- xpath %XPathExpr; #REQUIRED
- id ID #IMPLIED
- %fieldAttrs;>
-
-<!-- Schema combination mechanisms -->
-<!ELEMENT %include; (%annotation;)?>
-<!ATTLIST %include;
- schemaLocation %URIref; #REQUIRED
- id ID #IMPLIED
- %includeAttrs;>
-
-<!ELEMENT %import; (%annotation;)?>
-<!ATTLIST %import;
- namespace %URIref; #IMPLIED
- schemaLocation %URIref; #IMPLIED
- id ID #IMPLIED
- %importAttrs;>
-
-<!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
- %attributeGroup; | %group;)*>
-<!ATTLIST %redefine;
- schemaLocation %URIref; #REQUIRED
- id ID #IMPLIED
- %redefineAttrs;>
-
-<!ELEMENT %notation; (%annotation;)?>
-<!ATTLIST %notation;
- name %NCName; #REQUIRED
- id ID #IMPLIED
- public CDATA #REQUIRED
- system %URIref; #IMPLIED
- %notationAttrs;>
-
-<!-- Annotation is either application information or documentation -->
-<!-- By having these here they are available for datatypes as well
- as all the structures elements -->
-
-<!ELEMENT %annotation; (%appinfo; | %documentation;)*>
-<!ATTLIST %annotation; %annotationAttrs;>
-
-<!-- User must define annotation elements in internal subset for this
- to work -->
-<!ELEMENT %appinfo; ANY> <!-- too restrictive -->
-<!ATTLIST %appinfo;
- source %URIref; #IMPLIED
- id ID #IMPLIED
- %appinfoAttrs;>
-<!ELEMENT %documentation; ANY> <!-- too restrictive -->
-<!ATTLIST %documentation;
- source %URIref; #IMPLIED
- id ID #IMPLIED
- xml:lang CDATA #IMPLIED
- %documentationAttrs;>
-
-<!NOTATION XMLSchemaStructures PUBLIC
- 'structures' 'http://www.w3.org/2001/XMLSchema.xsd' >
-<!NOTATION XML PUBLIC
- 'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' >
[04/11] Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/XMLSchema.xsd
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/XMLSchema.xsd b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/XMLSchema.xsd
deleted file mode 100644
index 9c851a5..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/XMLSchema.xsd
+++ /dev/null
@@ -1,2383 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="annotated-xsd.xsl"?>
-<!--
- ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<!-- XML Schema schema for XML Schemas: Part 1: Structures -->
-<!-- Note this schema is NOT the normative structures schema. -->
-<!-- The prose copy in the structures REC is the normative -->
-<!-- version (which shouldn't differ from this one except for -->
-<!-- this comment and entity expansions, but just in case -->
-<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
- <!-- provide ID type information even for parsers which only read the
- internal subset -->
- <!ATTLIST xs:schema
- id ID #IMPLIED
- >
- <!ATTLIST xs:complexType
- id ID #IMPLIED
- >
- <!ATTLIST xs:complexContent
- id ID #IMPLIED
- >
- <!ATTLIST xs:simpleContent
- id ID #IMPLIED
- >
- <!ATTLIST xs:extension
- id ID #IMPLIED
- >
- <!ATTLIST xs:element
- id ID #IMPLIED
- >
- <!ATTLIST xs:group
- id ID #IMPLIED
- >
- <!ATTLIST xs:all
- id ID #IMPLIED
- >
- <!ATTLIST xs:choice
- id ID #IMPLIED
- >
- <!ATTLIST xs:sequence
- id ID #IMPLIED
- >
- <!ATTLIST xs:any
- id ID #IMPLIED
- >
- <!ATTLIST xs:anyAttribute
- id ID #IMPLIED
- >
- <!ATTLIST xs:attribute
- id ID #IMPLIED
- >
- <!ATTLIST xs:attributeGroup
- id ID #IMPLIED
- >
- <!ATTLIST xs:unique
- id ID #IMPLIED
- >
- <!ATTLIST xs:key
- id ID #IMPLIED
- >
- <!ATTLIST xs:keyref
- id ID #IMPLIED
- >
- <!ATTLIST xs:selector
- id ID #IMPLIED
- >
- <!ATTLIST xs:field
- id ID #IMPLIED
- >
- <!ATTLIST xs:include
- id ID #IMPLIED
- >
- <!ATTLIST xs:import
- id ID #IMPLIED
- >
- <!ATTLIST xs:redefine
- id ID #IMPLIED
- >
- <!ATTLIST xs:notation
- id ID #IMPLIED
- >
- <!--
- keep this schema XML1.0 DTD valid
- -->
- <!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>
- <!ELEMENT hfp:hasFacet EMPTY>
- <!ATTLIST hfp:hasFacet
- name NMTOKEN #REQUIRED
- >
- <!ELEMENT hfp:hasProperty EMPTY>
- <!ATTLIST hfp:hasProperty
- name NMTOKEN #REQUIRED
- value CDATA #REQUIRED
- >
- <!--
- Make sure that processors that do not read the external
- subset will know about the various IDs we declare
- -->
- <!ATTLIST xs:simpleType
- id ID #IMPLIED
- >
- <!ATTLIST xs:maxExclusive
- id ID #IMPLIED
- >
- <!ATTLIST xs:minExclusive
- id ID #IMPLIED
- >
- <!ATTLIST xs:maxInclusive
- id ID #IMPLIED
- >
- <!ATTLIST xs:minInclusive
- id ID #IMPLIED
- >
- <!ATTLIST xs:totalDigits
- id ID #IMPLIED
- >
- <!ATTLIST xs:fractionDigits
- id ID #IMPLIED
- >
- <!ATTLIST xs:length
- id ID #IMPLIED
- >
- <!ATTLIST xs:minLength
- id ID #IMPLIED
- >
- <!ATTLIST xs:maxLength
- id ID #IMPLIED
- >
- <!ATTLIST xs:enumeration
- id ID #IMPLIED
- >
- <!ATTLIST xs:pattern
- id ID #IMPLIED
- >
- <!ATTLIST xs:appinfo
- id ID #IMPLIED
- >
- <!ATTLIST xs:documentation
- id ID #IMPLIED
- >
- <!ATTLIST xs:list
- id ID #IMPLIED
- >
- <!ATTLIST xs:union
- id ID #IMPLIED
- >
- ]>
-<xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all"
- elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
- <xs:annotation>
- <xs:documentation>
- Part 1 version: Id: XMLSchema.xsd,v 1.53 2003/02/24 17:40:07 ht Exp
- Part 2 version: Id: datatypes.xsd,v 1.60 2003/04/05 11:02:30 ht Exp
- </xs:documentation>
- </xs:annotation>
- <xs:annotation>
- <xs:documentation
- source="http://www.w3.org/XML/Group/2002/09/xmlschema-1/structures-with-errata.html">
- The schema corresponding to this document is normative,
- with respect to the syntactic constraints it expresses in the
- XML Schema language. The documentation (within <documentation> elements)
- below, is not normative, but rather highlights important aspects of
- the W3C Recommendation of which this is a part
- </xs:documentation>
- </xs:annotation>
- <xs:annotation>
- <xs:documentation>
- The simpleType element and all of its members are defined
- towards the end of this schema document
- </xs:documentation>
- </xs:annotation>
- <xs:import namespace="http://www.w3.org/XML/1998/namespace"
- schemaLocation="http://www.w3.org/2001/xml.xsd">
- <xs:annotation>
- <xs:documentation>
- Get access to the xml: attribute groups for xml:lang
- as declared on 'schema' and 'documentation' below
- </xs:documentation>
- </xs:annotation>
- </xs:import>
- <xs:complexType name="openAttrs">
- <xs:annotation>
- <xs:documentation>
- This type is extended by almost all schema types
- to allow attributes from other namespaces to be
- added to user schemas.
- </xs:documentation>
- </xs:annotation>
- <xs:complexContent>
- <xs:restriction base="xs:anyType">
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="annotated">
- <xs:annotation>
- <xs:documentation>
- This type is extended by all types which allow annotation
- other than <schema> itself
- </xs:documentation>
- </xs:annotation>
- <xs:complexContent>
- <xs:extension base="xs:openAttrs">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- </xs:sequence>
- <xs:attribute name="id" type="xs:ID"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:group name="schemaTop">
- <xs:annotation>
- <xs:documentation>
- This group is for the
- elements which occur freely at the top level of schemas.
- All of their types are based on the "annotated" type by extension.
- </xs:documentation>
- </xs:annotation>
- <xs:choice>
- <xs:group ref="xs:redefinable"/>
- <xs:element ref="xs:element"/>
- <xs:element ref="xs:attribute"/>
- <xs:element ref="xs:notation"/>
- </xs:choice>
- </xs:group>
- <xs:group name="redefinable">
- <xs:annotation>
- <xs:documentation>
- This group is for the
- elements which can self-redefine (see <redefine> below).
- </xs:documentation>
- </xs:annotation>
- <xs:choice>
- <xs:element ref="xs:simpleType"/>
- <xs:element ref="xs:complexType"/>
- <xs:element ref="xs:group"/>
- <xs:element ref="xs:attributeGroup"/>
- </xs:choice>
- </xs:group>
- <xs:simpleType name="formChoice">
- <xs:annotation>
- <xs:documentation>
- A utility type, not for public use
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:NMTOKEN">
- <xs:enumeration value="qualified"/>
- <xs:enumeration value="unqualified"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="reducedDerivationControl">
- <xs:annotation>
- <xs:documentation>
- A utility type, not for public use
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:derivationControl">
- <xs:enumeration value="extension"/>
- <xs:enumeration value="restriction"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="derivationSet">
- <xs:annotation>
- <xs:documentation>
- A utility type, not for public use
- </xs:documentation>
- <xs:documentation>
- #all or (possibly empty) subset of {extension, restriction}
- </xs:documentation>
- </xs:annotation>
- <xs:union>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="#all"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType>
- <xs:list itemType="xs:reducedDerivationControl"/>
- </xs:simpleType>
- </xs:union>
- </xs:simpleType>
- <xs:element name="schema" id="schema">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:openAttrs">
- <xs:sequence>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xs:include"/>
- <xs:element ref="xs:import"/>
- <xs:element ref="xs:redefine"/>
- <xs:element ref="xs:annotation"/>
- </xs:choice>
- <xs:sequence minOccurs="0" maxOccurs="unbounded">
- <xs:group ref="xs:schemaTop"/>
- <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:sequence>
- <xs:attribute name="targetNamespace" type="xs:anyURI"/>
- <xs:attribute name="version" type="xs:normalizedString"/>
- <xs:attribute name="finalDefault" type="xs:derivationSet" use="optional"
- default=""/>
- <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/>
- <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional"
- default="unqualified"/>
- <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional"
- default="unqualified"/>
- <xs:attribute name="id" type="xs:ID"/>
- <xs:attribute ref="xml:lang"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:key name="element">
- <xs:selector xpath="xs:element"/>
- <xs:field xpath="@name"/>
- </xs:key>
- <xs:key name="attribute">
- <xs:selector xpath="xs:attribute"/>
- <xs:field xpath="@name"/>
- </xs:key>
- <xs:key name="type">
- <xs:selector xpath="xs:complexType|xs:simpleType"/>
- <xs:field xpath="@name"/>
- </xs:key>
- <xs:key name="group">
- <xs:selector xpath="xs:group"/>
- <xs:field xpath="@name"/>
- </xs:key>
- <xs:key name="attributeGroup">
- <xs:selector xpath="xs:attributeGroup"/>
- <xs:field xpath="@name"/>
- </xs:key>
- <xs:key name="notation">
- <xs:selector xpath="xs:notation"/>
- <xs:field xpath="@name"/>
- </xs:key>
- <xs:key name="identityConstraint">
- <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
- <xs:field xpath="@name"/>
- </xs:key>
- </xs:element>
- <xs:simpleType name="allNNI">
- <xs:annotation>
- <xs:documentation>
- for maxOccurs
- </xs:documentation>
- </xs:annotation>
- <xs:union memberTypes="xs:nonNegativeInteger">
- <xs:simpleType>
- <xs:restriction base="xs:NMTOKEN">
- <xs:enumeration value="unbounded"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
- </xs:simpleType>
- <xs:attributeGroup name="occurs">
- <xs:annotation>
- <xs:documentation>
- for all particles
- </xs:documentation>
- </xs:annotation>
- <xs:attribute name="minOccurs" type="xs:nonNegativeInteger" use="optional" default="1"/>
- <xs:attribute name="maxOccurs" type="xs:allNNI" use="optional" default="1"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="defRef">
- <xs:annotation>
- <xs:documentation>
- for element, group and attributeGroup,
- which both define and reference
- </xs:documentation>
- </xs:annotation>
- <xs:attribute name="name" type="xs:NCName"/>
- <xs:attribute name="ref" type="xs:QName"/>
- </xs:attributeGroup>
- <xs:group name="typeDefParticle">
- <xs:annotation>
- <xs:documentation>
- 'complexType' uses this
- </xs:documentation>
- </xs:annotation>
- <xs:choice>
- <xs:element name="group" type="xs:groupRef"/>
- <xs:element ref="xs:all"/>
- <xs:element ref="xs:choice"/>
- <xs:element ref="xs:sequence"/>
- </xs:choice>
- </xs:group>
- <xs:group name="nestedParticle">
- <xs:choice>
- <xs:element name="element" type="xs:localElement"/>
- <xs:element name="group" type="xs:groupRef"/>
- <xs:element ref="xs:choice"/>
- <xs:element ref="xs:sequence"/>
- <xs:element ref="xs:any"/>
- </xs:choice>
- </xs:group>
- <xs:group name="particle">
- <xs:choice>
- <xs:element name="element" type="xs:localElement"/>
- <xs:element name="group" type="xs:groupRef"/>
- <xs:element ref="xs:all"/>
- <xs:element ref="xs:choice"/>
- <xs:element ref="xs:sequence"/>
- <xs:element ref="xs:any"/>
- </xs:choice>
- </xs:group>
- <xs:complexType name="attribute">
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:sequence>
- <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
- </xs:sequence>
- <xs:attributeGroup ref="xs:defRef"/>
- <xs:attribute name="type" type="xs:QName"/>
- <xs:attribute name="use" use="optional" default="optional">
- <xs:simpleType>
- <xs:restriction base="xs:NMTOKEN">
- <xs:enumeration value="prohibited"/>
- <xs:enumeration value="optional"/>
- <xs:enumeration value="required"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="default" type="xs:string"/>
- <xs:attribute name="fixed" type="xs:string"/>
- <xs:attribute name="form" type="xs:formChoice"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="topLevelAttribute">
- <xs:complexContent>
- <xs:restriction base="xs:attribute">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
- </xs:sequence>
- <xs:attribute name="ref" use="prohibited"/>
- <xs:attribute name="form" use="prohibited"/>
- <xs:attribute name="use" use="prohibited"/>
- <xs:attribute name="name" use="required" type="xs:NCName"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:group name="attrDecls">
- <xs:sequence>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="attribute" type="xs:attribute"/>
- <xs:element name="attributeGroup" type="xs:attributeGroupRef"/>
- </xs:choice>
- <xs:element ref="xs:anyAttribute" minOccurs="0"/>
- </xs:sequence>
- </xs:group>
- <xs:element name="anyAttribute" type="xs:wildcard" id="anyAttribute">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/>
- </xs:annotation>
- </xs:element>
- <xs:group name="complexTypeModel">
- <xs:choice>
- <xs:element ref="xs:simpleContent"/>
- <xs:element ref="xs:complexContent"/>
- <xs:sequence>
- <xs:annotation>
- <xs:documentation>
- This branch is short for
- <complexContent>
- <restriction base="xs:anyType">
- ...
- </restriction>
- </complexContent>
- </xs:documentation>
- </xs:annotation>
- <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
- <xs:group ref="xs:attrDecls"/>
- </xs:sequence>
- </xs:choice>
- </xs:group>
- <xs:complexType name="complexType" abstract="true">
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:group ref="xs:complexTypeModel"/>
- <xs:attribute name="name" type="xs:NCName">
- <xs:annotation>
- <xs:documentation>
- Will be restricted to required or forbidden
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false">
- <xs:annotation>
- <xs:documentation>
- Not allowed if simpleContent child is chosen.
- May be overriden by setting on complexContent child.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
- <xs:attribute name="final" type="xs:derivationSet"/>
- <xs:attribute name="block" type="xs:derivationSet"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="topLevelComplexType">
- <xs:complexContent>
- <xs:restriction base="xs:complexType">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:group ref="xs:complexTypeModel"/>
- </xs:sequence>
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="localComplexType">
- <xs:complexContent>
- <xs:restriction base="xs:complexType">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:group ref="xs:complexTypeModel"/>
- </xs:sequence>
- <xs:attribute name="name" use="prohibited"/>
- <xs:attribute name="abstract" use="prohibited"/>
- <xs:attribute name="final" use="prohibited"/>
- <xs:attribute name="block" use="prohibited"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="restrictionType">
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:sequence>
- <xs:choice minOccurs="0">
- <xs:group ref="xs:typeDefParticle"/>
- <xs:group ref="xs:simpleRestrictionModel"/>
- </xs:choice>
- <xs:group ref="xs:attrDecls"/>
- </xs:sequence>
- <xs:attribute name="base" type="xs:QName" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="complexRestrictionType">
- <xs:complexContent>
- <xs:restriction base="xs:restrictionType">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:choice minOccurs="0">
- <xs:annotation>
- <xs:documentation>This choice is added simply to
- make this a valid restriction per the REC
- </xs:documentation>
- </xs:annotation>
- <xs:group ref="xs:typeDefParticle"/>
- </xs:choice>
- <xs:group ref="xs:attrDecls"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="extensionType">
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:sequence>
- <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
- <xs:group ref="xs:attrDecls"/>
- </xs:sequence>
- <xs:attribute name="base" type="xs:QName" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:element name="complexContent" id="complexContent">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:choice>
- <xs:element name="restriction" type="xs:complexRestrictionType"/>
- <xs:element name="extension" type="xs:extensionType"/>
- </xs:choice>
- <xs:attribute name="mixed" type="xs:boolean">
- <xs:annotation>
- <xs:documentation>
- Overrides any setting on complexType parent.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:complexType name="simpleRestrictionType">
- <xs:complexContent>
- <xs:restriction base="xs:restrictionType">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:choice minOccurs="0">
- <xs:annotation>
- <xs:documentation>This choice is added simply to
- make this a valid restriction per the REC
- </xs:documentation>
- </xs:annotation>
- <xs:group ref="xs:simpleRestrictionModel"/>
- </xs:choice>
- <xs:group ref="xs:attrDecls"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="simpleExtensionType">
- <xs:complexContent>
- <xs:restriction base="xs:extensionType">
- <xs:sequence>
- <xs:annotation>
- <xs:documentation>
- No typeDefParticle group reference
- </xs:documentation>
- </xs:annotation>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:group ref="xs:attrDecls"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:element name="simpleContent" id="simpleContent">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:choice>
- <xs:element name="restriction" type="xs:simpleRestrictionType"/>
- <xs:element name="extension" type="xs:simpleExtensionType"/>
- </xs:choice>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="complexType" type="xs:topLevelComplexType" id="complexType">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/>
- </xs:annotation>
- </xs:element>
- <xs:simpleType name="blockSet">
- <xs:annotation>
- <xs:documentation>
- A utility type, not for public use
- </xs:documentation>
- <xs:documentation>
- #all or (possibly empty) subset of {substitution, extension,
- restriction}
- </xs:documentation>
- </xs:annotation>
- <xs:union>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="#all"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType>
- <xs:list>
- <xs:simpleType>
- <xs:restriction base="xs:derivationControl">
- <xs:enumeration value="extension"/>
- <xs:enumeration value="restriction"/>
- <xs:enumeration value="substitution"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:list>
- </xs:simpleType>
- </xs:union>
- </xs:simpleType>
- <xs:complexType name="element" abstract="true">
- <xs:annotation>
- <xs:documentation>
- The element element can be used either
- at the top level to define an element-type binding globally,
- or within a content model to either reference a globally-defined
- element or type or declare an element-type binding locally.
- The ref form is not allowed at the top level.
- </xs:documentation>
- </xs:annotation>
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:sequence>
- <xs:choice minOccurs="0">
- <xs:element name="simpleType" type="xs:localSimpleType"/>
- <xs:element name="complexType" type="xs:localComplexType"/>
- </xs:choice>
- <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attributeGroup ref="xs:defRef"/>
- <xs:attribute name="type" type="xs:QName"/>
- <xs:attribute name="substitutionGroup" type="xs:QName"/>
- <xs:attributeGroup ref="xs:occurs"/>
- <xs:attribute name="default" type="xs:string"/>
- <xs:attribute name="fixed" type="xs:string"/>
- <xs:attribute name="nillable" type="xs:boolean" use="optional" default="false"/>
- <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
- <xs:attribute name="final" type="xs:derivationSet"/>
- <xs:attribute name="block" type="xs:blockSet"/>
- <xs:attribute name="form" type="xs:formChoice"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="topLevelElement">
- <xs:complexContent>
- <xs:restriction base="xs:element">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:choice minOccurs="0">
- <xs:element name="simpleType" type="xs:localSimpleType"/>
- <xs:element name="complexType" type="xs:localComplexType"/>
- </xs:choice>
- <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="ref" use="prohibited"/>
- <xs:attribute name="form" use="prohibited"/>
- <xs:attribute name="minOccurs" use="prohibited"/>
- <xs:attribute name="maxOccurs" use="prohibited"/>
- <xs:attribute name="name" use="required" type="xs:NCName"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="localElement">
- <xs:complexContent>
- <xs:restriction base="xs:element">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:choice minOccurs="0">
- <xs:element name="simpleType" type="xs:localSimpleType"/>
- <xs:element name="complexType" type="xs:localComplexType"/>
- </xs:choice>
- <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="substitutionGroup" use="prohibited"/>
- <xs:attribute name="final" use="prohibited"/>
- <xs:attribute name="abstract" use="prohibited"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:element name="element" type="xs:topLevelElement" id="element">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/>
- </xs:annotation>
- </xs:element>
- <xs:complexType name="group" abstract="true">
- <xs:annotation>
- <xs:documentation>
- group type for explicit groups, named top-level groups and
- group references
- </xs:documentation>
- </xs:annotation>
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/>
- <xs:attributeGroup ref="xs:defRef"/>
- <xs:attributeGroup ref="xs:occurs"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="realGroup">
- <xs:complexContent>
- <xs:restriction base="xs:group">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:choice minOccurs="0" maxOccurs="1">
- <xs:element ref="xs:all"/>
- <xs:element ref="xs:choice"/>
- <xs:element ref="xs:sequence"/>
- </xs:choice>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="namedGroup">
- <xs:complexContent>
- <xs:restriction base="xs:realGroup">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:choice minOccurs="1" maxOccurs="1">
- <xs:element name="all">
- <xs:complexType>
- <xs:complexContent>
- <xs:restriction base="xs:all">
- <xs:group ref="xs:allModel"/>
- <xs:attribute name="minOccurs" use="prohibited"/>
- <xs:attribute name="maxOccurs" use="prohibited"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="choice" type="xs:simpleExplicitGroup"/>
- <xs:element name="sequence" type="xs:simpleExplicitGroup"/>
- </xs:choice>
- </xs:sequence>
- <xs:attribute name="name" use="required" type="xs:NCName"/>
- <xs:attribute name="ref" use="prohibited"/>
- <xs:attribute name="minOccurs" use="prohibited"/>
- <xs:attribute name="maxOccurs" use="prohibited"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="groupRef">
- <xs:complexContent>
- <xs:restriction base="xs:realGroup">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- </xs:sequence>
- <xs:attribute name="ref" use="required" type="xs:QName"/>
- <xs:attribute name="name" use="prohibited"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="explicitGroup">
- <xs:annotation>
- <xs:documentation>
- group type for the three kinds of group
- </xs:documentation>
- </xs:annotation>
- <xs:complexContent>
- <xs:restriction base="xs:group">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="name" type="xs:NCName" use="prohibited"/>
- <xs:attribute name="ref" type="xs:QName" use="prohibited"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="simpleExplicitGroup">
- <xs:complexContent>
- <xs:restriction base="xs:explicitGroup">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="minOccurs" use="prohibited"/>
- <xs:attribute name="maxOccurs" use="prohibited"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:group name="allModel">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>This choice with min/max is here to
- avoid a pblm with the Elt:All/Choice/Seq
- Particle derivation constraint
- </xs:documentation>
- </xs:annotation>
- <xs:element name="element">
- <xs:complexType>
- <xs:annotation>
- <xs:documentation>restricted max/min</xs:documentation>
- </xs:annotation>
- <xs:complexContent>
- <xs:restriction base="xs:localElement">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:choice minOccurs="0">
- <xs:element name="simpleType" type="xs:localSimpleType"/>
- <xs:element name="complexType" type="xs:localComplexType"/>
- </xs:choice>
- <xs:group ref="xs:identityConstraint" minOccurs="0"
- maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="minOccurs" use="optional" default="1">
- <xs:simpleType>
- <xs:restriction base="xs:nonNegativeInteger">
- <xs:enumeration value="0"/>
- <xs:enumeration value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="maxOccurs" use="optional" default="1">
- <xs:simpleType>
- <xs:restriction base="xs:allNNI">
- <xs:enumeration value="0"/>
- <xs:enumeration value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- </xs:choice>
- </xs:sequence>
- </xs:group>
- <xs:complexType name="all">
- <xs:annotation>
- <xs:documentation>
- Only elements allowed inside
- </xs:documentation>
- </xs:annotation>
- <xs:complexContent>
- <xs:restriction base="xs:explicitGroup">
- <xs:group ref="xs:allModel"/>
- <xs:attribute name="minOccurs" use="optional" default="1">
- <xs:simpleType>
- <xs:restriction base="xs:nonNegativeInteger">
- <xs:enumeration value="0"/>
- <xs:enumeration value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="maxOccurs" use="optional" default="1">
- <xs:simpleType>
- <xs:restriction base="xs:allNNI">
- <xs:enumeration value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:element name="all" id="all" type="xs:all">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/>
- </xs:annotation>
- </xs:element>
- <xs:element name="choice" type="xs:explicitGroup" id="choice">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>
- </xs:annotation>
- </xs:element>
- <xs:element name="sequence" type="xs:explicitGroup" id="sequence">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/>
- </xs:annotation>
- </xs:element>
- <xs:element name="group" type="xs:namedGroup" id="group">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>
- </xs:annotation>
- </xs:element>
- <xs:complexType name="wildcard">
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:attribute name="namespace" type="xs:namespaceList" use="optional"
- default="##any"/>
- <xs:attribute name="processContents" use="optional" default="strict">
- <xs:simpleType>
- <xs:restriction base="xs:NMTOKEN">
- <xs:enumeration value="skip"/>
- <xs:enumeration value="lax"/>
- <xs:enumeration value="strict"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:element name="any" id="any">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:wildcard">
- <xs:attributeGroup ref="xs:occurs"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:annotation>
- <xs:documentation>
- simple type for the value of the 'namespace' attr of
- 'any' and 'anyAttribute'
- </xs:documentation>
- </xs:annotation>
- <xs:annotation>
- <xs:documentation>
- Value is
- ##any - - any non-conflicting WFXML/attribute at all
-
- ##other - - any non-conflicting WFXML/attribute from
- namespace other than targetNS
-
- ##local - - any unqualified non-conflicting WFXML/attribute
-
- one or - - any non-conflicting WFXML/attribute from
- more URI the listed namespaces
- references
- (space separated)
-
- ##targetNamespace or ##local may appear in the above list, to
- refer to the targetNamespace of the enclosing
- schema or an absent targetNamespace respectively
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType name="namespaceList">
- <xs:annotation>
- <xs:documentation>
- A utility type, not for public use
- </xs:documentation>
- </xs:annotation>
- <xs:union>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="##any"/>
- <xs:enumeration value="##other"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType>
- <xs:list>
- <xs:simpleType>
- <xs:union memberTypes="xs:anyURI">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="##targetNamespace"/>
- <xs:enumeration value="##local"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
- </xs:simpleType>
- </xs:list>
- </xs:simpleType>
- </xs:union>
- </xs:simpleType>
- <xs:element name="attribute" type="xs:topLevelAttribute" id="attribute">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>
- </xs:annotation>
- </xs:element>
- <xs:complexType name="attributeGroup" abstract="true">
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:group ref="xs:attrDecls"/>
- <xs:attributeGroup ref="xs:defRef"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="namedAttributeGroup">
- <xs:complexContent>
- <xs:restriction base="xs:attributeGroup">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- <xs:group ref="xs:attrDecls"/>
- </xs:sequence>
- <xs:attribute name="name" use="required" type="xs:NCName"/>
- <xs:attribute name="ref" use="prohibited"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="attributeGroupRef">
- <xs:complexContent>
- <xs:restriction base="xs:attributeGroup">
- <xs:sequence>
- <xs:element ref="xs:annotation" minOccurs="0"/>
- </xs:sequence>
- <xs:attribute name="ref" use="required" type="xs:QName"/>
- <xs:attribute name="name" use="prohibited"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
- <xs:element name="attributeGroup" type="xs:namedAttributeGroup" id="attributeGroup">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>
- </xs:annotation>
- </xs:element>
- <xs:element name="include" id="include">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="redefine" id="redefine">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:openAttrs">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xs:annotation"/>
- <xs:group ref="xs:redefinable"/>
- </xs:choice>
- <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
- <xs:attribute name="id" type="xs:ID"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="import" id="import">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:attribute name="namespace" type="xs:anyURI"/>
- <xs:attribute name="schemaLocation" type="xs:anyURI"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="selector" id="selector">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:attribute name="xpath" use="required">
- <xs:simpleType>
- <xs:annotation>
- <xs:documentation>A subset of XPath expressions for use
- in selectors
- </xs:documentation>
- <xs:documentation>A utility type, not for public
- use
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:annotation>
- <xs:documentation>The following pattern is intended to allow
- XPath
- expressions per the following EBNF:
- Selector ::= Path ( '|' Path )*
- Path ::= ('.//')? Step ( '/' Step )*
- Step ::= '.' | NameTest
- NameTest ::= QName | '*' | NCName ':' '*'
- child:: is also allowed
- </xs:documentation>
- </xs:annotation>
- <xs:pattern
- value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*">
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="field" id="field">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:attribute name="xpath" use="required">
- <xs:simpleType>
- <xs:annotation>
- <xs:documentation>A subset of XPath expressions for use
- in fields
- </xs:documentation>
- <xs:documentation>A utility type, not for public
- use
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:annotation>
- <xs:documentation>The following pattern is intended to allow
- XPath
- expressions per the same EBNF as for selector,
- with the following change:
- Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
- </xs:documentation>
- </xs:annotation>
- <xs:pattern
- value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*">
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:complexType name="keybase">
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:sequence>
- <xs:element ref="xs:selector"/>
- <xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:group name="identityConstraint">
- <xs:annotation>
- <xs:documentation>The three kinds of identity constraints, all with
- type of or derived from 'keybase'.
- </xs:documentation>
- </xs:annotation>
- <xs:choice>
- <xs:element ref="xs:unique"/>
- <xs:element ref="xs:key"/>
- <xs:element ref="xs:keyref"/>
- </xs:choice>
- </xs:group>
- <xs:element name="unique" type="xs:keybase" id="unique">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/>
- </xs:annotation>
- </xs:element>
- <xs:element name="key" type="xs:keybase" id="key">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/>
- </xs:annotation>
- </xs:element>
- <xs:element name="keyref" id="keyref">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:keybase">
- <xs:attribute name="refer" type="xs:QName" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="notation" id="notation">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:annotated">
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- <xs:attribute name="public" type="xs:public"/>
- <xs:attribute name="system" type="xs:anyURI"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:simpleType name="public">
- <xs:annotation>
- <xs:documentation>
- A utility type, not for public use
- </xs:documentation>
- <xs:documentation>
- A public identifier, per ISO 8879
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token"/>
- </xs:simpleType>
- <xs:element name="appinfo" id="appinfo">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/>
- </xs:annotation>
- <xs:complexType mixed="true">
- <xs:sequence minOccurs="0" maxOccurs="unbounded">
- <xs:any processContents="lax"/>
- </xs:sequence>
- <xs:attribute name="source" type="xs:anyURI"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="documentation" id="documentation">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/>
- </xs:annotation>
- <xs:complexType mixed="true">
- <xs:sequence minOccurs="0" maxOccurs="unbounded">
- <xs:any processContents="lax"/>
- </xs:sequence>
- <xs:attribute name="source" type="xs:anyURI"/>
- <xs:attribute ref="xml:lang"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="annotation" id="annotation">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xs:openAttrs">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xs:appinfo"/>
- <xs:element ref="xs:documentation"/>
- </xs:choice>
- <xs:attribute name="id" type="xs:ID"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:annotation>
- <xs:documentation>
- notations for use within XML Schema schemas
- </xs:documentation>
- </xs:annotation>
- <xs:notation name="XMLSchemaStructures" public="structures"
- system="http://www.w3.org/2000/08/XMLSchema.xsd"/>
- <xs:notation name="XML" public="REC-xml-19980210"
- system="http://www.w3.org/TR/1998/REC-xml-19980210"/>
- <xs:complexType name="anyType" mixed="true">
- <xs:annotation>
- <xs:documentation>
- Not the real urType, but as close an approximation as we can
- get in the XML representation
- </xs:documentation>
- </xs:annotation>
- <xs:sequence>
- <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
- </xs:sequence>
- <xs:anyAttribute processContents="lax"/>
- </xs:complexType>
- <xs:annotation>
- <xs:documentation>
- First the built-in primitive datatypes. These definitions are for
- information only, the real built-in definitions are magic.
- </xs:documentation>
- <xs:documentation>
- For each built-in datatype in this schema (both primitive and
- derived) can be uniquely addressed via a URI constructed
- as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is the name of the datatype
-
- For example, to address the int datatype, the URI is:
-
- http://www.w3.org/2001/XMLSchema#int
-
- Additionally, each facet definition element can be uniquely
- addressed via a URI constructed as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is the name of the facet
-
- For example, to address the maxInclusive facet, the URI is:
-
- http://www.w3.org/2001/XMLSchema#maxInclusive
-
- Additionally, each facet usage in a built-in datatype definition
- can be uniquely addressed via a URI constructed as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is the name of the datatype, followed
- by a period (".") followed by the name of the facet
-
- For example, to address the usage of the maxInclusive facet in
- the definition of int, the URI is:
-
- http://www.w3.org/2001/XMLSchema#int.maxInclusive
-
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType name="string" id="string">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="length"/>
- <hfp:hasFacet name="minLength"/>
- <hfp:hasFacet name="maxLength"/>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasProperty name="ordered" value="false"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#string"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="preserve" id="string.preserve"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="boolean" id="boolean">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasProperty name="ordered" value="false"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="finite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#boolean"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="boolean.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="float" id="float">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="total"/>
- <hfp:hasProperty name="bounded" value="true"/>
- <hfp:hasProperty name="cardinality" value="finite"/>
- <hfp:hasProperty name="numeric" value="true"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#float"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="float.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="double" id="double">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="total"/>
- <hfp:hasProperty name="bounded" value="true"/>
- <hfp:hasProperty name="cardinality" value="finite"/>
- <hfp:hasProperty name="numeric" value="true"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#double"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="double.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="decimal" id="decimal">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="totalDigits"/>
- <hfp:hasFacet name="fractionDigits"/>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="total"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="true"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#decimal"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="decimal.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="duration" id="duration">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="partial"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#duration"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="duration.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="dateTime" id="dateTime">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="partial"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#dateTime"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="dateTime.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="time" id="time">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="partial"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#time"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="time.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="date" id="date">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="partial"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#date"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="date.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="gYearMonth" id="gYearMonth">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="partial"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="gYearMonth.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="gYear" id="gYear">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="partial"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gYear"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="gYear.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="gMonthDay" id="gMonthDay">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="partial"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="gMonthDay.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="gDay" id="gDay">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="partial"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gDay"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="gDay.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="gMonth" id="gMonth">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasFacet name="maxInclusive"/>
- <hfp:hasFacet name="maxExclusive"/>
- <hfp:hasFacet name="minInclusive"/>
- <hfp:hasFacet name="minExclusive"/>
- <hfp:hasProperty name="ordered" value="partial"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonth"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="gMonth.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="hexBinary" id="hexBinary">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="length"/>
- <hfp:hasFacet name="minLength"/>
- <hfp:hasFacet name="maxLength"/>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasProperty name="ordered" value="false"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#binary"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="hexBinary.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="base64Binary" id="base64Binary">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="length"/>
- <hfp:hasFacet name="minLength"/>
- <hfp:hasFacet name="maxLength"/>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasProperty name="ordered" value="false"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="base64Binary.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="anyURI" id="anyURI">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="length"/>
- <hfp:hasFacet name="minLength"/>
- <hfp:hasFacet name="maxLength"/>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasProperty name="ordered" value="false"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#anyURI"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="anyURI.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="QName" id="QName">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="length"/>
- <hfp:hasFacet name="minLength"/>
- <hfp:hasFacet name="maxLength"/>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasProperty name="ordered" value="false"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#QName"/>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="QName.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="NOTATION" id="NOTATION">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="length"/>
- <hfp:hasFacet name="minLength"/>
- <hfp:hasFacet name="maxLength"/>
- <hfp:hasFacet name="pattern"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasProperty name="ordered" value="false"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/>
- <xs:documentation>
- NOTATION cannot be used directly in a schema; rather a type
- must be derived from it by specifying at least one enumeration
- facet whose value is the name of a NOTATION declared in the
- schema.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true" id="NOTATION.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:annotation>
- <xs:documentation>
- Now the derived primitive types
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType name="normalizedString" id="normalizedString">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:whiteSpace value="replace" id="normalizedString.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="token" id="token">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#token"/>
- </xs:annotation>
- <xs:restriction base="xs:normalizedString">
- <xs:whiteSpace value="collapse" id="token.whiteSpace"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="language" id="language">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#language"/>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:pattern value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" id="language.pattern">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-LanguageID">
- pattern specifies the content of section 2.12 of XML 1.0e2
- and RFC 3066 (Revised version of RFC 1766).
- </xs:documentation>
- </xs:annotation>
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="IDREFS" id="IDREFS">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="length"/>
- <hfp:hasFacet name="minLength"/>
- <hfp:hasFacet name="maxLength"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasProperty name="ordered" value="false"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>
- </xs:annotation>
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:IDREF"/>
- </xs:simpleType>
- <xs:minLength value="1" id="IDREFS.minLength"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="ENTITIES" id="ENTITIES">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="length"/>
- <hfp:hasFacet name="minLength"/>
- <hfp:hasFacet name="maxLength"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasProperty name="ordered" value="false"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>
- </xs:annotation>
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:ENTITY"/>
- </xs:simpleType>
- <xs:minLength value="1" id="ENTITIES.minLength"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="NMTOKEN" id="NMTOKEN">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:pattern value="\c+" id="NMTOKEN.pattern">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
- pattern matches production 7 from the XML spec
- </xs:documentation>
- </xs:annotation>
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="NMTOKENS" id="NMTOKENS">
- <xs:annotation>
- <xs:appinfo>
- <hfp:hasFacet name="length"/>
- <hfp:hasFacet name="minLength"/>
- <hfp:hasFacet name="maxLength"/>
- <hfp:hasFacet name="enumeration"/>
- <hfp:hasFacet name="whiteSpace"/>
- <hfp:hasProperty name="ordered" value="false"/>
- <hfp:hasProperty name="bounded" value="false"/>
- <hfp:hasProperty name="cardinality" value="countably infinite"/>
- <hfp:hasProperty name="numeric" value="false"/>
- </xs:appinfo>
- <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>
- </xs:annotation>
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:NMTOKEN"/>
-
<TRUNCATED>
[03/11] Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl.xsl
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl.xsl b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl.xsl
deleted file mode 100644
index bdfd057..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl.xsl
+++ /dev/null
@@ -1,702 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsoap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- exclude-result-prefixes="wsdl xs wsoap">
- <!--
- Created by: Jonathan Marsh <jo...@wso2.com>
- 23 October 2006
- 7 November 2006 - JM: code review and cleanup + linked binding operations, added support for xs:import, wsdl:import
- -->
- <xsl:import href="annotated-xsd.xsl"/>
-
- <xsl:output method="html" indent="yes" encoding="UTF-8"/>
-
- <!--
- Many schemas refer to the built-in schema types. In order to navigate to those types, one needs
- to know where to load the schema for schemas, hopefully a local version with this stylesheet
- applied so the user can continue to navigate.
- -->
- <xsl:param name="xsd-schema-location" select="'/service-mgt/styles/XMLSchema.xsd'"/>
-
- <!-- QName resolving functions require the targetNamespace, so stuff it in a global variable. -->
- <xsl:variable name="targetNamespace" select="wsdl:definitions/@targetNamespace"/>
- <xsl:variable name="schemaTargetNamespace"
- select="wsdl:definitions/wsdl:types/xs:schema/@targetNamespace"/>
-
- <!-- Mozilla doesn't support the namespace axis, which makes simulating namespace declarations
- problematic. At least we can try alternate reconstruction methods if we know the functionality
- isn't there. -->
- <xsl:variable name="supports-namespace-axis" select="count(/*/namespace::*) > 0"/>
-
- <!-- === Main ========================================
- Main template for the wsdl document
- -->
- <xsl:template match="/">
- <html>
- <head>
- <title>WSDL 1.1 for
- <xsl:value-of select="wsdl:definitions/@targetNamespace"/>
- </title>
- <style type="text/css">
- <xsl:call-template name="css"/>
- <![CDATA[
-.annotation-area {width:19em}
-.schema-block {background-color:#EEE;}
-.schema {padding-left:7em; text-indent:-5em}
-.schema-top-level {padding-left: 8em; text-indent:-5em}
-.wsdl-top-level {padding-left: 6em; text-indent:-5em}
-.wsdl-second-level {padding-left: 7em; text-indent:-5em}
-.wsdl-message {padding-left: 6em; text-indent:-5em}
-
-.definitions {padding-left:5em; margin-bottom:1em; text-indent:-5em}
-.operation {background-color:rgb(215,206,221); text-align:right; border: 1px dashed black; padding:.5em}
-.message {background-color:rgb(240,206,206); text-align:right; border: 1px dashed black; padding:.5em}
-.portType {background-color:rgb(185,218,192); text-align:right; border: 1px dashed black; padding:.5em}
-.binding {background-color:rgb(218,208,185); text-align:right; border: 1px dashed black; padding:.5em}
-.service {background-color:rgb(240,197,166); text-align:right; border: 1px dashed black; padding:.5em}
-]]>
- </style>
- </head>
- <body>
- <xsl:apply-templates select="wsdl:definitions"/>
- <p/>
- <hr/>
- <table cellpadding="0" cellspacing="0" id="index">
- <xsl:if test="wsdl:definitions/wsdl:types/xs:schema">
- <xsl:for-each select="wsdl:definitions/wsdl:types">
- <xsl:call-template name="generate-xsd-index"/>
- </xsl:for-each>
- </xsl:if>
- <xsl:call-template name="generate-wsdl-index"/>
- </table>
- </body>
- </html>
- </xsl:template>
- <!-- === Elements ========================================
- The following templates format elements of various flavors
- (xs:schema, children of xs:schema, grandchildren etc. of schema, and extension elements
- -->
- <xsl:template match="wsdl:definitions">
- <table cellpadding="0" cellspacing="0">
- <tr>
- <td class="annotation-area">
- <div class="sidebar">
- <xsl:call-template name="index-reference"/>
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <div class="definitions">
- <xsl:call-template name="element-start"/>
- </div>
- </td>
- </tr>
- <xsl:apply-templates/>
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="source-area">
- <div class="definitions">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </table>
- </xsl:template>
- <xsl:template match="wsdl:definitions/wsdl:*">
- <xsl:variable name="identifier">
- <xsl:if test="@name">
- <xsl:text>_</xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="@name"/>
- </xsl:if>
- </xsl:variable>
- <tr>
- <xsl:choose>
- <xsl:when
- test="not(self::wsdl:documentation or self::wsdl:import or self::wsdl:include)">
- <td class="annotation-area">
- <div class="sidebar {local-name()} sidebar-title">
- <xsl:if test="$identifier">
- <xsl:attribute name="id">
- <xsl:value-of select="$identifier"/>
- </xsl:attribute>
- </xsl:if>
- <span class="sidebar-title-highlight">
- <xsl:value-of select="@name"/>
- </span>
- <xsl:text></xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:call-template name="wsdl-referenced-by"/>
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td colspan="2" class="annotation-area"/>
- </xsl:otherwise>
- </xsl:choose>
- <td class="source-area">
- <div>
- <xsl:choose>
- <xsl:when test="self::wsdl:message">
- <xsl:attribute name="class">wsdl-message</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="class">wsdl-top-level</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="element-start"/>
- </div>
- <div class="wsdl-top-level">
- <xsl:apply-templates/>
- </div>
- <div class="wsdl-top-level">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="wsdl:definitions/wsdl:portType">
- <tr>
- <td class="annotation-area">
- <div class="sidebar portType sidebar-title">
- <a name="_portType_{@name}"></a>
- <span class="sidebar-title-highlight">
- <xsl:value-of select="@name"/>
- </span>
- <xsl:text></xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:call-template name="wsdl-referenced-by"/>
- <xsl:call-template name="interface-defines"/>
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <div class="wsdl-top-level">
- <xsl:call-template name="element-start"/>
- <xsl:apply-templates select="wsdl:documentation"/>
- </div>
- </td>
- </tr>
- <xsl:apply-templates select="node()[not(self::wsdl:documentation)]"/>
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="source-area">
- <div class="wsdl-top-level">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="wsdl:portType/wsdl:operation">
- <tr>
- <td class="annotation-area">
- <div class="sidebar operation sidebar-title">
- <a name="_operation_{@name}"></a>
- <span class="sidebar-title-highlight">
- <xsl:value-of select="@name"/>
- </span>
- <xsl:text></xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:call-template name="wsdl-referenced-by"/>
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <div class="wsdl-second-level">
- <xsl:call-template name="element-start"/>
- </div>
- <div class="wsdl-second-level">
- <xsl:apply-templates/>
- </div>
- <div class="wsdl-second-level">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="wsdl:definitions/wsdl:types">
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="source-area">
- <div class="wsdl-top-level">
- <xsl:call-template name="element-start"/>
- </div>
- </td>
- </tr>
- <xsl:apply-templates/>
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="source-area">
- <div class="wsdl-top-level">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="xs:schema">
- <tr>
- <td colspan="2" class="schema-block annotation-area"/>
- <td class="schema-block source-area">
- <div class="schema">
- <xsl:call-template name="element-start"/>
- </div>
- </td>
- </tr>
- <xsl:apply-templates/>
- <tr>
- <td colspan="2" class="schema-block annotation-area"/>
- <td class="schema-block source-area">
- <div class="schema">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="xs:*">
- <xsl:apply-imports/>
- </xsl:template>
- <xsl:template match="wsdl:* | wsoap:*">
- <div class="indent">
- <div>
- <xsl:call-template name="element-start"/>
- </div>
- <xsl:apply-templates/>
- <div>
- <xsl:call-template name="element-end"/>
- </div>
- </div>
- </xsl:template>
-
- <!-- === Attributes =========================================
- The following templates format attributes of various flavors
- -->
- <xsl:template match="wsdl:*/@id">
- <a name="{@id}"/>
- <xsl:call-template name="attribute">
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:binding/wsdl:operation/@name" priority="1">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-wsdl-reference"/>
- <xsl:text>#_operation_</xsl:text>
- <xsl:value-of select="."/>
- </xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:*/@name">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:part/@element">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-schema-reference"/>
- <xsl:text>#_</xsl:text>
- <xsl:value-of select="name()"/>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="substring-after(.,':')"/>
- </xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template
- match="wsdl:input/@message | wsdl:output/@message | wsdl:port/@binding | wsdl:binding/@type">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-wsdl-reference"/>
- <xsl:text>#_</xsl:text>
- <xsl:choose>
- <xsl:when test="name() = 'type'">portType</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="name()"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="substring-after(.,':')"/>
- </xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:*/@id">
- <a name="{@id}"/>
- <xsl:call-template name="attribute">
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:*/@* | wsoap:*/@*" priority="0">
- <xsl:call-template name="attribute">
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
-
- <!-- === Comments ========================================
- The following template formats comment nodes
- -->
- <xsl:template match="wsdl:definitions/comment()">
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="schema-top-level source-area">
- <div class="markup-comment">
- <xsl:text><!--</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>--></xsl:text>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="wsdl:portType/comment()">
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="wsdl-second-level source-area">
- <div class="markup-comment">
- <xsl:text><!--</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>--></xsl:text>
- </div>
- </td>
- </tr>
- </xsl:template>
-
- <!-- === Library templates ========================================
- Library of useful named templates
- -->
- <xsl:template name="insert-wsdl-reference">
- <xsl:if test="parent::wsdl:operation">
- <a href="#_operation_{../@name}">
- <xsl:value-of select="../@name"/>
- </a>
- <xsl:text>operation of the</xsl:text>
- </xsl:if>
- <xsl:for-each select="ancestor-or-self::*[last() - 1]">
- <a href="#_{local-name(.)}_{@name}">
- <xsl:value-of select="@name"/>
- </a>
- <xsl:text></xsl:text>
- <xsl:value-of select="local-name(.)"/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="wsdl-referenced-by">
- <xsl:variable name="target" select="@name"/>
- <xsl:if test="parent::wsdl:definitions">
- <div class="sidebar-text">
- <xsl:variable name="extended-by" select="//wsdl:*[substring-after(@element | @message | @binding
- | @type,':') = $target]"/>
- <xsl:if test="count($extended-by) > 0">
- <div class="referenced-list">Referenced by:</div>
- <ul>
- <xsl:for-each select="$extended-by">
- <xsl:sort select="@element | @message | @binding | @type"/>
- <li class="referenced-item">
- <xsl:call-template name="insert-wsdl-reference"/>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </div>
- </xsl:if>
- </xsl:template>
- <xsl:template name="interface-defines">
- <xsl:variable name="target" select="@name"/>
- <div class="sidebar-text">
- <xsl:if test="wsdl:operation">
- <div class="referenced-list">Defines operations:</div>
- <ul>
- <xsl:for-each select="wsdl:operation">
- <xsl:sort select="@name"/>
- <li class="referenced-item">
- <a href="#_operation_{@name}">
- <xsl:value-of select="@name"/>
- </a>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </div>
- </xsl:template>
- <xsl:template name="additional-references">
- <xsl:param name="target"/>
- <xsl:variable name="referenced-by"
- select="/wsdl:definitions/wsdl:message/wsdl:part[substring-after(@element,':') = $target]"/>
- <xsl:if test="count($referenced-by) > 0">
- <div class="referenced-list">Referenced from WSDL by:</div>
- <ul>
- <xsl:for-each select="$referenced-by">
- <xsl:sort select="@element"/>
- <li class="referenced-item">
- <xsl:call-template name="insert-wsdl-reference"/>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </xsl:template>
- <xsl:template name="external-wsdl-reference">
- <xsl:choose>
- <xsl:when test="$supports-namespace-axis">
- <xsl:if test="not(../namespace::*[. = $targetNamespace and name(.) =
- substring-before(current(),':')])">
- <xsl:variable name="prefix" select="substring-before(.,':')"/>
- <xsl:variable name="uri" select="../namespace::*[name(.) = $prefix]"/>
- <xsl:value-of
- select="/wsdl:definitions/wsdl:import[@namespace=$uri]/@location"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when
- test="substring-before(current(),':')= 'xs' or substring-before(current(),':')= 'xsd'">
- <xsl:value-of select="$xsd-schema-location"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- the link is broken - Bad Mozilla -->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="external-schema-reference">
- <xsl:choose>
- <xsl:when test="$supports-namespace-axis">
- <xsl:if test="not(../namespace::*[. = $schemaTargetNamespace and name(.) =
- substring-before(current(),':')])">
- <xsl:variable name="prefix" select="substring-before(.,':')"/>
- <xsl:variable name="uri" select="../namespace::*[name(.) = $prefix]"/>
- <xsl:choose>
- <xsl:when test="$uri = 'http://www.w3.org/2001/XMLSchema'">
- <xsl:value-of select="$xsd-schema-location"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
- select="/wsdl:definitions/wsdl:types/xs:schema/xs:import[@namespace=$uri]/@schemaLocation"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when
- test="substring-before(current(),':')= 'xs' or substring-before(current(),':')= 'xsd'">
- <xsl:value-of select="$xsd-schema-location"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- the link is broken - Bad Mozilla -->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="generate-wsdl-index">
- <xsl:if test="wsdl:definitions/wsdl:message">
- <tr>
- <td id="message-list" class="annotation-area">
- <div class="message sidebar sidebar-title-highlight">Index of messages</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="wsdl:definitions/wsdl:message">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="wsdl:definitions/wsdl:portType">
- <tr>
- <td id="portType-list" class="annotation-area">
- <div class="portType sidebar sidebar-title-highlight">Index of portTypes</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="wsdl:definitions/wsdl:portType">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="wsdl:definitions/wsdl:portType/wsdl:operation">
- <tr>
- <td id="operation-list" class="annotation-area">
- <div class="operation sidebar sidebar-title-highlight">Index of operations</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="wsdl:definitions/wsdl:portType/wsdl:operation">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="wsdl:definitions/wsdl:binding">
- <tr>
- <td id="binding-list" class="annotation-area">
- <div class="binding sidebar sidebar-title-highlight">Index of bindings</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="wsdl:definitions/wsdl:binding">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="wsdl:definitions/wsdl:service">
- <tr>
- <td id="service-list" class="annotation-area">
- <div class="service sidebar sidebar-title-highlight">Index of services</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="wsdl:definitions/wsdl:service">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- </xsl:template>
- <xsl:template name="index-reference">
- <div class="note sidebar-text">See the
- <a href="#index">index</a>
- of
- <xsl:variable name="ss1">
- <xsl:if test="wsdl:types/xs:schema/xs:complexType">
- <a href="#complexType-list">complexTypes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss2">
- <xsl:copy-of select="$ss1"/>
- <xsl:if test="wsdl:types/xs:schema/xs:simpleType">
- <xsl:if test="$ss1!=''">,</xsl:if>
- <a href="#simpleType-list">simpleTypes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss3">
- <xsl:copy-of select="$ss2"/>
- <xsl:if test="wsdl:types/xs:schema/xs:element">
- <xsl:if test="$ss2!=''">,</xsl:if>
- <a href="#global-element-list">global elements</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss4">
- <xsl:copy-of select="$ss3"/>
- <xsl:if test="wsdl:types/xs:schema/*//xs:element[@name]">
- <xsl:if test="$ss3!=''">,</xsl:if>
- <a href="#local-element-list">local elements</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss5">
- <xsl:copy-of select="$ss4"/>
- <xsl:if test="wsdl:types/xs:schema/xs:attribute">
- <xsl:if test="$ss4!=''">,</xsl:if>
- <a href="#global-attribute-list">global attributes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss6">
- <xsl:copy-of select="$ss5"/>
- <xsl:if test="wsdl:types/xs:schema/*//xs:attribute[@name]">
- <xsl:if test="$ss5!=''">,</xsl:if>
- <a href="#local-attribute-list">local attributes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss7">
- <xsl:copy-of select="$ss6"/>
- <xsl:if test="wsdl:types/xs:schema/xs:group">
- <xsl:if test="$ss6!=''">,</xsl:if>
- <a href="#model-group-list">model groups</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss8">
- <xsl:copy-of select="$ss7"/>
- <xsl:if test="wsdl:types/xs:schema/xs:attributeGroup">
- <xsl:if test="$ss7!=''">,</xsl:if>
- <a href="#attributeGroup-list">attribute groups</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss9">
- <xsl:copy-of select="$ss8"/>
- <xsl:if test="wsdl:message">
- <xsl:if test="$ss8!=''">,</xsl:if>
- <a href="#message-list">messages</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss10">
- <xsl:copy-of select="$ss9"/>
- <xsl:if test="wsdl:portType">
- <xsl:if test="$ss9!=''">,</xsl:if>
- <a href="#portType-list">portTypes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss11">
- <xsl:copy-of select="$ss10"/>
- <xsl:if test="wsdl:portType/wsdl:operation">
- <xsl:if test="$ss10!=''">,</xsl:if>
- <a href="#operation-list">operations</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss12">
- <xsl:copy-of select="$ss11"/>
- <xsl:if test="wsdl:binding">
- <xsl:if test="$ss11!=''">,</xsl:if>
- <a href="#binding-list">bindings</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss13">
- <xsl:copy-of select="$ss12"/>
- <xsl:if test="wsdl:service">
- <xsl:if test="$ss12!=''">,</xsl:if>
- <a href="#service-list">services</a>
- </xsl:if>
- </xsl:variable>
- <xsl:copy-of select="$ss13"/>
- <xsl:text>defined in this wsdl</xsl:text>
- </div>
- </xsl:template>
-</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl2.xsl
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl2.xsl b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl2.xsl
deleted file mode 100644
index cdb07fd..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-wsdl2.xsl
+++ /dev/null
@@ -1,721 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:wsdl="http://www.w3.org/ns/wsdl"
- xmlns:wsoap="http://www.w3.org/ns/wsdl/soap"
- xmlns:whttp="http://www.w3.org/ns/wsdl/http"
- xmlns:wrpc="http://www.w3.org/ns/wsdl/rpc"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- exclude-result-prefixes="wsdl xs wsoap">
- <!--
- Created by: Jonathan Marsh <jo...@wso2.com>
- 8 November 2006
- -->
- <xsl:import href="annotated-xsd.xsl"/>
-
- <xsl:output method="html" indent="yes" encoding="UTF-8"/>
-
- <!--
- Many schemas refer to the built-in schema types. In order to navigate to those types, one needs
- to know where to load the schema for schemas, hopefully a local version with this stylesheet
- applied so the user can continue to navigate.
- -->
- <xsl:param name="xsd-schema-location" select="'/service-mgt/styles/XMLSchema.xsd'"/>
-
- <!-- QName resolving functions require the targetNamespace, so stuff it in a global variable. -->
- <xsl:variable name="targetNamespace" select="wsdl:description/@targetNamespace"/>
- <xsl:variable name="schemaTargetNamespace"
- select="wsdl:description/wsdl:types/xs:schema/@targetNamespace"/>
-
- <!-- Mozilla doesn't support the namespace axis, which makes simulating namespace declarations
- problematic. At least we can try alternate reconstruction methods if we know the functionality
- isn't there. -->
- <xsl:variable name="supports-namespace-axis" select="count(/*/namespace::*) > 0"/>
-
- <!-- === Main ========================================
- Main template for the wsdl document
- -->
- <xsl:template match="/">
- <html>
- <head>
- <title>WSDL 2.0 for
- <xsl:value-of select="wsdl:description/@targetNamespace"/>
- </title>
- <style type="text/css">
- <xsl:call-template name="css"/>
- <![CDATA[
-.annotation-area {width:19em}
-.schema-block {background-color:#EEE;}
-.schema {padding-left:7em; text-indent:-5em}
-.schema-top-level {padding-left: 8em; text-indent:-5em}
-.wsdl-top-level {padding-left: 6em; text-indent:-5em}
-.wsdl-second-level {padding-left: 7em; text-indent:-5em}
-.wsdl-message {padding-left: 6em; text-indent:-5em}
-
-.description {padding-left:5em; margin-bottom:1em; text-indent:-5em}
-.operation {background-color:rgb(215,206,221); text-align:right; border: 1px dashed black; padding:.5em}
-.fault {background-color:rgb(240,206,206); text-align:right; border: 1px dashed black; padding:.5em}
-.interface {background-color:rgb(185,218,192); text-align:right; border: 1px dashed black; padding:.5em}
-.binding {background-color:rgb(218,208,185); text-align:right; border: 1px dashed black; padding:.5em}
-.service {background-color:rgb(240,197,166); text-align:right; border: 1px dashed black; padding:.5em}
-]]>
- </style>
- </head>
- <body>
- <xsl:apply-templates select="wsdl:description"/>
- <p/>
- <hr/>
- <table cellpadding="0" cellspacing="0" id="index">
- <xsl:if test="wsdl:description/wsdl:types/xs:schema">
- <xsl:for-each select="wsdl:description/wsdl:types">
- <xsl:call-template name="generate-xsd-index"/>
- </xsl:for-each>
- </xsl:if>
- <xsl:call-template name="generate-wsdl-index"/>
- </table>
- </body>
- </html>
- </xsl:template>
- <!-- === Elements ========================================
- The following templates format elements of various flavors
- (wsdl:description, children of wsdl:description, grandchildren etc. of wsdl:description,
- and extension elements
- -->
- <xsl:template match="wsdl:description">
- <table cellpadding="0" cellspacing="0">
- <tr>
- <td class="annotation-area">
- <div class="sidebar">
- <xsl:call-template name="index-reference"/>
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <div class="description">
- <xsl:call-template name="element-start"/>
- </div>
- </td>
- </tr>
- <xsl:apply-templates/>
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="source-area">
- <div class="description">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </table>
- </xsl:template>
- <xsl:template match="wsdl:description/wsdl:*">
- <xsl:variable name="identifier">
- <xsl:if test="@name">
- <xsl:text>_</xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="@name"/>
- </xsl:if>
- </xsl:variable>
- <tr>
- <xsl:choose>
- <xsl:when
- test="not(self::wsdl:documentation or self::wsdl:import or self::wsdl:include)">
- <td class="annotation-area">
- <div class="sidebar {local-name()} sidebar-title">
- <xsl:if test="$identifier">
- <xsl:attribute name="id">
- <xsl:value-of select="$identifier"/>
- </xsl:attribute>
- </xsl:if>
- <span class="sidebar-title-highlight">
- <xsl:value-of select="@name"/>
- </span>
- <xsl:text></xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:call-template name="wsdl-referenced-by"/>
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td colspan="2" class="annotation-area"/>
- </xsl:otherwise>
- </xsl:choose>
- <td class="source-area">
- <div class="wsdl-top-level">
- <xsl:call-template name="element-start"/>
- </div>
- <div class="wsdl-top-level">
- <xsl:apply-templates/>
- </div>
- <div class="wsdl-top-level">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="wsdl:description/wsdl:interface">
- <tr>
- <td class="annotation-area">
- <div class="sidebar interface sidebar-title">
- <a name="_interface_{@name}"></a>
- <span class="sidebar-title-highlight">
- <xsl:value-of select="@name"/>
- </span>
- <xsl:text></xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:call-template name="wsdl-referenced-by"/>
- <xsl:call-template name="interface-defines"/>
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <div class="wsdl-top-level">
- <xsl:call-template name="element-start"/>
- <xsl:apply-templates select="wsdl:documentation"/>
- </div>
- </td>
- </tr>
- <xsl:apply-templates select="node()[not(self::wsdl:documentation)]"/>
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="source-area">
- <div class="wsdl-top-level">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="wsdl:interface/wsdl:operation | wsdl:interface/wsdl:fault">
- <tr>
- <td class="annotation-area">
- <div class="sidebar {local-name()} sidebar-title">
- <a name="_{local-name()}_{@name}"></a>
- <span class="sidebar-title-highlight">
- <xsl:value-of select="@name"/>
- </span>
- <xsl:text></xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:call-template name="wsdl-referenced-by"/>
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <div class="wsdl-second-level">
- <xsl:call-template name="element-start"/>
- </div>
- <div class="wsdl-second-level">
- <xsl:apply-templates/>
- </div>
- <div class="wsdl-second-level">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="wsdl:description/wsdl:types">
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="source-area">
- <div class="wsdl-top-level">
- <xsl:call-template name="element-start"/>
- </div>
- </td>
- </tr>
- <xsl:apply-templates/>
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="source-area">
- <div class="wsdl-top-level">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="xs:schema | xs:import">
- <tr>
- <td colspan="2" class="schema-block annotation-area"/>
- <td class="schema-block source-area">
- <div class="schema">
- <xsl:call-template name="element-start"/>
- </div>
- </td>
- </tr>
- <xsl:apply-templates/>
- <tr>
- <td colspan="2" class="schema-block annotation-area"/>
- <td class="schema-block source-area">
- <div class="schema">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="xs:*">
- <xsl:apply-imports/>
- </xsl:template>
- <xsl:template match="wsdl:* | wsoap:* | whttp:*">
- <div class="indent">
- <div>
- <xsl:call-template name="element-start"/>
- </div>
- <xsl:apply-templates/>
- <div>
- <xsl:call-template name="element-end"/>
- </div>
- </div>
- </xsl:template>
-
- <!-- === Attributes =========================================
- The following templates format attributes of various flavors
- -->
- <xsl:template match="wsdl:binding/wsdl:operation/@name | wsdl:binding/wsdl:fault/@name"
- priority="1">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-wsdl-reference"/>
- <xsl:text>#_</xsl:text>
- <xsl:value-of select="local-name(parent::*)"/>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="."/>
- </xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:*/@name">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template
- match="wsdl:input/@element[not(contains(.,'#'))] | wsdl:output/@element[not(contains(.,'#'))] | wsdl:fault/@element[not(contains(.,'#'))]">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-schema-reference"/>
- <xsl:text>#_</xsl:text>
- <xsl:value-of select="name()"/>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="substring-after(.,':')"/>
- </xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:infault/@ref | wsdl:outfault/@ref |wsdl:fault/@ref">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-schema-reference"/>
- <xsl:text>#_fault_</xsl:text>
- <xsl:value-of select="substring-after(.,':')"/>
- </xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:operation/@ref">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-schema-reference"/>
- <xsl:text>#_operation_</xsl:text>
- <xsl:value-of select="substring-after(.,':')"/>
- </xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:service/@interface | wsdl:interface/@extends">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-schema-reference"/>
- <xsl:text>#_interface_</xsl:text>
- <xsl:value-of select="substring-after(.,':')"/>
- </xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:endpoint/@binding">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-schema-reference"/>
- <xsl:text>#_binding_</xsl:text>
- <xsl:value-of select="substring-after(.,':')"/>
- </xsl:with-param>
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="wsdl:*/@* | wsoap:*/@* | whttp:*/@*" priority="0">
- <xsl:call-template name="attribute">
- <xsl:with-param name="native-attribute" select="true()"/>
- </xsl:call-template>
- </xsl:template>
-
- <!-- === Comments ========================================
- The following template formats comment nodes
- -->
- <xsl:template match="wsdl:description/comment()">
- <tr>
- <td colspan="2" class="annotation-area"/>
- <td class="source-area">
- <div class="schema-top-level markup-comment">
- <xsl:text><!--</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>--></xsl:text>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="wsdl:interface/comment()">
- <div class="markup-comment double-indent">
- <xsl:text><!--</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>--></xsl:text>
- </div>
- </xsl:template>
-
- <!-- === Library templates ========================================
- Library of useful named templates
- -->
- <xsl:template name="insert-wsdl-reference">
- <xsl:if test="parent::wsdl:operation">
- <a href="#_operation_{../@name}">
- <xsl:value-of select="../@name"/>
- </a>
- <xsl:text>operation of the</xsl:text>
- </xsl:if>
- <xsl:for-each select="ancestor-or-self::*[last() - 1]">
- <a href="#_{local-name(.)}_{@name}">
- <xsl:value-of select="@name"/>
- </a>
- <xsl:text></xsl:text>
- <xsl:value-of select="local-name(.)"/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="wsdl-referenced-by">
- <xsl:variable name="target" select="@name"/>
- <xsl:if test="parent::wsdl:description">
- <div class="sidebar-text">
- <xsl:variable name="extended-by" select="//wsdl:*[substring-after(@element | @binding
- | @interface,':') = $target]"/>
- <xsl:if test="count($extended-by) > 0">
- <div class="referenced-list">Referenced by:</div>
- <ul>
- <xsl:for-each select="$extended-by">
- <xsl:sort select="@element | @binding | @interface"/>
- <li class="referenced-item">
- <xsl:call-template name="insert-wsdl-reference"/>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </div>
- </xsl:if>
- </xsl:template>
- <xsl:template name="interface-defines">
- <xsl:variable name="target" select="@name"/>
- <div class="sidebar-text">
- <xsl:if test="wsdl:fault">
- <div class="referenced-list">Defines faults:</div>
- <ul>
- <xsl:for-each select="wsdl:fault">
- <xsl:sort select="@name"/>
- <li class="referenced-item">
- <a href="#_fault_{@name}">
- <xsl:value-of select="@name"/>
- </a>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- <xsl:if test="wsdl:operation">
- <div class="referenced-list">Defines operations:</div>
- <ul>
- <xsl:for-each select="wsdl:operation">
- <xsl:sort select="@name"/>
- <li class="referenced-item">
- <a href="#_operation_{@name}">
- <xsl:value-of select="@name"/>
- </a>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </div>
- </xsl:template>
- <xsl:template name="additional-references">
- <xsl:param name="target"/>
- <xsl:variable name="referenced-by"
- select="/wsdl:description/wsdl:interface/wsdl:operation/wsdl:*[substring-after(@element,':') = $target]"/>
- <xsl:if test="count($referenced-by) > 0">
- <div class="referenced-list">Referenced from WSDL by:</div>
- <ul>
- <xsl:for-each select="$referenced-by">
- <xsl:sort select="@element"/>
- <li class="referenced-item">
- <xsl:call-template name="insert-wsdl-reference"/>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </xsl:template>
- <xsl:template name="external-wsdl-reference">
- <xsl:choose>
- <xsl:when test="$supports-namespace-axis">
- <xsl:if test="not(../namespace::*[. = $targetNamespace and name(.) =
- substring-before(current(),':')])">
- <xsl:variable name="prefix" select="substring-before(.,':')"/>
- <xsl:variable name="uri" select="../namespace::*[name(.) = $prefix]"/>
- <xsl:value-of
- select="/wsdl:description/wsdl:import[@namespace=$uri]/@location"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when
- test="substring-before(current(),':')= 'xs' or substring-before(current(),':')= 'xsd'">
- <xsl:value-of select="$xsd-schema-location"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- the link is broken - Bad Mozilla -->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="external-schema-reference">
- <xsl:choose>
- <xsl:when test="$supports-namespace-axis">
- <xsl:if test="not(../namespace::*[. = $schemaTargetNamespace and name(.) =
- substring-before(current(),':')])">
- <xsl:variable name="prefix" select="substring-before(.,':')"/>
- <xsl:variable name="uri" select="../namespace::*[name(.) = $prefix]"/>
- <xsl:choose>
- <xsl:when test="$uri = 'http://www.w3.org/2001/XMLSchema'">
- <xsl:value-of select="$xsd-schema-location"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
- select="/wsdl:description/wsdl:types/xs:import[@namespace=$uri]/@schemaLocation"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when
- test="substring-before(current(),':')= 'xs' or substring-before(current(),':')= 'xsd'">
- <xsl:value-of select="$xsd-schema-location"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- the link is broken - Bad Mozilla -->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="generate-wsdl-index">
- <xsl:if test="wsdl:description/wsdl:interface">
- <tr>
- <td id="interface-list" class="annotation-area">
- <div class="interface sidebar sidebar-title-highlight">Index of interfaces</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="wsdl:description/wsdl:interface">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="wsdl:description/wsdl:interface/wsdl:fault">
- <tr>
- <td id="fault-list" class="annotation-area">
- <div class="fault sidebar sidebar-title-highlight">Index of faults</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="wsdl:description/wsdl:interface/wsdl:fault">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="wsdl:description/wsdl:interface/wsdl:operation">
- <tr>
- <td id="operation-list" class="annotation-area">
- <div class="operation sidebar sidebar-title-highlight">Index of operations</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="wsdl:description/wsdl:interface/wsdl:operation">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="wsdl:description/wsdl:binding">
- <tr>
- <td id="binding-list" class="annotation-area">
- <div class="binding sidebar sidebar-title-highlight">Index of bindings</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="wsdl:description/wsdl:binding">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="wsdl:description/wsdl:service">
- <tr>
- <td id="service-list" class="annotation-area">
- <div class="service sidebar sidebar-title-highlight">Index of services</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="wsdl:description/wsdl:service">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- </xsl:template>
- <xsl:template name="index-reference">
- <div class="note sidebar-text">See the
- <a href="#index">index</a>
- of
- <xsl:variable name="ss1">
- <xsl:if test="wsdl:types/xs:schema/xs:complexType">
- <a href="#complexType-list">complexTypes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss2">
- <xsl:copy-of select="$ss1"/>
- <xsl:if test="wsdl:types/xs:schema/xs:simpleType">
- <xsl:if test="$ss1!=''">,</xsl:if>
- <a href="#simpleType-list">simpleTypes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss3">
- <xsl:copy-of select="$ss2"/>
- <xsl:if test="wsdl:types/xs:schema/xs:element">
- <xsl:if test="$ss2!=''">,</xsl:if>
- <a href="#global-element-list">global elements</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss4">
- <xsl:copy-of select="$ss3"/>
- <xsl:if test="wsdl:types/xs:schema/*//xs:element[@name]">
- <xsl:if test="$ss3!=''">,</xsl:if>
- <a href="#local-element-list">local elements</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss5">
- <xsl:copy-of select="$ss4"/>
- <xsl:if test="wsdl:types/xs:schema/xs:attribute">
- <xsl:if test="$ss4!=''">,</xsl:if>
- <a href="#global-attribute-list">global attributes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss6">
- <xsl:copy-of select="$ss5"/>
- <xsl:if test="wsdl:types/xs:schema/*//xs:attribute[@name]">
- <xsl:if test="$ss5!=''">,</xsl:if>
- <a href="#local-attribute-list">local attributes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss7">
- <xsl:copy-of select="$ss6"/>
- <xsl:if test="wsdl:types/xs:schema/xs:group">
- <xsl:if test="$ss6!=''">,</xsl:if>
- <a href="#model-group-list">model groups</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss8">
- <xsl:copy-of select="$ss7"/>
- <xsl:if test="wsdl:types/xs:schema/xs:attributeGroup">
- <xsl:if test="$ss7!=''">,</xsl:if>
- <a href="#attributeGroup-list">attribute groups</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss9">
- <xsl:copy-of select="$ss8"/>
- <xsl:if test="wsdl:interface">
- <xsl:if test="$ss8!=''">,</xsl:if>
- <a href="#interface-list">interfaces</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss10">
- <xsl:copy-of select="$ss9"/>
- <xsl:if test="wsdl:interface/wsdl:fault">
- <xsl:if test="$ss9!=''">,</xsl:if>
- <a href="#fault-list">faults</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss11">
- <xsl:copy-of select="$ss10"/>
- <xsl:if test="wsdl:interface/wsdl:operation">
- <xsl:if test="$ss10!=''">,</xsl:if>
- <a href="#operation-list">operations</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss12">
- <xsl:copy-of select="$ss11"/>
- <xsl:if test="wsdl:binding">
- <xsl:if test="$ss11!=''">,</xsl:if>
- <a href="#binding-list">bindings</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss13">
- <xsl:copy-of select="$ss12"/>
- <xsl:if test="wsdl:service">
- <xsl:if test="$ss12!=''">,</xsl:if>
- <a href="#service-list">services</a>
- </xsl:if>
- </xsl:variable>
- <xsl:copy-of select="$ss13"/>
- <xsl:text>defined in this wsdl</xsl:text>
- </div>
- </xsl:template>
-</xsl:stylesheet>
[02/11] Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-xsd.xsl
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-xsd.xsl b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-xsd.xsl
deleted file mode 100644
index 3209e7c..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/annotated-xsd.xsl
+++ /dev/null
@@ -1,850 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
- <!--
- Created by: Jonathan Marsh <jo...@wso2.com>
- 23 October 2006
- 7 November 2006 - JM: code review and cleanup
- -->
- <xsl:output method="html" indent="yes" encoding="UTF-8"/>
- <!--
- Many schemas refer to the built-in schema types. In order to navigate to those types, one needs
- to know where to load the schema for schemas, hopefully a local version with this stylesheet
- applied so the user can continue to navigate.
- -->
- <xsl:param name="xsd-schema-location" select="'/service-mgt/styles/XMLSchema.xsd'"/>
-
- <!-- QName resolving functions require the targetNamespace, so stuff it in a global variable. -->
- <xsl:variable name="targetNamespace" select="xs:schema/@targetNamespace"/>
-
- <!-- Mozilla doesn't support the namespace axis, which makes simulating namespace declarations
- problematic. At least we can try alternate reconstruction methods if we know the functionality
- isn't there. -->
- <xsl:variable name="supports-namespace-axis" select="count(/*/namespace::*) > 0"/>
-
- <!-- === Main ========================================
- Main template for the schema document
- -->
- <xsl:template match="/">
- <html>
- <head>
- <title>Schema for
- <xsl:value-of select="xs:schema/@targetNamespace"/>
- </title>
- <style type="text/css">
- <xsl:call-template name="css"/>
- </style>
- </head>
- <body>
- <!-- use a table to ensure sidebars longer than their associated tag don't run into the following sidebar.
- CSS would be preferable (progressive rendering would be improved) if there were a way to do this (I can't find one.) -->
- <table cellpadding="0" cellspacing="0">
- <xsl:apply-templates select="xs:schema"/>
- </table>
- <p/>
- <hr/>
- <table cellpadding="0" cellspacing="0" id="index">
- <xsl:call-template name="generate-xsd-index"/>
- </table>
- </body>
- </html>
- </xsl:template>
- <!-- === Elements ========================================
- The following templates format elements of various flavors
- (xs:schema, children of xs:schema, grandchildren etc. of schema, and extension elements)
- -->
- <xsl:template match="xs:schema">
- <!--
- Schema element has schema-block classes, enabling a stylesheet to style the
- entire schema, especially useful when embedding schema in another langage (e.g. WSDL).
- -->
- <tr>
- <td class="schema-block annotation-area">
- <div class="sidebar">
- <xsl:call-template name="index-reference"/>
- </div>
- </td>
- <td class="schema-block">
- <div class="arrow"> </div>
- </td>
- <td class="schema-block source-area">
- <div class="schema">
- <xsl:call-template name="element-start"/>
- </div>
- </td>
- </tr>
- <xsl:apply-templates/>
- <tr>
- <td colspan="2" class="schema-block annotation-area"/>
- <td class="schema-block source-area">
- <div class="schema">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="xs:schema/xs:*">
- <xsl:variable name="identifier">
- <xsl:call-template name="schema-identifier"/>
- </xsl:variable>
- <tr>
- <xsl:choose>
- <!-- Decide which top-level schema elements get sidebars -->
- <xsl:when test="not(self::xs:annotation or self::xs:import or self::xs:include)">
- <td class="schema-block annotation-area">
- <div class="{local-name()} sidebar sidebar-title">
- <xsl:if test="$identifier">
- <xsl:attribute name="id">
- <xsl:value-of select="$identifier"/>
- </xsl:attribute>
- </xsl:if>
- <span class="sidebar-title-highlight">
- <xsl:value-of select="@name"/>
- </span>
- <xsl:text></xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:call-template name="referenced-by"/>
- </div>
- </td>
- <td class="schema-block">
- <div class="arrow"> </div>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td colspan="2" class="schema-block annotation-area"/>
- </xsl:otherwise>
- </xsl:choose>
- <td class="schema-block source-area">
- <div class="schema-top-level">
- <xsl:call-template name="element-start"/>
- </div>
- <div class="schema-top-level">
- <xsl:apply-templates/>
- </div>
- <div class="schema-top-level">
- <xsl:call-template name="element-end"/>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="xs:*">
- <!-- Third and deeper levels of schema elements (no sidebar, therefore no table row - just a div. -->
- <xsl:variable name="identifier">
- <xsl:call-template name="schema-identifier"/>
- </xsl:variable>
- <div class="indent">
- <xsl:if test="$identifier != ''">
- <xsl:attribute name="id">
- <xsl:value-of select="$identifier"/>
- </xsl:attribute>
- </xsl:if>
- <div>
- <xsl:call-template name="element-start"/>
- </div>
- <xsl:apply-templates/>
- <div>
- <xsl:call-template name="element-end"/>
- </div>
- </div>
- </xsl:template>
- <xsl:template match="xs:schema/*[not(self::xs:*)]">
- <!-- Top-level extension elements -->
- <tr>
- <td colspan="2" class="schema-block annotation-area"/>
- <td class="schema-block source-area">
- <div class="schema-top-level extension">
- <xsl:call-template name="element-start">
- <xsl:with-param name="class" select="'markup-extension-element'"/>
- </xsl:call-template>
- </div>
- <xsl:apply-templates/>
- <div class="extension">
- <xsl:call-template name="element-end">
- <xsl:with-param name="class" select="'markup-extension-element'"/>
- </xsl:call-template>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="*">
- <!-- If we've got to here, we're dealing with non-top-level extension elements. -->
- <div class="indent">
- <div class="extension">
- <xsl:call-template name="element-start">
- <xsl:with-param name="class" select="'markup-extension-element'"/>
- </xsl:call-template>
- </div>
- <xsl:apply-templates/>
- <div class="extension">
- <xsl:call-template name="element-end">
- <xsl:with-param name="class" select="'markup-extension-element'"/>
- </xsl:call-template>
- </div>
- </div>
- </xsl:template>
- <!-- === Attributes =========================================
- The following templates format attributes of various flavors
- -->
- <xsl:template match="xs:*/@id">
- <a name="{@id}"/>
- <xsl:call-template name="attribute"/>
- </xsl:template>
- <xsl:template match="xs:*/@name">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="xs:*/@ref">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-reference"/>
- <xsl:text>#_</xsl:text>
- <xsl:value-of select="local-name(..)"/>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="substring-after(.,':')"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="xs:*/@type | xs:*/@base | xs:*/@itemType | xs:*/@memberTypes">
- <xsl:call-template name="attribute">
- <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
- <xsl:with-param name="reference">
- <xsl:call-template name="external-reference"/>
- <xsl:text>#_type_</xsl:text>
- <xsl:value-of select="substring-after(.,':')"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="xs:*/@source | xs:*/@schemaLocation">
- <xsl:call-template name="attribute">
- <xsl:with-param name="reference" select="."/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="@*">
- <xsl:call-template name="attribute"/>
- </xsl:template>
-
- <!-- === Text nodes ========================================
- The following template formats text nodes
- -->
- <xsl:template match="text()[normalize-space(.) != '']">
- <div class="markup-text-content">
- <xsl:value-of select="."/>
- </div>
- </xsl:template>
-
- <!-- === Comments ========================================
- The following template formats comment nodes
- -->
- <xsl:template match="xs:schema/comment()">
- <tr>
- <td colspan="2" class="schema-block annotation-area"/>
- <td class="schema-block source-area">
- <div class="schema-top-level markup-comment">
- <xsl:text><!--</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>--></xsl:text>
- </div>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="comment()">
- <div class="markup-comment indent">
- <xsl:text><!--</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>--></xsl:text>
- </div>
- </xsl:template>
-
- <!-- === Library templates ========================================
- Library of useful named templates
- -->
- <xsl:template name="css"><![CDATA[
-.schema {padding-left:5em; text-indent:-5em}
-.schema-top-level {padding-left: 6em; text-indent:-5em}
-.indent {margin-left:1em}
-.double-indent {margin-left:2em}
-.trivialText {color:gray}
-
-td {vertical-align:top; font: 100%/1.3 "Lucida Grande","Lucida Sans","Lucida Sans Unicode","trebuchet ms",verdana,sans-serif}
-.annotation-area {width:16em}
-.source-area {font-size:80%; padding-bottom:.6em}
-.sidebar {font-size:80%; padding-bottom:.6em; margin-bottom:2px}
-.arrow {border-top: 1px dashed black; width:2em; position:relative; top:.5em}
-.note {background-color:rgb(255,255,210); text-align:right; border: 1px dashed black; padding:.5em}
-.simpleType {background-color:rgb(255,242,210); text-align:right; border: 1px dashed black; padding:.5em}
-.complexType {background-color:rgb(255,242,210); text-align:right; border: 1px dashed black; padding:.5em}
-.element {background-color:rgb(225,237,246); text-align:right; border: 1px dashed black; padding:.5em}
-.group {background-color:rgb(225,237,246); text-align:right; border: 1px dashed black; padding:.5em}
-.attribute {background-color:rgb(225,246,235); text-align:right; border: 1px dashed black; padding:.5em}
-.attributeGroup {background-color:rgb(225,246,235); text-align:right; border: 1px dashed black; padding:.5em}
-.redefine {background-color:rgb(255,255,210); text-align:right; border: 1px dashed black; padding:.5em}
-.notation {background-color:rgb(255,255,210); text-align:right; border: 1px dashed black; padding:.5em}
-.sidebar-title {}
-.sidebar-title-highlight {font-weight:bold}
-.sidebar-text {padding-top:.3em}
-ul {margin-left:1em; margin-top:0em; margin-bottom:0em}
-.referenced-item {list-style-type:square; text-align:left; margin-left:.5em}
-.referenced-list {margin-top:.5em; text-align:left}
-
-#index {margin-top:2em; margin-bottom:2em}
-
-.markup {color:gray}
-.markup-element {color:gray; text-indent:-2em; }
-.markup-extension-element {color:navy}
-.markup-attribute {color:gray}
-.markup-extension-attribute {color:navy}
-.markup-attribute-value {}
-.markup-name-attribute-value {font-weight:bold}
-.markup-namespace {color:purple}
-.markup-namespace-uri {color:purple}
-.markup-text-content {margin-left:-4em; text-indent:0em}
-.markup-comment {color:green}
-]]>
- </xsl:template>
- <xsl:template name="attribute">
- <xsl:param name="value-class" select="'markup-attribute-value'"/>
- <xsl:param name="reference"/>
- <xsl:param name="native-attribute" select="parent::xs:* and namespace-uri(.)=''"/>
- <xsl:text></xsl:text>
- <span>
- <xsl:choose>
- <xsl:when test="$native-attribute">
- <xsl:attribute name="class">markup-attribute</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="class">markup-extension-attribute</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="name(.)"/>
- </span>
- <span class="markup">
- <xsl:text>="</xsl:text>
- </span>
- <span class="{$value-class}">
- <xsl:choose>
- <xsl:when test="$reference">
- <a href="{$reference}">
- <xsl:value-of select="."/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </span>
- <span class="markup">
- <xsl:text>"</xsl:text>
- </span>
- </xsl:template>
- <xsl:template name="namespaces">
- <xsl:variable name="current" select="current()"/>
- <!-- Unfortunately Mozilla doesn't support the namespace axis, need to check for that and simulate declarations -->
- <xsl:choose>
- <xsl:when test="$supports-namespace-axis">
- <!--
- When the namespace axis is present (e.g. Internet Explorer), we can simulate
- the namespace declarations by comparing the namespaces in scope on this element
- with those in scope on the parent element. Any difference must have been the
- result of a namespace declaration. Note that this doesn't reflect the actual
- source - it will strip out redundant namespace declarations.
- -->
- <xsl:for-each select="namespace::*[. != 'http://www.w3.org/XML/1998/namespace']">
- <xsl:if test="not($current/parent::*[namespace::*[. = current()]])">
- <span class="markup-namespace">
- <xsl:text>xmlns</xsl:text>
- <xsl:if test="name() != ''">:</xsl:if>
- <xsl:value-of select="name()"/>
- <xsl:text>="</xsl:text>
- </span>
- <span class="markup-namespace-uri">
- <xsl:value-of select="."/>
- </span>
- <span class="markup-namespace">
- <xsl:text>"</xsl:text>
- </span>
- </xsl:if>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <!--
- When the namespace axis isn't supported (e.g. Mozilla), we can simulate
- appropriate declarations from namespace elements.
- This currently doesn't check for namespaces on attributes.
- In the general case we can't reliably detect the use of QNames in content, but
- in the case of schema, we know which content could contain a QName and look
- there too. This mechanism is rather unpleasant though, since it records
- namespaces where they are used rather than showing where they are declared
- (on some parent element) in the source. Yukk!
- -->
- <xsl:if test="namespace-uri(.) != namespace-uri(parent::*)">
- <span class="markup-namespace">
- <xsl:text>xmlns</xsl:text>
- <xsl:if test="substring-before(name(),':') != ''">:</xsl:if>
- <xsl:value-of select="substring-before(name(),':')"/>
- <xsl:text>="</xsl:text>
- </span>
- <span class="markup-namespace-uri">
- <xsl:value-of select="namespace-uri(.)"/>
- </span>
- <span class="markup-namespace">
- <xsl:text>"</xsl:text>
- </span>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="element-start">
- <xsl:param name="class" select="'markup-element'"/>
- <span class="markup"><</span>
- <span class="{$class}">
- <xsl:value-of select="name(.)"/>
- </span>
- <xsl:apply-templates select="@*"/>
- <xsl:call-template name="namespaces"/>
- <span class="markup">
- <xsl:if test="not(node())">
- <xsl:text>/</xsl:text>
- </xsl:if>
- <xsl:text>></xsl:text>
- </span>
- </xsl:template>
- <xsl:template name="element-end">
- <xsl:param name="class" select="'markup-element'"/>
- <xsl:if test="node()">
- <span class="markup">
- <xsl:text></</xsl:text>
- </span>
- <span class="{$class}">
- <xsl:value-of select="name(.)"/>
- </span>
- <span class="markup">
- <xsl:text>></xsl:text>
- </span>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="schema-identifier">
- <!-- Calculate a fragment identifier for the element this element refers to, if any -->
- <xsl:if test="@name | @ref">
- <xsl:choose>
- <xsl:when
- test="(self::xs:attribute or self::xs:element) and not(parent::xs:schema)">
- <xsl:variable name="top" select="ancestor::*[parent::xs:schema]"/>
- <xsl:variable name="toptype">
- <xsl:choose>
- <xsl:when test="$top[self::xs:complexType or self::xs:simpleType]">type
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="local-name($top)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:text>_local</xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="$toptype"/>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="$top/@name"/>
- </xsl:when>
- <xsl:when test="local-name()='complexType' or local-name()='simpleType'">_type
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="local-name()"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>_</xsl:text>
- <xsl:value-of select="@name | @ref"/>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="componentListItem">
- <xsl:variable name="typeIdentifier">
- <xsl:choose>
- <xsl:when test="self::xs:complexType or self::xs:simpleType">type</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="local-name()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="position()>1">
- <xsl:text>,</xsl:text>
- </xsl:if>
- <a href="#_{$typeIdentifier}_{@name}">
- <xsl:value-of select="@name"/>
- </a>
- </xsl:template>
- <xsl:template name="localComponentListItem">
- <xsl:variable name="typeIdentifier" select="local-name()"/>
- <xsl:variable name="top" select="ancestor::*[parent::xs:schema]"/>
- <xsl:variable name="toptype">
- <xsl:choose>
- <xsl:when test="$top[self::xs:complexType or self::xs:simpleType]">type</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="local-name($top)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="tnsName">
- <xsl:choose>
- <xsl:when test="contains(@name, ':') and namespace::*[. = $targetNamespace and name(.) =
- substring-before(@name,':')]">
- <xsl:value-of select="substring-after(@name,':')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@name"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="position()>1">
- <xsl:text>,</xsl:text>
- </xsl:if>
- <a href="#_local{$typeIdentifier}_{$toptype}_{$top/@name}_{@name}">
- <xsl:value-of select="$tnsName"/>
- </a>
- <span class="trivialText">of the</span>
- <xsl:value-of select="$top/@name"/>
- <xsl:text></xsl:text>
- <span class="trivialText">
- <xsl:value-of select="local-name($top)"/>
- </span>
- </xsl:template>
- <xsl:template name="insert-reference">
- <xsl:if test="self::xs:attribute">
- <xsl:variable name="top" select="ancestor::*[parent::xs:schema]"/>
- <xsl:variable name="toptype">
- <xsl:choose>
- <xsl:when test="$top[self::xs:complexType or self::xs:simpleType]">type
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="local-name($top)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <a href="#_localattribute_{$toptype}_{$top/@name}_{@name | @ref}">
- <xsl:value-of select="@name | @ref"/>
- </a>
- <xsl:text>local attribute of the</xsl:text>
- </xsl:if>
- <xsl:for-each select="ancestor-or-self::xs:*[last() - 1]">
- <xsl:variable name="type">
- <xsl:choose>
- <xsl:when test="self::xs:complexType or self::xs:simpleType">type</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="local-name(.)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <a href="#_{$type}_{@name}">
- <xsl:value-of select="@name"/>
- </a>
- <xsl:text></xsl:text>
- <xsl:value-of select="local-name(.)"/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="referenced-by">
- <xsl:variable name="target" select="@name"/>
- <xsl:if test="parent::xs:schema">
- <div class="sidebar-text">
- <xsl:variable name="extended-by" select="ancestor::xs:schema//xs:extension[substring-after(@base | @type | @ref |
- @itemType,':') = $target]"/>
- <xsl:if test="count($extended-by) > 0">
- <div class="referenced-list">Extended by:</div>
- <ul>
- <xsl:for-each select="$extended-by">
- <xsl:sort select="@base | @type | @ref | @itemType"/>
- <li class="referenced-item">
- <xsl:call-template name="insert-reference"/>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- <xsl:variable name="restricted-by" select="ancestor::xs:schema//xs:restriction[substring-after(@base | @type | @ref |
- @itemType,':') = $target]"/>
- <xsl:if test="count($restricted-by) > 0">
- <div class="referenced-list">Restricted by:</div>
- <ul>
- <xsl:for-each select="$restricted-by">
- <xsl:sort select="@base | @type | @ref | @itemType"/>
- <li class="referenced-item">
- <xsl:call-template name="insert-reference"/>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- <xsl:variable name="referenced-by" select="ancestor::xs:schema//xs:*[not(self::xs:extension) and
- not(self::xs:restriction)][substring-after(@base | @type | @ref | @itemType,':')
- = $target]"/>
- <xsl:if test="count($referenced-by) > 0">
- <div class="referenced-list">Referenced by:</div>
- <ul>
- <xsl:for-each select="$referenced-by">
- <xsl:sort select="@base | @type | @ref | @itemType"/>
- <li class="referenced-item">
- <xsl:call-template name="insert-reference"/>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- <xsl:call-template name="additional-references">
- <xsl:with-param name="target" select="$target"/>
- </xsl:call-template>
- </div>
- </xsl:if>
- </xsl:template>
- <xsl:template name="additional-references">
- <xsl:param name="target"/>
- <!-- override this template to list additonal references -->
- </xsl:template>
- <xsl:template name="external-reference">
- <xsl:choose>
- <xsl:when test="$supports-namespace-axis">
- <xsl:if test="not(../namespace::*[. = $targetNamespace and name(.) =
- substring-before(current(),':')])">
- <xsl:variable name="prefix" select="substring-before(.,':')"/>
- <xsl:variable name="uri" select="../namespace::*[name(.) = $prefix]"/>
- <xsl:choose>
- <xsl:when test="$uri = 'http://www.w3.org/2001/XMLSchema'">
- <xsl:value-of select="$xsd-schema-location"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
- select="ancestor::xs:schema/xs:import[@namespace=$uri]/@schemaLocation"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <!-- Take a wild guess at the most commonly used type prefixes -->
- <xsl:when
- test="substring-before(current(),':') = 'xs' or substring-before(current(),':') = 'xsd'">
- <xsl:value-of select="$xsd-schema-location"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- The link will be broken. Bad Mozilla! -->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="generate-xsd-index">
- <xsl:if test="xs:schema/xs:complexType">
- <tr>
- <td id="complexType-list" class="annotation-area">
- <div class="complexType sidebar sidebar-title-highlight">Index of complexTypes
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="xs:schema/xs:complexType">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="xs:schema/xs:simpleType">
- <tr>
- <td id="simpleType-list" class="annotation-area">
- <div class="simpleType sidebar sidebar-title-highlight">Index of simpleTypes
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="xs:schema/xs:simpleType">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="xs:schema/xs:element">
- <tr>
- <td id="global-element-list" class="annotation-area">
- <div class="element sidebar sidebar-title-highlight">Index of global elements
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="xs:schema/xs:element">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="xs:schema/*//xs:element[@name]">
- <tr>
- <td id="local-element-list" class="annotation-area">
- <div class="element sidebar sidebar-title-highlight">Index of local elements
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="xs:schema/*//xs:element[@name]">
- <xsl:sort select="@name"/>
- <xsl:call-template name="localComponentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="xs:schema/xs:attribute">
- <tr>
- <td id="global-attribute-list" class="annotation-area">
- <div class="attribute sidebar sidebar-title-highlight">Index of global
- attributes
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="xs:schema/xs:attribute">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="xs:schema/*//xs:attribute[@name]">
- <tr>
- <td id="local-attribute-list" class="annotation-area">
- <div class="attribute sidebar sidebar-title-highlight">Index of local attributes
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="xs:schema/*//xs:attribute[@name]">
- <xsl:sort select="@name"/>
- <xsl:call-template name="localComponentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="xs:schema/xs:group">
- <tr>
- <td id="model-group-list" class="annotation-area">
- <div class="group sidebar sidebar-title-highlight">Index of model groups</div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="xs:schema/xs:group">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="xs:schema/xs:attributeGroup">
- <tr>
- <td id="attributeGroup-list" class="annotation-area">
- <div class="attributeGroup sidebar sidebar-title-highlight">Index of attribute
- groups
- </div>
- </td>
- <td>
- <div class="arrow"> </div>
- </td>
- <td class="source-area">
- <xsl:for-each select="xs:schema/xs:attributeGroup">
- <xsl:sort select="@name"/>
- <xsl:call-template name="componentListItem"/>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:if>
- </xsl:template>
- <xsl:template name="index-reference">
- <div class="note sidebar-text">See the
- <a href="#index">index</a>
- of
- <xsl:variable name="ss1">
- <xsl:if test="xs:complexType">
- <a href="#complexType-list">complexTypes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss2">
- <xsl:copy-of select="$ss1"/>
- <xsl:if test="xs:simpleType">
- <xsl:if test="$ss1!=''">,</xsl:if>
- <a href="#simpleType-list">simpleTypes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss3">
- <xsl:copy-of select="$ss2"/>
- <xsl:if test="xs:element">
- <xsl:if test="$ss2!=''">,</xsl:if>
- <a href="#global-element-list">global elements</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss4">
- <xsl:copy-of select="$ss3"/>
- <xsl:if test="*//xs:element[@name]">
- <xsl:if test="$ss3!=''">,</xsl:if>
- <a href="#local-element-list">local elements</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss5">
- <xsl:copy-of select="$ss4"/>
- <xsl:if test="xs:attribute">
- <xsl:if test="$ss4!=''">,</xsl:if>
- <a href="#global-attribute-list">global attributes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss6">
- <xsl:copy-of select="$ss5"/>
- <xsl:if test="*//xs:attribute[@name]">
- <xsl:if test="$ss5!=''">,</xsl:if>
- <a href="#local-attribute-list">local attributes</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss7">
- <xsl:copy-of select="$ss6"/>
- <xsl:if test="xs:group">
- <xsl:if test="$ss6!=''">,</xsl:if>
- <a href="#model-group-list">model groups</a>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="ss8">
- <xsl:copy-of select="$ss7"/>
- <xsl:if test="xs:attributeGroup">
- <xsl:if test="$ss7!=''">,</xsl:if>
- <a href="#attributeGroup-list">attribute groups</a>
- </xsl:if>
- </xsl:variable>
- <xsl:copy-of select="$ss8"/>
- <xsl:text>defined in this schema.</xsl:text>
- </div>
- </xsl:template>
-</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/atom.xsl
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/atom.xsl b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/atom.xsl
deleted file mode 100644
index 7ce7e04..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/atom.xsl
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="html"/>
-
- <xsl:template match="ns1:feed" xmlns:ns1="http://www.w3.org/2005/Atom">
- <html>
- <head>
- <title>
- <xsl:value-of select="ns2:title" xmlns:ns2="http://www.w3.org/2005/Atom"/>
- </title>
- <style media="all" lang="en" type="text/css">
- :root:before, :root:before {
- font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
- font-size:70%;
- content: "This data file is meant to be read in a XML Atom reader. See document
- source."
- }
- .AtomTitle
- {
- display: block;
- font-size:200%;
- font-weight:bolder;
- color:#436976;
- text-decoration:none;
- border-bottom: 20px solid #dee7ec;
- }
- .Entry
- {
- border-width: 2px;
- border-color: #336699;
- border-style: solid;
- width: 500px;
- }
- .Title
- {
- background-color: #436976;
- color: #FFFFFF;
- font-size: 1.4em;
- font-family: Verdana;
- font-size: 9pt;
- font-weight: bold;
- padding-left: 5px;
- padding-top: 5px;
- padding-bottom: 5px;
- }
- .Title A:visited
- {
- color: #FFFFFF;
- text-decoration: underline;
- }
- .Title A:link
- {
- color: #FFFFFF;
- text-decoration: underline;
- }
- .Title A:hover
- {
- color: #FFFF00;
- text-decoration: none;
- }
- .Summary
- {
- color: #000000;
- font-family: Verdana;
- font-size: 9pt;
- padding-left: 5px;
- padding-top: 5px;
- padding-bottom: 5px;
- padding-right: 5px;
- }
- </style>
- </head>
- <body>
- <div class="AtomTitle">
- <xsl:value-of select="ns2:title" xmlns:ns2="http://www.w3.org/2005/Atom"/>
- </div>
- <br/>
-
- <xsl:for-each select="ns2:entry" xmlns:ns2="http://www.w3.org/2005/Atom">
-
- <div class="Entry">
- <div class="Title">
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="ns2:link/@href"
- xmlns:ns2="http://www.w3.org/2005/Atom"/>
- </xsl:attribute>
- <xsl:value-of select="ns2:title"
- xmlns:ns2="http://www.w3.org/2005/Atom"/>
- </a>
- <xsl:text>    </xsl:text>
- <xsl:value-of select="ns2:updated"
- xmlns:ns2="http://www.w3.org/2005/Atom"/>
- </div>
- <div class="Summary">
- <xsl:choose>
- <xsl:when test="ns2:summary"
- xmlns:ns2="http://www.w3.org/2005/Atom">
- <b>Summary:</b>
- <xsl:value-of select="ns2:summary"
- xmlns:ns2="http://www.w3.org/2005/Atom"/>
- </xsl:when>
- </xsl:choose>
-
- </div>
- </div>
- <br/>
-
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
-
-</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/datatypes.dtd
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/datatypes.dtd b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/datatypes.dtd
deleted file mode 100644
index cd47625..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/datatypes.dtd
+++ /dev/null
@@ -1,216 +0,0 @@
-<!--
- ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<!--
- DTD for XML Schemas: Part 2: Datatypes
- $Id: datatypes.dtd,v 1.23 2001/03/16 17:36:30 ht Exp $
- Note this DTD is NOT normative, or even definitive. - - the
- prose copy in the datatypes REC is the definitive version
- (which shouldn't differ from this one except for this comment
- and entity expansions, but just in case)
- -->
-<!--
- This DTD cannot be used on its own, it is intended
- only for incorporation in XMLSchema.dtd, q.v.
- -->
-<!-- Define all the element names, with optional prefix -->
-<!ENTITY % simpleType "%p;simpleType">
-<!ENTITY % restriction "%p;restriction">
-<!ENTITY % list "%p;list">
-<!ENTITY % union "%p;union">
-<!ENTITY % maxExclusive "%p;maxExclusive">
-<!ENTITY % minExclusive "%p;minExclusive">
-<!ENTITY % maxInclusive "%p;maxInclusive">
-<!ENTITY % minInclusive "%p;minInclusive">
-<!ENTITY % totalDigits "%p;totalDigits">
-<!ENTITY % fractionDigits "%p;fractionDigits">
-<!ENTITY % length "%p;length">
-<!ENTITY % minLength "%p;minLength">
-<!ENTITY % maxLength "%p;maxLength">
-<!ENTITY % enumeration "%p;enumeration">
-<!ENTITY % whiteSpace "%p;whiteSpace">
-<!ENTITY % pattern "%p;pattern">
-<!--
- Customisation entities for the ATTLIST of each element
- type. Define one of these if your schema takes advantage
- of the anyAttribute='##other' in the schema for schemas
- -->
-<!ENTITY % simpleTypeAttrs "">
-<!ENTITY % restrictionAttrs "">
-<!ENTITY % listAttrs "">
-<!ENTITY % unionAttrs "">
-<!ENTITY % maxExclusiveAttrs "">
-<!ENTITY % minExclusiveAttrs "">
-<!ENTITY % maxInclusiveAttrs "">
-<!ENTITY % minInclusiveAttrs "">
-<!ENTITY % totalDigitsAttrs "">
-<!ENTITY % fractionDigitsAttrs "">
-<!ENTITY % lengthAttrs "">
-<!ENTITY % minLengthAttrs "">
-<!ENTITY % maxLengthAttrs "">
-<!ENTITY % enumerationAttrs "">
-<!ENTITY % whiteSpaceAttrs "">
-<!ENTITY % patternAttrs "">
-<!-- Define some entities for informative use as attribute
- types -->
-<!ENTITY % URIref "CDATA">
-<!ENTITY % XPathExpr "CDATA">
-<!ENTITY % QName "NMTOKEN">
-<!ENTITY % QNames "NMTOKENS">
-<!ENTITY % NCName "NMTOKEN">
-<!ENTITY % nonNegativeInteger "NMTOKEN">
-<!ENTITY % boolean "(true|false)">
-<!ENTITY % simpleDerivationSet "CDATA">
-<!--
- #all or space-separated list drawn from derivationChoice
- -->
-<!--
- Note that the use of 'facet' below is less restrictive
- than is really intended: There should in fact be no
- more than one of each of minInclusive, minExclusive,
- maxInclusive, maxExclusive, totalDigits, fractionDigits,
- length, maxLength, minLength within datatype,
- and the min- and max- variants of Inclusive and Exclusive
- are mutually exclusive. On the other hand, pattern and
- enumeration may repeat.
- -->
-<!ENTITY % minBound "(%minInclusive; | %minExclusive;)">
-<!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)">
-<!ENTITY % bounds "%minBound; | %maxBound;">
-<!ENTITY % numeric "%totalDigits; | %fractionDigits;">
-<!ENTITY % ordered "%bounds; | %numeric;">
-<!ENTITY % unordered "%pattern; | %enumeration; | %whiteSpace; | %length; |
- %maxLength; | %minLength;">
-<!ENTITY % facet "%ordered; | %unordered;">
-<!ENTITY % facetAttr "value CDATA #REQUIRED
- id ID #IMPLIED">
-<!ENTITY % fixedAttr "fixed %boolean; #IMPLIED">
-<!ENTITY % facetModel "(%annotation;)?">
-<!ELEMENT %simpleType; ((%annotation;)?, (%restriction; | %list; | %union;))>
-<!ATTLIST %simpleType;
- name %NCName; #IMPLIED
- final %simpleDerivationSet; #IMPLIED
- id ID #IMPLIED
- %simpleTypeAttrs;
->
-<!-- name is required at top level -->
-<!ELEMENT %restriction; ((%annotation;)?, (%restriction1; | ((%simpleType;)?, (%facet;)*)), (%attrDecls;))>
-<!ATTLIST %restriction;
- base %QName; #IMPLIED
- id ID #IMPLIED
- %restrictionAttrs;
->
-<!--
- base and simpleType child are mutually exclusive,
- one is required.
-
- restriction is shared between simpleType and
- simpleContent and complexContent (in XMLSchema.xsd).
- restriction1 is for the latter cases, when this
- is restricting a complex type, as is attrDecls.
- -->
-<!ELEMENT %list; ((%annotation;)?, (%simpleType;)?)>
-<!ATTLIST %list;
- itemType %QName; #IMPLIED
- id ID #IMPLIED
- %listAttrs;
->
-<!--
- itemType and simpleType child are mutually exclusive,
- one is required
- -->
-<!ELEMENT %union; ((%annotation;)?, (%simpleType;)*)>
-<!ATTLIST %union;
- id ID #IMPLIED
- memberTypes %QNames; #IMPLIED
- %unionAttrs;
->
-<!--
- At least one item in memberTypes or one simpleType
- child is required
- -->
-<!ELEMENT %maxExclusive; %facetModel;>
-<!ATTLIST %maxExclusive;
- %facetAttr;
- %fixedAttr;
- %maxExclusiveAttrs;
->
-<!ELEMENT %minExclusive; %facetModel;>
-<!ATTLIST %minExclusive;
- %facetAttr;
- %fixedAttr;
- %minExclusiveAttrs;
->
-<!ELEMENT %maxInclusive; %facetModel;>
-<!ATTLIST %maxInclusive;
- %facetAttr;
- %fixedAttr;
- %maxInclusiveAttrs;
->
-<!ELEMENT %minInclusive; %facetModel;>
-<!ATTLIST %minInclusive;
- %facetAttr;
- %fixedAttr;
- %minInclusiveAttrs;
->
-<!ELEMENT %totalDigits; %facetModel;>
-<!ATTLIST %totalDigits;
- %facetAttr;
- %fixedAttr;
- %totalDigitsAttrs;
->
-<!ELEMENT %fractionDigits; %facetModel;>
-<!ATTLIST %fractionDigits;
- %facetAttr;
- %fixedAttr;
- %fractionDigitsAttrs;
->
-<!ELEMENT %length; %facetModel;>
-<!ATTLIST %length;
- %facetAttr;
- %fixedAttr;
- %lengthAttrs;
->
-<!ELEMENT %minLength; %facetModel;>
-<!ATTLIST %minLength;
- %facetAttr;
- %fixedAttr;
- %minLengthAttrs;
->
-<!ELEMENT %maxLength; %facetModel;>
-<!ATTLIST %maxLength;
- %facetAttr;
- %fixedAttr;
- %maxLengthAttrs;
->
-<!-- This one can be repeated -->
-<!ELEMENT %enumeration; %facetModel;>
-<!ATTLIST %enumeration;
- %facetAttr;
- %enumerationAttrs;
->
-<!ELEMENT %whiteSpace; %facetModel;>
-<!ATTLIST %whiteSpace;
- %facetAttr;
- %fixedAttr;
- %whiteSpaceAttrs;
->
-<!-- This one can be repeated -->
-<!ELEMENT %pattern; %facetModel;>
-<!ATTLIST %pattern;
- %facetAttr;
- %patternAttrs;
->
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/rss.xsl
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/rss.xsl b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/rss.xsl
deleted file mode 100644
index be86baf..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/styles/rss.xsl
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="html"/>
- <xsl:template match="rss/channel">
- <html>
- <head>
- <title>
- <xsl:value-of select="title"/>
- </title>
- <style media="all" lang="en" type="text/css">
- :root:before, :root:before {
- font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
- font-size:70%;
- content: "This data file is meant to be read in a XML feed reader. See document
- source."
- }
- .ChannelTitle
- {
- display: block;
- font-size:200%;
- font-weight:bolder;
- color:#436976;
- text-decoration:none;
- border-bottom: 20px solid #dee7ec;
- }
- .ArticleEntry
- {
- border-width: 2px;
- border-color: #336699;
- border-style: solid;
- width: 500px;
- }
- .ArticleTitle
- {
- background-color: #436976;
- color: #FFFFFF;
- font-size: 1.4em;
- font-family: Verdana;
- font-size: 9pt;
- font-weight: bold;
- padding-left: 5px;
- padding-top: 5px;
- padding-bottom: 5px;
- }
- .ArticleTitle A:visited
- {
- color: #FFFFFF;
- text-decoration: underline;
- }
- .ArticleTitle A:link
- {
- color: #FFFFFF;
- text-decoration: underline;
- }
- .ArticleTitle A:hover
- {
- color: #FFFF00;
- text-decoration: none;
- }
- .ArticleDescription
- {
- color: #000000;
- font-family: Verdana;
- font-size: 9pt;
- padding-left: 5px;
- padding-top: 5px;
- padding-bottom: 5px;
- padding-right: 5px;
- }
- </style>
- </head>
- <body>
- <xsl:apply-templates select="title"/>
- <xsl:apply-templates select="item"/>
- </body>
- </html>
- </xsl:template>
- <xsl:template match="title">
- <div class="ChannelTitle">
- <xsl:value-of select="text()"/>
- </div>
- <br/>
- </xsl:template>
- <xsl:template match="item">
- <div class="ArticleEntry">
- <div class="ArticleTitle">
- <a href="{link}">
- <xsl:value-of select="title"/>
- </a>
- <xsl:text>    </xsl:text>
- <xsl:value-of select="pubDate"/>
- </div>
- <div class="ArticleDescription">
- <b>Description:</b>
- <xsl:value-of select="description"/>
- </div>
- </div>
- <br/>
- </xsl:template>
-</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribe.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribe.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribe.jsp
deleted file mode 100644
index a3d65c1..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribe.jsp
+++ /dev/null
@@ -1,303 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
-<%@ page import="org.wso2.carbon.CarbonConstants" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
-<%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient" %>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.PolicyDefinition" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-<%@ page import="java.text.SimpleDateFormat" %>
-<%@ page import="java.util.ResourceBundle" %>
-<jsp:include page="../dialog/display_messages.jsp"/>
-
-
-<%
- response.setHeader("Cache-Control", "no-cache");
- String cartridgeType = request.getParameter("cartridgeType");
- String multiTenantValue = request.getParameter("multiTenant");
- String cartridgeProvider = request.getParameter("cartridgeProvider");
- boolean multiTenant = Boolean.valueOf(multiTenantValue);
- String item = request.getParameter("item");
-
- PolicyDefinition[] policyDefinitions = null;
-
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext =
- (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
-
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- CartridgeAdminClient client;
-
- boolean internalRepoFeatureEnabled = false;
-
- try{
- client = new CartridgeAdminClient(cookie, backendServerURL, configContext,request.getLocale());
- policyDefinitions = client.getPolicyDefinitions();
-
- if (policyDefinitions == null || policyDefinitions.length == 0) {
- throw new IllegalStateException("Policy Definitions not found.");
- }
- internalRepoFeatureEnabled = client.isFeatureEnabled("feature.internalrepo.enabled");
- }catch (Exception e) {
- response.setStatus(500);
- CarbonUIMessage uiMsg = new CarbonUIMessage(CarbonUIMessage.ERROR, e.getMessage(), e);
- session.setAttribute(CarbonUIMessage.ID, uiMsg);
- %>
- <jsp:include page="../admin/error.jsp"/>
- <%
- return;
- }
-
-%>
-<fmt:bundle basename="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources">
-<carbon:breadcrumb
- label="subscribe"
- resourceBundle="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources"
- topPage="true"
- request="<%=request%>"/>
-<div id="middle">
-<%if(cartridgeType != null) {%>
- <h2><fmt:message key="subscribe.to"><fmt:param value="<%= cartridgeType%>"/></fmt:message></h2>
-<%} else {%>
- <h2><fmt:message key="subscribe.new.cartridge"/></h2>
- <p> </p>
-<%} %>
-<div id="workArea">
- <form id="subscribeForm" name="subscribeToCartridge">
- <table id="subscribeToCartridgeTbl" width="100%" class="styledLeft">
- <thead>
- <tr>
- <th>
- <fmt:message key="cartridge.information"/>
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="nopadding">
- <table class="normal-nopadding" cellspacing="0">
- <tbody>
- <tr>
- <!-- Keep 30% width to give more space for inputs -->
- <td style="width: 30%"><label>Cartridge Type</label><span class="required">*</span></td>
- <td>
- <span><%=cartridgeType%></span>
- <input name="cartridge_type" type="hidden" value="<%=cartridgeType%>"/>
- <input name="cartridge_provider" type="hidden" value="<%=cartridgeProvider%>"/>
- </td>
- </tr>
- <tr>
- <td><label for="cartridge_alias">Alias</label><span class="required">*</span></td>
- <td><input id="cartridge_alias" name="cartridge_alias" type="text" style="width: 400px" maxlength="300" /></td>
- </tr>
- <%if((cartridgeProvider != null && !cartridgeProvider.equalsIgnoreCase("data")) && !multiTenant) {%>
- <tr>
- <td><label for="policy">Policy</label><span class="required">*</span></td>
- <td style="border: 0;"><select name="policy" id="policy">
- <%
- for (PolicyDefinition policy : policyDefinitions) {
-
- %>
- <option value="<%=policy.getName()%>" <%if (policy.getDefaultPolicy()) {%>selected="selected"<%}%>>
- <%=policy.getDescription()%>
- </option>
- <%
- }
- %>
- </select></td>
- </tr>
- <%}%>
- <%if((cartridgeProvider != null && !cartridgeProvider.equalsIgnoreCase("data"))) {%>
- <tr>
- <td colspan="2" class="middle-header"><fmt:message key="repository.information"/></td>
- </tr>
- <%if(internalRepoFeatureEnabled) {%>
- <tr>
- <td><label for="internalRepo" id="internalRepoLabel">Use Internal Repository</label><span class="required">*</span></td>
- <td>
- <input name="internalRepo" type="radio" value="yes" /> Yes
- <input name="internalRepo" type="radio" value="no" checked="checked" /> No
- </td>
- </tr>
- <%} %>
- <tr class="repoDetails">
- <td><label for="repoType" id="repoTypeLabel">Repository Type</label><span class="required">*</span></td>
- <td>
- <input name="repoType" type="radio" value="public" checked="checked" /> Public
- <input name="repoType" type="radio" value="private" /> Private
- </td>
- </tr>
- <tr class="repoDetails">
- <td><label for="repo_url" id="repoLabel">GIT repository URL: (http:// or https://)</label><span class="required">*</span></td>
- <td><input id="repo_url" name="repo_url" type="text" style="width: 400px" maxlength="1000" />
- </td>
- </tr>
- <tr class="repoDetails repoCredentials">
- <td><label for="repo_username" id="repo_usernameLabel">GIT Repository Username</label><span class="required" style="display: none;">*</span></td>
- <td><input id="repo_username" name="repo_username" type="text" style="width: 400px" maxlength="500" autocomplete="off" /></td>
- </tr>
- <tr class="repoDetails repoCredentials">
- <td><label for="repo_password" id="repo_passwordLabel">GIT Repository Password</label><span class="required" style="display: none;">*</span></td>
- <td><input id="repo_password" name="repo_password" type="password" style="width: 400px" maxlength="500" autocomplete="off" /></td>
- </tr>
- <tr class="repoDetails" id="testConnectionRow">
- <td></td>
- <td>
- <input id="testGitButton" type="button" class="button" value="Test Connection"
- onclick="postToBEService('test_git_ajaxprocessor.jsp', jQuery('#subscribeForm').serialize(), null, '#testGitButton', validateRepository);">
- </td>
- </tr>
- <tr class="dataCartridgeRow" style="display: none;">
- <td colspan="2" class="middle-header"><fmt:message key="cartridge.connect.information"/></td>
- </tr>
- <tr class="dataCartridgeRow" style="display: none;">
- <td><label for="other_cartridge_type">Connect Data Cartridge</label><span class="required">*</span></td>
- <td><select id="other_cartridge_type" name="other_cartridge_type" ><option value="mysql">mysql</option></select></td>
- </tr>
- <tr class="dataCartridgeRow" style="display: none;">
- <td><label for="other_alias">Data Cartridge Alias</label><span class="required">*</span></td>
- <td><input id="other_alias" name="other_alias" type="text" style="width: 400px" maxlength="300" /></td>
- </tr>
- <%}%>
- </tbody>
- </table>
- </td>
- </tr>
- <tr id="buttonRow" class="buttonRow">
- <td>
- <input id="subscribeButton" type="submit" class="button" value="Subscribe" />
- <input id="subscribeCancelButton" type="button" class="button" value="Cancel" onclick="cancelSubscribe('<%=item%>');" />
- <%if(!"data".equalsIgnoreCase(cartridgeProvider) && !multiTenant){%>
- <a id="showConnect" onclick="showConnectCartridge();" style="cursor: pointer;">Connect another cartridge...</a>
- <a id="hideConnect" onclick="hideConnectCartridge();" style="cursor: pointer; display: none;">Hide connecting cartridge fields...</a>
- <%}%>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
-
- <p> </p>
- </div>
-
-</div>
-
-<script type="text/javascript">
- jQuery(document).ready(
- function() {
- if (jQuery("#internalRepoLabel").length > 0) {
- jQuery('input:radio[name="internalRepo"]').click(
- function() {
- var $this = jQuery(this);
- if ($this.val() == "no") {
- jQuery(".repoDetails").show();
- } else {
- jQuery(".repoDetails").hide();
- jQuery("#repo_url").val("");
- jQuery("#repo_username").val("");
- jQuery("#repo_password").val("");
- }
- })
- };
-
- jQuery('input:radio[name="repoType"]').click(
- function() {
- var $this = jQuery(this);
- if ($this.val() == "private") {
- jQuery(".repoCredentials .required").show();
- } else {
- jQuery(".repoCredentials .required").hide();
- }
- })
-
- setStratosFormSubmitFunction("#subscribeForm", validate, "subscribe_ajaxprocessor.jsp", "subscribed_cartridges.jsp", "#subscribeButton");
- });
-
- function validate() {
- if (jQuery("#cartridge_alias").val().length == 0) {
- CARBON.showErrorDialog('Please enter an alias for the cartridge.');
- return false;
- }
- if (!validateRepository()) {
- return false;
- }
- if (jQuery(".dataCartridgeRow").length > 0 &&
- jQuery(".dataCartridgeRow").css("display") != "none" && jQuery("#other_alias").val().length == 0) {
- CARBON.showErrorDialog('Please enter an alias for the data cartridge.');
- return false;
- }
- return true;
- }
-
- function validateRepository() {
- var repoRequired = false;
- if (jQuery("#internalRepoLabel").length > 0) {
- if (jQuery('input[name="internalRepo"]:checked').val() == "no") {
- repoRequired = true;
- if (jQuery("#repo_url").val().length == 0) {
- CARBON.showWarningDialog('Please enter GIT repository URL.');
- return false;
- }
- }
- } else {
- // Some cartridges do not have a repo URL
- if (jQuery("#repo_url").length > 0) {
- repoRequired = true;
- if (jQuery("#repo_url").val().length == 0) {
- CARBON.showWarningDialog('Please enter GIT repository URL.');
- return false;
- }
- }
- }
-
- if (repoRequired && jQuery("#repoTypeLabel").length > 0
- && jQuery('input[name="repoType"]:checked').val() == "private") {
- if (jQuery("#repo_username").val().length == 0) {
- CARBON.showWarningDialog('Please enter GIT repository username.');
- return false;
- }
- if (jQuery("#repo_password").val().length == 0) {
- CARBON.showWarningDialog('Please enter GIT repository password.');
- return false;
- }
- }
- return true;
- }
-
- function showConnectCartridge() {
- jQuery(".dataCartridgeRow").show();
- jQuery("#showConnect").hide();
- jQuery("#hideConnect").show();
- }
-
- function hideConnectCartridge() {
- jQuery(".dataCartridgeRow").hide();
- jQuery("#showConnect").show();
- jQuery("#hideConnect").hide();
- }
-
- function cancelSubscribe(item) {
- location.href = "available_cartridges.jsp?item=" + item;
- }
-</script>
-<script type="text/javascript" src="js/jquery.blockUI-1.33.js"></script>
-<script type="text/javascript" src="js/common.js"></script>
-</fmt:bundle>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribe_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribe_ajaxprocessor.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribe_ajaxprocessor.jsp
deleted file mode 100644
index 6b0ec40..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribe_ajaxprocessor.jsp
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
-<%@ page import="org.wso2.carbon.CarbonConstants" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
-<%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge" %>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.SubscriptionInfo" %>
-<%@ page import="java.text.SimpleDateFormat" %>
-<%@ page import="java.util.ResourceBundle" %>
-<%@ page import="java.util.Map" %>
-<jsp:include page="../dialog/display_messages.jsp"/>
-
-
-<%
- response.setHeader("Cache-Control", "no-cache");
-
- ResourceBundle bundle = ResourceBundle
- .getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
-
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext =
- (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
-
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- CartridgeAdminClient client;
- String repoUrl = "";
- String repoUserName = "";
- String repoPassword = "";
- String otherCartridgeType = "";
- String otherAlias = "";
- String policy = null;
- String repoType = null;
-
- String cartridgeType = request.getParameter("cartridge_type");
- String cartridgeProvider = request.getParameter("cartridge_provider");
- String cartridgeAlias = request.getParameter("cartridge_alias");
- if(!"data".equalsIgnoreCase(cartridgeProvider)){
- repoUrl = request.getParameter("repo_url");
- repoUserName = request.getParameter("repo_username");
- repoPassword = request.getParameter("repo_password");
- otherCartridgeType = request.getParameter("other_cartridge_type");
- otherAlias = request.getParameter("other_alias");
- policy = request.getParameter("policy");
- repoType = request.getParameter("repoType");
- }
- try{
- client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
- SubscriptionInfo info = client.subscribeToCartridge(cartridgeType, cartridgeAlias, policy, repoUrl, "private".equals(repoType), repoUserName, repoPassword,
- otherCartridgeType, otherAlias);
- String message = "";
- if (info != null && info.getHostname() != null) {
- message = "Successfully subscribed. Please map the host name " + info.getHostname() + " to ELB IP";
- } else {
- message = "Successfully subscribed.";
- }
- //CarbonUIMessage.sendCarbonUIMessage(message, CarbonUIMessage.INFO, request);
-%>
-<span id="responseMsg"><%=message%></span>
-<%
- } catch (Exception e) {
- response.setStatus(500);
-%>
-<span id="responseMsg"><%=e.getMessage()%></span>
-<%
- //CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request);
- }
-%>
-
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribed_cartridges.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribed_cartridges.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribed_cartridges.jsp
deleted file mode 100644
index 4ea474b..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/subscribed_cartridges.jsp
+++ /dev/null
@@ -1,174 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
-<%@ page import="org.wso2.carbon.CarbonConstants"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
-<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
-<%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient"%>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.CartridgeWrapper"%>
-<%@ page import="java.text.SimpleDateFormat"%>
-<%@ page import="java.util.ResourceBundle"%>
-<%@ page import="java.util.ArrayList"%>
-
-<jsp:include page="../dialog/display_messages.jsp" />
-
-<%
- response.setHeader("Cache-Control", "no-cache");
-
- String pageNumber = request.getParameter("pageNumber");
- if (pageNumber == null) {
- pageNumber = "0";
- }
- int pageNumberInt = 0;
- try {
- pageNumberInt = Integer.parseInt(pageNumber);
- } catch (NumberFormatException ignored) {
- }
-
- String cartridgeSearchString = request.getParameter("cartridgeSearchString");
- if (cartridgeSearchString == null) {
- cartridgeSearchString = "";
- }
-
- // Fix issue when subscribed_cartridges_ajaxprocessor.jsp page return errors continuously
- String reloadCount = request.getParameter("reload");
- if (reloadCount == null) {
- reloadCount = "0";
- }
- int reloadCountInt = 0;
- try {
- reloadCountInt = Integer.parseInt(reloadCount);
- } catch (NumberFormatException ignored) {
- }
-
- if (new Boolean(request.getParameter("loginStatus"))) {
- // This is a login request
- // Initialize the reload count to zero
- reloadCountInt = 0;
- }
-%>
-
-<fmt:bundle basename="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources">
- <carbon:breadcrumb label="cartrigdes.subscribed.header" resourceBundle="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources"
- topPage="false" request="<%=request%>" />
-
- <script type="text/javascript">
- function searchCartridges() {
- document.searchForm.submit();
- }
- function showCartridgeInfo(popupID, alias) {
- CARBON.showPopupDialog(jQuery('#' + popupID).html(), "Cartridge Information for " + alias, 350, null, null, 400);
- }
- function unsubscribeCartridge(alias) {
- if (alias) {
- CARBON.showConfirmationDialog("<fmt:message key="cartridge.unsubscribe.prompt"></fmt:message>",
- function() {
- //location.href = './call_unsubscribe.jsp?cartridge_alias=' + alias;
- postToBEService('unsubscribe_ajaxprocessor.jsp', 'cartridge_alias=' + alias, 'subscribed_cartridges.jsp');
- }
- );
- }
- }
-
- function syncRepo(alias) {
- if (alias) {
- postToBEService('sync_repo_ajaxprocessor.jsp', 'cartridge_alias=' + alias);
- }
- }
-
- function removeDomain(alias) {
- if (alias) {
- postToBEService('remove_domain_ajaxprocessor.jsp', 'cartridge_alias=' + alias, 'subscribed_cartridges.jsp');
- }
- }
- </script>
-
- <div id="middle">
- <h2>
- <fmt:message key="cartrigdes.subscribed.header" />
- </h2>
-
- <div id="workArea">
- <form action="subscribed_cartridges.jsp" name="searchForm">
- <table class="styledLeft">
- <tr>
- <td>
- <table style="border: 0;">
- <tbody>
- <tr style="border: 0;">
- <td style="border: 0;"><fmt:message key="search.cartrigdes" /> <input type="text"
- name="cartridgeSearchString" value="<%=cartridgeSearchString != null ? cartridgeSearchString : ""%>" />
- </td>
- <td style="border: 0;"><a class="icon-link" href="#" style="background-image: url(images/search.gif);"
- onclick="searchCartridges(); return false;" alt="<fmt:message key="search"/>"> </a></td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </table>
- </form>
-
- <p> </p>
- <div id="cartridges"></div>
- </div>
- </div>
- <script type="text/javascript">
- var refresh;
- jQuery(document).ready(function() {
- var refreshTable = function(){
- jQuery.ajax({
- url:'subscribed_cartridges_ajaxprocessor.jsp?pageNumber=<%=pageNumber%>&cartridgeSearchString=<%=cartridgeSearchString%>',
- success:function(data){
- jQuery('#cartridges').html(data);
- },
- error:function(jqXHR, textStatus, errorThrown) {
- reloadPage();
- }
- })
- }
- // Call this initially
- refreshTable();
- refresh = setInterval(refreshTable, 15000);
- });
-
- function stopRefreshTable() {
- if (refresh) {
- clearInterval(refresh);
- }
- }
-
- function reloadPage() {
- stopRefreshTable();
- <%
- if (reloadCountInt <= 1) {
- %>
- // Reload page. If the session is not there, the page should redirect to login page.
- location.href = 'subscribed_cartridges.jsp?reload=<%=++reloadCountInt%>';
- <%
- }
- %>
- }
- </script>
- <script type="text/javascript" src="js/jquery.blockUI-1.33.js"></script>
- <script type="text/javascript" src="js/common.js"></script>
-</fmt:bundle>
[07/11] Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-xsd.xsl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-xsd.xsl b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-xsd.xsl
new file mode 100644
index 0000000..3209e7c
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/annotated-xsd.xsl
@@ -0,0 +1,850 @@
+<?xml version="1.0"?>
+<!--
+ ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
+ <!--
+ Created by: Jonathan Marsh <jo...@wso2.com>
+ 23 October 2006
+ 7 November 2006 - JM: code review and cleanup
+ -->
+ <xsl:output method="html" indent="yes" encoding="UTF-8"/>
+ <!--
+ Many schemas refer to the built-in schema types. In order to navigate to those types, one needs
+ to know where to load the schema for schemas, hopefully a local version with this stylesheet
+ applied so the user can continue to navigate.
+ -->
+ <xsl:param name="xsd-schema-location" select="'/service-mgt/styles/XMLSchema.xsd'"/>
+
+ <!-- QName resolving functions require the targetNamespace, so stuff it in a global variable. -->
+ <xsl:variable name="targetNamespace" select="xs:schema/@targetNamespace"/>
+
+ <!-- Mozilla doesn't support the namespace axis, which makes simulating namespace declarations
+ problematic. At least we can try alternate reconstruction methods if we know the functionality
+ isn't there. -->
+ <xsl:variable name="supports-namespace-axis" select="count(/*/namespace::*) > 0"/>
+
+ <!-- === Main ========================================
+ Main template for the schema document
+ -->
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title>Schema for
+ <xsl:value-of select="xs:schema/@targetNamespace"/>
+ </title>
+ <style type="text/css">
+ <xsl:call-template name="css"/>
+ </style>
+ </head>
+ <body>
+ <!-- use a table to ensure sidebars longer than their associated tag don't run into the following sidebar.
+ CSS would be preferable (progressive rendering would be improved) if there were a way to do this (I can't find one.) -->
+ <table cellpadding="0" cellspacing="0">
+ <xsl:apply-templates select="xs:schema"/>
+ </table>
+ <p/>
+ <hr/>
+ <table cellpadding="0" cellspacing="0" id="index">
+ <xsl:call-template name="generate-xsd-index"/>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+ <!-- === Elements ========================================
+ The following templates format elements of various flavors
+ (xs:schema, children of xs:schema, grandchildren etc. of schema, and extension elements)
+ -->
+ <xsl:template match="xs:schema">
+ <!--
+ Schema element has schema-block classes, enabling a stylesheet to style the
+ entire schema, especially useful when embedding schema in another langage (e.g. WSDL).
+ -->
+ <tr>
+ <td class="schema-block annotation-area">
+ <div class="sidebar">
+ <xsl:call-template name="index-reference"/>
+ </div>
+ </td>
+ <td class="schema-block">
+ <div class="arrow"> </div>
+ </td>
+ <td class="schema-block source-area">
+ <div class="schema">
+ <xsl:call-template name="element-start"/>
+ </div>
+ </td>
+ </tr>
+ <xsl:apply-templates/>
+ <tr>
+ <td colspan="2" class="schema-block annotation-area"/>
+ <td class="schema-block source-area">
+ <div class="schema">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="xs:schema/xs:*">
+ <xsl:variable name="identifier">
+ <xsl:call-template name="schema-identifier"/>
+ </xsl:variable>
+ <tr>
+ <xsl:choose>
+ <!-- Decide which top-level schema elements get sidebars -->
+ <xsl:when test="not(self::xs:annotation or self::xs:import or self::xs:include)">
+ <td class="schema-block annotation-area">
+ <div class="{local-name()} sidebar sidebar-title">
+ <xsl:if test="$identifier">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$identifier"/>
+ </xsl:attribute>
+ </xsl:if>
+ <span class="sidebar-title-highlight">
+ <xsl:value-of select="@name"/>
+ </span>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:call-template name="referenced-by"/>
+ </div>
+ </td>
+ <td class="schema-block">
+ <div class="arrow"> </div>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td colspan="2" class="schema-block annotation-area"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="schema-block source-area">
+ <div class="schema-top-level">
+ <xsl:call-template name="element-start"/>
+ </div>
+ <div class="schema-top-level">
+ <xsl:apply-templates/>
+ </div>
+ <div class="schema-top-level">
+ <xsl:call-template name="element-end"/>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="xs:*">
+ <!-- Third and deeper levels of schema elements (no sidebar, therefore no table row - just a div. -->
+ <xsl:variable name="identifier">
+ <xsl:call-template name="schema-identifier"/>
+ </xsl:variable>
+ <div class="indent">
+ <xsl:if test="$identifier != ''">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$identifier"/>
+ </xsl:attribute>
+ </xsl:if>
+ <div>
+ <xsl:call-template name="element-start"/>
+ </div>
+ <xsl:apply-templates/>
+ <div>
+ <xsl:call-template name="element-end"/>
+ </div>
+ </div>
+ </xsl:template>
+ <xsl:template match="xs:schema/*[not(self::xs:*)]">
+ <!-- Top-level extension elements -->
+ <tr>
+ <td colspan="2" class="schema-block annotation-area"/>
+ <td class="schema-block source-area">
+ <div class="schema-top-level extension">
+ <xsl:call-template name="element-start">
+ <xsl:with-param name="class" select="'markup-extension-element'"/>
+ </xsl:call-template>
+ </div>
+ <xsl:apply-templates/>
+ <div class="extension">
+ <xsl:call-template name="element-end">
+ <xsl:with-param name="class" select="'markup-extension-element'"/>
+ </xsl:call-template>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="*">
+ <!-- If we've got to here, we're dealing with non-top-level extension elements. -->
+ <div class="indent">
+ <div class="extension">
+ <xsl:call-template name="element-start">
+ <xsl:with-param name="class" select="'markup-extension-element'"/>
+ </xsl:call-template>
+ </div>
+ <xsl:apply-templates/>
+ <div class="extension">
+ <xsl:call-template name="element-end">
+ <xsl:with-param name="class" select="'markup-extension-element'"/>
+ </xsl:call-template>
+ </div>
+ </div>
+ </xsl:template>
+ <!-- === Attributes =========================================
+ The following templates format attributes of various flavors
+ -->
+ <xsl:template match="xs:*/@id">
+ <a name="{@id}"/>
+ <xsl:call-template name="attribute"/>
+ </xsl:template>
+ <xsl:template match="xs:*/@name">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="xs:*/@ref">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-reference"/>
+ <xsl:text>#_</xsl:text>
+ <xsl:value-of select="local-name(..)"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="substring-after(.,':')"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="xs:*/@type | xs:*/@base | xs:*/@itemType | xs:*/@memberTypes">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="value-class">markup-name-attribute-value</xsl:with-param>
+ <xsl:with-param name="reference">
+ <xsl:call-template name="external-reference"/>
+ <xsl:text>#_type_</xsl:text>
+ <xsl:value-of select="substring-after(.,':')"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="xs:*/@source | xs:*/@schemaLocation">
+ <xsl:call-template name="attribute">
+ <xsl:with-param name="reference" select="."/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="@*">
+ <xsl:call-template name="attribute"/>
+ </xsl:template>
+
+ <!-- === Text nodes ========================================
+ The following template formats text nodes
+ -->
+ <xsl:template match="text()[normalize-space(.) != '']">
+ <div class="markup-text-content">
+ <xsl:value-of select="."/>
+ </div>
+ </xsl:template>
+
+ <!-- === Comments ========================================
+ The following template formats comment nodes
+ -->
+ <xsl:template match="xs:schema/comment()">
+ <tr>
+ <td colspan="2" class="schema-block annotation-area"/>
+ <td class="schema-block source-area">
+ <div class="schema-top-level markup-comment">
+ <xsl:text><!--</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>--></xsl:text>
+ </div>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="comment()">
+ <div class="markup-comment indent">
+ <xsl:text><!--</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>--></xsl:text>
+ </div>
+ </xsl:template>
+
+ <!-- === Library templates ========================================
+ Library of useful named templates
+ -->
+ <xsl:template name="css"><![CDATA[
+.schema {padding-left:5em; text-indent:-5em}
+.schema-top-level {padding-left: 6em; text-indent:-5em}
+.indent {margin-left:1em}
+.double-indent {margin-left:2em}
+.trivialText {color:gray}
+
+td {vertical-align:top; font: 100%/1.3 "Lucida Grande","Lucida Sans","Lucida Sans Unicode","trebuchet ms",verdana,sans-serif}
+.annotation-area {width:16em}
+.source-area {font-size:80%; padding-bottom:.6em}
+.sidebar {font-size:80%; padding-bottom:.6em; margin-bottom:2px}
+.arrow {border-top: 1px dashed black; width:2em; position:relative; top:.5em}
+.note {background-color:rgb(255,255,210); text-align:right; border: 1px dashed black; padding:.5em}
+.simpleType {background-color:rgb(255,242,210); text-align:right; border: 1px dashed black; padding:.5em}
+.complexType {background-color:rgb(255,242,210); text-align:right; border: 1px dashed black; padding:.5em}
+.element {background-color:rgb(225,237,246); text-align:right; border: 1px dashed black; padding:.5em}
+.group {background-color:rgb(225,237,246); text-align:right; border: 1px dashed black; padding:.5em}
+.attribute {background-color:rgb(225,246,235); text-align:right; border: 1px dashed black; padding:.5em}
+.attributeGroup {background-color:rgb(225,246,235); text-align:right; border: 1px dashed black; padding:.5em}
+.redefine {background-color:rgb(255,255,210); text-align:right; border: 1px dashed black; padding:.5em}
+.notation {background-color:rgb(255,255,210); text-align:right; border: 1px dashed black; padding:.5em}
+.sidebar-title {}
+.sidebar-title-highlight {font-weight:bold}
+.sidebar-text {padding-top:.3em}
+ul {margin-left:1em; margin-top:0em; margin-bottom:0em}
+.referenced-item {list-style-type:square; text-align:left; margin-left:.5em}
+.referenced-list {margin-top:.5em; text-align:left}
+
+#index {margin-top:2em; margin-bottom:2em}
+
+.markup {color:gray}
+.markup-element {color:gray; text-indent:-2em; }
+.markup-extension-element {color:navy}
+.markup-attribute {color:gray}
+.markup-extension-attribute {color:navy}
+.markup-attribute-value {}
+.markup-name-attribute-value {font-weight:bold}
+.markup-namespace {color:purple}
+.markup-namespace-uri {color:purple}
+.markup-text-content {margin-left:-4em; text-indent:0em}
+.markup-comment {color:green}
+]]>
+ </xsl:template>
+ <xsl:template name="attribute">
+ <xsl:param name="value-class" select="'markup-attribute-value'"/>
+ <xsl:param name="reference"/>
+ <xsl:param name="native-attribute" select="parent::xs:* and namespace-uri(.)=''"/>
+ <xsl:text></xsl:text>
+ <span>
+ <xsl:choose>
+ <xsl:when test="$native-attribute">
+ <xsl:attribute name="class">markup-attribute</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">markup-extension-attribute</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="name(.)"/>
+ </span>
+ <span class="markup">
+ <xsl:text>="</xsl:text>
+ </span>
+ <span class="{$value-class}">
+ <xsl:choose>
+ <xsl:when test="$reference">
+ <a href="{$reference}">
+ <xsl:value-of select="."/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ <span class="markup">
+ <xsl:text>"</xsl:text>
+ </span>
+ </xsl:template>
+ <xsl:template name="namespaces">
+ <xsl:variable name="current" select="current()"/>
+ <!-- Unfortunately Mozilla doesn't support the namespace axis, need to check for that and simulate declarations -->
+ <xsl:choose>
+ <xsl:when test="$supports-namespace-axis">
+ <!--
+ When the namespace axis is present (e.g. Internet Explorer), we can simulate
+ the namespace declarations by comparing the namespaces in scope on this element
+ with those in scope on the parent element. Any difference must have been the
+ result of a namespace declaration. Note that this doesn't reflect the actual
+ source - it will strip out redundant namespace declarations.
+ -->
+ <xsl:for-each select="namespace::*[. != 'http://www.w3.org/XML/1998/namespace']">
+ <xsl:if test="not($current/parent::*[namespace::*[. = current()]])">
+ <span class="markup-namespace">
+ <xsl:text>xmlns</xsl:text>
+ <xsl:if test="name() != ''">:</xsl:if>
+ <xsl:value-of select="name()"/>
+ <xsl:text>="</xsl:text>
+ </span>
+ <span class="markup-namespace-uri">
+ <xsl:value-of select="."/>
+ </span>
+ <span class="markup-namespace">
+ <xsl:text>"</xsl:text>
+ </span>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <!--
+ When the namespace axis isn't supported (e.g. Mozilla), we can simulate
+ appropriate declarations from namespace elements.
+ This currently doesn't check for namespaces on attributes.
+ In the general case we can't reliably detect the use of QNames in content, but
+ in the case of schema, we know which content could contain a QName and look
+ there too. This mechanism is rather unpleasant though, since it records
+ namespaces where they are used rather than showing where they are declared
+ (on some parent element) in the source. Yukk!
+ -->
+ <xsl:if test="namespace-uri(.) != namespace-uri(parent::*)">
+ <span class="markup-namespace">
+ <xsl:text>xmlns</xsl:text>
+ <xsl:if test="substring-before(name(),':') != ''">:</xsl:if>
+ <xsl:value-of select="substring-before(name(),':')"/>
+ <xsl:text>="</xsl:text>
+ </span>
+ <span class="markup-namespace-uri">
+ <xsl:value-of select="namespace-uri(.)"/>
+ </span>
+ <span class="markup-namespace">
+ <xsl:text>"</xsl:text>
+ </span>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="element-start">
+ <xsl:param name="class" select="'markup-element'"/>
+ <span class="markup"><</span>
+ <span class="{$class}">
+ <xsl:value-of select="name(.)"/>
+ </span>
+ <xsl:apply-templates select="@*"/>
+ <xsl:call-template name="namespaces"/>
+ <span class="markup">
+ <xsl:if test="not(node())">
+ <xsl:text>/</xsl:text>
+ </xsl:if>
+ <xsl:text>></xsl:text>
+ </span>
+ </xsl:template>
+ <xsl:template name="element-end">
+ <xsl:param name="class" select="'markup-element'"/>
+ <xsl:if test="node()">
+ <span class="markup">
+ <xsl:text></</xsl:text>
+ </span>
+ <span class="{$class}">
+ <xsl:value-of select="name(.)"/>
+ </span>
+ <span class="markup">
+ <xsl:text>></xsl:text>
+ </span>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="schema-identifier">
+ <!-- Calculate a fragment identifier for the element this element refers to, if any -->
+ <xsl:if test="@name | @ref">
+ <xsl:choose>
+ <xsl:when
+ test="(self::xs:attribute or self::xs:element) and not(parent::xs:schema)">
+ <xsl:variable name="top" select="ancestor::*[parent::xs:schema]"/>
+ <xsl:variable name="toptype">
+ <xsl:choose>
+ <xsl:when test="$top[self::xs:complexType or self::xs:simpleType]">type
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="local-name($top)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:text>_local</xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="$toptype"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="$top/@name"/>
+ </xsl:when>
+ <xsl:when test="local-name()='complexType' or local-name()='simpleType'">_type
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="local-name()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="@name | @ref"/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="componentListItem">
+ <xsl:variable name="typeIdentifier">
+ <xsl:choose>
+ <xsl:when test="self::xs:complexType or self::xs:simpleType">type</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="local-name()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="position()>1">
+ <xsl:text>,</xsl:text>
+ </xsl:if>
+ <a href="#_{$typeIdentifier}_{@name}">
+ <xsl:value-of select="@name"/>
+ </a>
+ </xsl:template>
+ <xsl:template name="localComponentListItem">
+ <xsl:variable name="typeIdentifier" select="local-name()"/>
+ <xsl:variable name="top" select="ancestor::*[parent::xs:schema]"/>
+ <xsl:variable name="toptype">
+ <xsl:choose>
+ <xsl:when test="$top[self::xs:complexType or self::xs:simpleType]">type</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="local-name($top)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="tnsName">
+ <xsl:choose>
+ <xsl:when test="contains(@name, ':') and namespace::*[. = $targetNamespace and name(.) =
+ substring-before(@name,':')]">
+ <xsl:value-of select="substring-after(@name,':')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="position()>1">
+ <xsl:text>,</xsl:text>
+ </xsl:if>
+ <a href="#_local{$typeIdentifier}_{$toptype}_{$top/@name}_{@name}">
+ <xsl:value-of select="$tnsName"/>
+ </a>
+ <span class="trivialText">of the</span>
+ <xsl:value-of select="$top/@name"/>
+ <xsl:text></xsl:text>
+ <span class="trivialText">
+ <xsl:value-of select="local-name($top)"/>
+ </span>
+ </xsl:template>
+ <xsl:template name="insert-reference">
+ <xsl:if test="self::xs:attribute">
+ <xsl:variable name="top" select="ancestor::*[parent::xs:schema]"/>
+ <xsl:variable name="toptype">
+ <xsl:choose>
+ <xsl:when test="$top[self::xs:complexType or self::xs:simpleType]">type
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="local-name($top)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <a href="#_localattribute_{$toptype}_{$top/@name}_{@name | @ref}">
+ <xsl:value-of select="@name | @ref"/>
+ </a>
+ <xsl:text>local attribute of the</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="ancestor-or-self::xs:*[last() - 1]">
+ <xsl:variable name="type">
+ <xsl:choose>
+ <xsl:when test="self::xs:complexType or self::xs:simpleType">type</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="local-name(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <a href="#_{$type}_{@name}">
+ <xsl:value-of select="@name"/>
+ </a>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="referenced-by">
+ <xsl:variable name="target" select="@name"/>
+ <xsl:if test="parent::xs:schema">
+ <div class="sidebar-text">
+ <xsl:variable name="extended-by" select="ancestor::xs:schema//xs:extension[substring-after(@base | @type | @ref |
+ @itemType,':') = $target]"/>
+ <xsl:if test="count($extended-by) > 0">
+ <div class="referenced-list">Extended by:</div>
+ <ul>
+ <xsl:for-each select="$extended-by">
+ <xsl:sort select="@base | @type | @ref | @itemType"/>
+ <li class="referenced-item">
+ <xsl:call-template name="insert-reference"/>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ <xsl:variable name="restricted-by" select="ancestor::xs:schema//xs:restriction[substring-after(@base | @type | @ref |
+ @itemType,':') = $target]"/>
+ <xsl:if test="count($restricted-by) > 0">
+ <div class="referenced-list">Restricted by:</div>
+ <ul>
+ <xsl:for-each select="$restricted-by">
+ <xsl:sort select="@base | @type | @ref | @itemType"/>
+ <li class="referenced-item">
+ <xsl:call-template name="insert-reference"/>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ <xsl:variable name="referenced-by" select="ancestor::xs:schema//xs:*[not(self::xs:extension) and
+ not(self::xs:restriction)][substring-after(@base | @type | @ref | @itemType,':')
+ = $target]"/>
+ <xsl:if test="count($referenced-by) > 0">
+ <div class="referenced-list">Referenced by:</div>
+ <ul>
+ <xsl:for-each select="$referenced-by">
+ <xsl:sort select="@base | @type | @ref | @itemType"/>
+ <li class="referenced-item">
+ <xsl:call-template name="insert-reference"/>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ <xsl:call-template name="additional-references">
+ <xsl:with-param name="target" select="$target"/>
+ </xsl:call-template>
+ </div>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="additional-references">
+ <xsl:param name="target"/>
+ <!-- override this template to list additonal references -->
+ </xsl:template>
+ <xsl:template name="external-reference">
+ <xsl:choose>
+ <xsl:when test="$supports-namespace-axis">
+ <xsl:if test="not(../namespace::*[. = $targetNamespace and name(.) =
+ substring-before(current(),':')])">
+ <xsl:variable name="prefix" select="substring-before(.,':')"/>
+ <xsl:variable name="uri" select="../namespace::*[name(.) = $prefix]"/>
+ <xsl:choose>
+ <xsl:when test="$uri = 'http://www.w3.org/2001/XMLSchema'">
+ <xsl:value-of select="$xsd-schema-location"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
+ select="ancestor::xs:schema/xs:import[@namespace=$uri]/@schemaLocation"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <!-- Take a wild guess at the most commonly used type prefixes -->
+ <xsl:when
+ test="substring-before(current(),':') = 'xs' or substring-before(current(),':') = 'xsd'">
+ <xsl:value-of select="$xsd-schema-location"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- The link will be broken. Bad Mozilla! -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="generate-xsd-index">
+ <xsl:if test="xs:schema/xs:complexType">
+ <tr>
+ <td id="complexType-list" class="annotation-area">
+ <div class="complexType sidebar sidebar-title-highlight">Index of complexTypes
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="xs:schema/xs:complexType">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="xs:schema/xs:simpleType">
+ <tr>
+ <td id="simpleType-list" class="annotation-area">
+ <div class="simpleType sidebar sidebar-title-highlight">Index of simpleTypes
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="xs:schema/xs:simpleType">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="xs:schema/xs:element">
+ <tr>
+ <td id="global-element-list" class="annotation-area">
+ <div class="element sidebar sidebar-title-highlight">Index of global elements
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="xs:schema/xs:element">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="xs:schema/*//xs:element[@name]">
+ <tr>
+ <td id="local-element-list" class="annotation-area">
+ <div class="element sidebar sidebar-title-highlight">Index of local elements
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="xs:schema/*//xs:element[@name]">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="localComponentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="xs:schema/xs:attribute">
+ <tr>
+ <td id="global-attribute-list" class="annotation-area">
+ <div class="attribute sidebar sidebar-title-highlight">Index of global
+ attributes
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="xs:schema/xs:attribute">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="xs:schema/*//xs:attribute[@name]">
+ <tr>
+ <td id="local-attribute-list" class="annotation-area">
+ <div class="attribute sidebar sidebar-title-highlight">Index of local attributes
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="xs:schema/*//xs:attribute[@name]">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="localComponentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="xs:schema/xs:group">
+ <tr>
+ <td id="model-group-list" class="annotation-area">
+ <div class="group sidebar sidebar-title-highlight">Index of model groups</div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="xs:schema/xs:group">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="xs:schema/xs:attributeGroup">
+ <tr>
+ <td id="attributeGroup-list" class="annotation-area">
+ <div class="attributeGroup sidebar sidebar-title-highlight">Index of attribute
+ groups
+ </div>
+ </td>
+ <td>
+ <div class="arrow"> </div>
+ </td>
+ <td class="source-area">
+ <xsl:for-each select="xs:schema/xs:attributeGroup">
+ <xsl:sort select="@name"/>
+ <xsl:call-template name="componentListItem"/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="index-reference">
+ <div class="note sidebar-text">See the
+ <a href="#index">index</a>
+ of
+ <xsl:variable name="ss1">
+ <xsl:if test="xs:complexType">
+ <a href="#complexType-list">complexTypes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss2">
+ <xsl:copy-of select="$ss1"/>
+ <xsl:if test="xs:simpleType">
+ <xsl:if test="$ss1!=''">,</xsl:if>
+ <a href="#simpleType-list">simpleTypes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss3">
+ <xsl:copy-of select="$ss2"/>
+ <xsl:if test="xs:element">
+ <xsl:if test="$ss2!=''">,</xsl:if>
+ <a href="#global-element-list">global elements</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss4">
+ <xsl:copy-of select="$ss3"/>
+ <xsl:if test="*//xs:element[@name]">
+ <xsl:if test="$ss3!=''">,</xsl:if>
+ <a href="#local-element-list">local elements</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss5">
+ <xsl:copy-of select="$ss4"/>
+ <xsl:if test="xs:attribute">
+ <xsl:if test="$ss4!=''">,</xsl:if>
+ <a href="#global-attribute-list">global attributes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss6">
+ <xsl:copy-of select="$ss5"/>
+ <xsl:if test="*//xs:attribute[@name]">
+ <xsl:if test="$ss5!=''">,</xsl:if>
+ <a href="#local-attribute-list">local attributes</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss7">
+ <xsl:copy-of select="$ss6"/>
+ <xsl:if test="xs:group">
+ <xsl:if test="$ss6!=''">,</xsl:if>
+ <a href="#model-group-list">model groups</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ss8">
+ <xsl:copy-of select="$ss7"/>
+ <xsl:if test="xs:attributeGroup">
+ <xsl:if test="$ss7!=''">,</xsl:if>
+ <a href="#attributeGroup-list">attribute groups</a>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:copy-of select="$ss8"/>
+ <xsl:text>defined in this schema.</xsl:text>
+ </div>
+ </xsl:template>
+</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/atom.xsl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/atom.xsl b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/atom.xsl
new file mode 100644
index 0000000..7ce7e04
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/atom.xsl
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="html"/>
+
+ <xsl:template match="ns1:feed" xmlns:ns1="http://www.w3.org/2005/Atom">
+ <html>
+ <head>
+ <title>
+ <xsl:value-of select="ns2:title" xmlns:ns2="http://www.w3.org/2005/Atom"/>
+ </title>
+ <style media="all" lang="en" type="text/css">
+ :root:before, :root:before {
+ font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
+ font-size:70%;
+ content: "This data file is meant to be read in a XML Atom reader. See document
+ source."
+ }
+ .AtomTitle
+ {
+ display: block;
+ font-size:200%;
+ font-weight:bolder;
+ color:#436976;
+ text-decoration:none;
+ border-bottom: 20px solid #dee7ec;
+ }
+ .Entry
+ {
+ border-width: 2px;
+ border-color: #336699;
+ border-style: solid;
+ width: 500px;
+ }
+ .Title
+ {
+ background-color: #436976;
+ color: #FFFFFF;
+ font-size: 1.4em;
+ font-family: Verdana;
+ font-size: 9pt;
+ font-weight: bold;
+ padding-left: 5px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ }
+ .Title A:visited
+ {
+ color: #FFFFFF;
+ text-decoration: underline;
+ }
+ .Title A:link
+ {
+ color: #FFFFFF;
+ text-decoration: underline;
+ }
+ .Title A:hover
+ {
+ color: #FFFF00;
+ text-decoration: none;
+ }
+ .Summary
+ {
+ color: #000000;
+ font-family: Verdana;
+ font-size: 9pt;
+ padding-left: 5px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ padding-right: 5px;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="AtomTitle">
+ <xsl:value-of select="ns2:title" xmlns:ns2="http://www.w3.org/2005/Atom"/>
+ </div>
+ <br/>
+
+ <xsl:for-each select="ns2:entry" xmlns:ns2="http://www.w3.org/2005/Atom">
+
+ <div class="Entry">
+ <div class="Title">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="ns2:link/@href"
+ xmlns:ns2="http://www.w3.org/2005/Atom"/>
+ </xsl:attribute>
+ <xsl:value-of select="ns2:title"
+ xmlns:ns2="http://www.w3.org/2005/Atom"/>
+ </a>
+ <xsl:text>    </xsl:text>
+ <xsl:value-of select="ns2:updated"
+ xmlns:ns2="http://www.w3.org/2005/Atom"/>
+ </div>
+ <div class="Summary">
+ <xsl:choose>
+ <xsl:when test="ns2:summary"
+ xmlns:ns2="http://www.w3.org/2005/Atom">
+ <b>Summary:</b>
+ <xsl:value-of select="ns2:summary"
+ xmlns:ns2="http://www.w3.org/2005/Atom"/>
+ </xsl:when>
+ </xsl:choose>
+
+ </div>
+ </div>
+ <br/>
+
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+
+</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/datatypes.dtd
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/datatypes.dtd b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/datatypes.dtd
new file mode 100644
index 0000000..cd47625
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/datatypes.dtd
@@ -0,0 +1,216 @@
+<!--
+ ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<!--
+ DTD for XML Schemas: Part 2: Datatypes
+ $Id: datatypes.dtd,v 1.23 2001/03/16 17:36:30 ht Exp $
+ Note this DTD is NOT normative, or even definitive. - - the
+ prose copy in the datatypes REC is the definitive version
+ (which shouldn't differ from this one except for this comment
+ and entity expansions, but just in case)
+ -->
+<!--
+ This DTD cannot be used on its own, it is intended
+ only for incorporation in XMLSchema.dtd, q.v.
+ -->
+<!-- Define all the element names, with optional prefix -->
+<!ENTITY % simpleType "%p;simpleType">
+<!ENTITY % restriction "%p;restriction">
+<!ENTITY % list "%p;list">
+<!ENTITY % union "%p;union">
+<!ENTITY % maxExclusive "%p;maxExclusive">
+<!ENTITY % minExclusive "%p;minExclusive">
+<!ENTITY % maxInclusive "%p;maxInclusive">
+<!ENTITY % minInclusive "%p;minInclusive">
+<!ENTITY % totalDigits "%p;totalDigits">
+<!ENTITY % fractionDigits "%p;fractionDigits">
+<!ENTITY % length "%p;length">
+<!ENTITY % minLength "%p;minLength">
+<!ENTITY % maxLength "%p;maxLength">
+<!ENTITY % enumeration "%p;enumeration">
+<!ENTITY % whiteSpace "%p;whiteSpace">
+<!ENTITY % pattern "%p;pattern">
+<!--
+ Customisation entities for the ATTLIST of each element
+ type. Define one of these if your schema takes advantage
+ of the anyAttribute='##other' in the schema for schemas
+ -->
+<!ENTITY % simpleTypeAttrs "">
+<!ENTITY % restrictionAttrs "">
+<!ENTITY % listAttrs "">
+<!ENTITY % unionAttrs "">
+<!ENTITY % maxExclusiveAttrs "">
+<!ENTITY % minExclusiveAttrs "">
+<!ENTITY % maxInclusiveAttrs "">
+<!ENTITY % minInclusiveAttrs "">
+<!ENTITY % totalDigitsAttrs "">
+<!ENTITY % fractionDigitsAttrs "">
+<!ENTITY % lengthAttrs "">
+<!ENTITY % minLengthAttrs "">
+<!ENTITY % maxLengthAttrs "">
+<!ENTITY % enumerationAttrs "">
+<!ENTITY % whiteSpaceAttrs "">
+<!ENTITY % patternAttrs "">
+<!-- Define some entities for informative use as attribute
+ types -->
+<!ENTITY % URIref "CDATA">
+<!ENTITY % XPathExpr "CDATA">
+<!ENTITY % QName "NMTOKEN">
+<!ENTITY % QNames "NMTOKENS">
+<!ENTITY % NCName "NMTOKEN">
+<!ENTITY % nonNegativeInteger "NMTOKEN">
+<!ENTITY % boolean "(true|false)">
+<!ENTITY % simpleDerivationSet "CDATA">
+<!--
+ #all or space-separated list drawn from derivationChoice
+ -->
+<!--
+ Note that the use of 'facet' below is less restrictive
+ than is really intended: There should in fact be no
+ more than one of each of minInclusive, minExclusive,
+ maxInclusive, maxExclusive, totalDigits, fractionDigits,
+ length, maxLength, minLength within datatype,
+ and the min- and max- variants of Inclusive and Exclusive
+ are mutually exclusive. On the other hand, pattern and
+ enumeration may repeat.
+ -->
+<!ENTITY % minBound "(%minInclusive; | %minExclusive;)">
+<!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)">
+<!ENTITY % bounds "%minBound; | %maxBound;">
+<!ENTITY % numeric "%totalDigits; | %fractionDigits;">
+<!ENTITY % ordered "%bounds; | %numeric;">
+<!ENTITY % unordered "%pattern; | %enumeration; | %whiteSpace; | %length; |
+ %maxLength; | %minLength;">
+<!ENTITY % facet "%ordered; | %unordered;">
+<!ENTITY % facetAttr "value CDATA #REQUIRED
+ id ID #IMPLIED">
+<!ENTITY % fixedAttr "fixed %boolean; #IMPLIED">
+<!ENTITY % facetModel "(%annotation;)?">
+<!ELEMENT %simpleType; ((%annotation;)?, (%restriction; | %list; | %union;))>
+<!ATTLIST %simpleType;
+ name %NCName; #IMPLIED
+ final %simpleDerivationSet; #IMPLIED
+ id ID #IMPLIED
+ %simpleTypeAttrs;
+>
+<!-- name is required at top level -->
+<!ELEMENT %restriction; ((%annotation;)?, (%restriction1; | ((%simpleType;)?, (%facet;)*)), (%attrDecls;))>
+<!ATTLIST %restriction;
+ base %QName; #IMPLIED
+ id ID #IMPLIED
+ %restrictionAttrs;
+>
+<!--
+ base and simpleType child are mutually exclusive,
+ one is required.
+
+ restriction is shared between simpleType and
+ simpleContent and complexContent (in XMLSchema.xsd).
+ restriction1 is for the latter cases, when this
+ is restricting a complex type, as is attrDecls.
+ -->
+<!ELEMENT %list; ((%annotation;)?, (%simpleType;)?)>
+<!ATTLIST %list;
+ itemType %QName; #IMPLIED
+ id ID #IMPLIED
+ %listAttrs;
+>
+<!--
+ itemType and simpleType child are mutually exclusive,
+ one is required
+ -->
+<!ELEMENT %union; ((%annotation;)?, (%simpleType;)*)>
+<!ATTLIST %union;
+ id ID #IMPLIED
+ memberTypes %QNames; #IMPLIED
+ %unionAttrs;
+>
+<!--
+ At least one item in memberTypes or one simpleType
+ child is required
+ -->
+<!ELEMENT %maxExclusive; %facetModel;>
+<!ATTLIST %maxExclusive;
+ %facetAttr;
+ %fixedAttr;
+ %maxExclusiveAttrs;
+>
+<!ELEMENT %minExclusive; %facetModel;>
+<!ATTLIST %minExclusive;
+ %facetAttr;
+ %fixedAttr;
+ %minExclusiveAttrs;
+>
+<!ELEMENT %maxInclusive; %facetModel;>
+<!ATTLIST %maxInclusive;
+ %facetAttr;
+ %fixedAttr;
+ %maxInclusiveAttrs;
+>
+<!ELEMENT %minInclusive; %facetModel;>
+<!ATTLIST %minInclusive;
+ %facetAttr;
+ %fixedAttr;
+ %minInclusiveAttrs;
+>
+<!ELEMENT %totalDigits; %facetModel;>
+<!ATTLIST %totalDigits;
+ %facetAttr;
+ %fixedAttr;
+ %totalDigitsAttrs;
+>
+<!ELEMENT %fractionDigits; %facetModel;>
+<!ATTLIST %fractionDigits;
+ %facetAttr;
+ %fixedAttr;
+ %fractionDigitsAttrs;
+>
+<!ELEMENT %length; %facetModel;>
+<!ATTLIST %length;
+ %facetAttr;
+ %fixedAttr;
+ %lengthAttrs;
+>
+<!ELEMENT %minLength; %facetModel;>
+<!ATTLIST %minLength;
+ %facetAttr;
+ %fixedAttr;
+ %minLengthAttrs;
+>
+<!ELEMENT %maxLength; %facetModel;>
+<!ATTLIST %maxLength;
+ %facetAttr;
+ %fixedAttr;
+ %maxLengthAttrs;
+>
+<!-- This one can be repeated -->
+<!ELEMENT %enumeration; %facetModel;>
+<!ATTLIST %enumeration;
+ %facetAttr;
+ %enumerationAttrs;
+>
+<!ELEMENT %whiteSpace; %facetModel;>
+<!ATTLIST %whiteSpace;
+ %facetAttr;
+ %fixedAttr;
+ %whiteSpaceAttrs;
+>
+<!-- This one can be repeated -->
+<!ELEMENT %pattern; %facetModel;>
+<!ATTLIST %pattern;
+ %facetAttr;
+ %patternAttrs;
+>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/rss.xsl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/rss.xsl b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/rss.xsl
new file mode 100644
index 0000000..be86baf
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/styles/rss.xsl
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="html"/>
+ <xsl:template match="rss/channel">
+ <html>
+ <head>
+ <title>
+ <xsl:value-of select="title"/>
+ </title>
+ <style media="all" lang="en" type="text/css">
+ :root:before, :root:before {
+ font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
+ font-size:70%;
+ content: "This data file is meant to be read in a XML feed reader. See document
+ source."
+ }
+ .ChannelTitle
+ {
+ display: block;
+ font-size:200%;
+ font-weight:bolder;
+ color:#436976;
+ text-decoration:none;
+ border-bottom: 20px solid #dee7ec;
+ }
+ .ArticleEntry
+ {
+ border-width: 2px;
+ border-color: #336699;
+ border-style: solid;
+ width: 500px;
+ }
+ .ArticleTitle
+ {
+ background-color: #436976;
+ color: #FFFFFF;
+ font-size: 1.4em;
+ font-family: Verdana;
+ font-size: 9pt;
+ font-weight: bold;
+ padding-left: 5px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ }
+ .ArticleTitle A:visited
+ {
+ color: #FFFFFF;
+ text-decoration: underline;
+ }
+ .ArticleTitle A:link
+ {
+ color: #FFFFFF;
+ text-decoration: underline;
+ }
+ .ArticleTitle A:hover
+ {
+ color: #FFFF00;
+ text-decoration: none;
+ }
+ .ArticleDescription
+ {
+ color: #000000;
+ font-family: Verdana;
+ font-size: 9pt;
+ padding-left: 5px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ padding-right: 5px;
+ }
+ </style>
+ </head>
+ <body>
+ <xsl:apply-templates select="title"/>
+ <xsl:apply-templates select="item"/>
+ </body>
+ </html>
+ </xsl:template>
+ <xsl:template match="title">
+ <div class="ChannelTitle">
+ <xsl:value-of select="text()"/>
+ </div>
+ <br/>
+ </xsl:template>
+ <xsl:template match="item">
+ <div class="ArticleEntry">
+ <div class="ArticleTitle">
+ <a href="{link}">
+ <xsl:value-of select="title"/>
+ </a>
+ <xsl:text>    </xsl:text>
+ <xsl:value-of select="pubDate"/>
+ </div>
+ <div class="ArticleDescription">
+ <b>Description:</b>
+ <xsl:value-of select="description"/>
+ </div>
+ </div>
+ <br/>
+ </xsl:template>
+</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribe.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribe.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribe.jsp
new file mode 100644
index 0000000..a821dd3
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribe.jsp
@@ -0,0 +1,305 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
+<%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient" %>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.PolicyDefinition" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+<%@ page import="java.text.SimpleDateFormat" %>
+<%@ page import="java.util.ResourceBundle" %>
+<jsp:include page="../dialog/display_messages.jsp"/>
+
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+ String cartridgeType = request.getParameter("cartridgeType");
+ String multiTenantValue = request.getParameter("multiTenant");
+ String cartridgeProvider = request.getParameter("cartridgeProvider");
+ boolean multiTenant = Boolean.valueOf(multiTenantValue);
+ String item = request.getParameter("item");
+
+ PolicyDefinition[] policyDefinitions = null;
+
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext =
+ (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ CartridgeAdminClient client;
+
+ boolean internalRepoFeatureEnabled = false;
+
+ try{
+ client = new CartridgeAdminClient(cookie, backendServerURL, configContext,request.getLocale());
+ policyDefinitions = client.getPolicyDefinitions();
+
+ if (policyDefinitions == null || policyDefinitions.length == 0) {
+ throw new IllegalStateException("Policy Definitions not found.");
+ }
+ internalRepoFeatureEnabled = client.isFeatureEnabled("feature.internalrepo.enabled");
+ }catch (Exception e) {
+ response.setStatus(500);
+ CarbonUIMessage uiMsg = new CarbonUIMessage(CarbonUIMessage.ERROR, e.getMessage(), e);
+ session.setAttribute(CarbonUIMessage.ID, uiMsg);
+ %>
+ <jsp:include page="../admin/error.jsp"/>
+ <%
+ return;
+ }
+
+%>
+<fmt:bundle basename="org.apache.stratos.cartridge.mgt.ui.i18n.Resources">
+<carbon:breadcrumb
+ label="subscribe"
+ resourceBundle="org.apache.stratos.cartridge.mgt.ui.i18n.Resources"
+ topPage="true"
+ request="<%=request%>"/>
+<div id="middle">
+<%if(cartridgeType != null) {%>
+ <h2><fmt:message key="subscribe.to"><fmt:param value="<%= cartridgeType%>"/></fmt:message></h2>
+<%} else {%>
+ <h2><fmt:message key="subscribe.new.cartridge"/></h2>
+ <p> </p>
+<%} %>
+<div id="workArea">
+ <form id="subscribeForm" name="subscribeToCartridge">
+ <table id="subscribeToCartridgeTbl" width="100%" class="styledLeft">
+ <thead>
+ <tr>
+ <th>
+ <fmt:message key="cartridge.information"/>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="nopadding">
+ <table class="normal-nopadding" cellspacing="0">
+ <tbody>
+ <tr>
+ <!-- Keep 30% width to give more space for inputs -->
+ <td style="width: 30%"><label>Cartridge Type</label><span class="required">*</span></td>
+ <td>
+ <span><%=cartridgeType%></span>
+ <input name="cartridge_type" type="hidden" value="<%=cartridgeType%>"/>
+ <input name="cartridge_provider" type="hidden" value="<%=cartridgeProvider%>"/>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="cartridge_alias">Alias</label><span class="required">*</span></td>
+ <td><input id="cartridge_alias" name="cartridge_alias" type="text" style="width: 400px" maxlength="300" /></td>
+ </tr>
+ <%if((cartridgeProvider != null && !cartridgeProvider.equalsIgnoreCase("data")) && !multiTenant) {%>
+ <tr>
+ <td><label for="policy">Policy</label><span class="required">*</span></td>
+ <td style="border: 0;"><select name="policy" id="policy">
+ <%
+ for (PolicyDefinition policy : policyDefinitions) {
+
+ %>
+ <option value="<%=policy.getName()%>" <%if (policy.getDefaultPolicy()) {%>selected="selected"<%}%>>
+ <%=policy.getDescription()%>
+ </option>
+ <%
+ }
+ %>
+ </select></td>
+ </tr>
+ <%}%>
+ <%if((cartridgeProvider != null && !cartridgeProvider.equalsIgnoreCase("data"))) {%>
+ <tr>
+ <td colspan="2" class="middle-header"><fmt:message key="repository.information"/></td>
+ </tr>
+ <%if(internalRepoFeatureEnabled) {%>
+ <tr>
+ <td><label for="internalRepo" id="internalRepoLabel">Use Internal Repository</label><span class="required">*</span></td>
+ <td>
+ <input name="internalRepo" type="radio" value="yes" /> Yes
+ <input name="internalRepo" type="radio" value="no" checked="checked" /> No
+ </td>
+ </tr>
+ <%} %>
+ <tr class="repoDetails">
+ <td><label for="repoType" id="repoTypeLabel">Repository Type</label><span class="required">*</span></td>
+ <td>
+ <input name="repoType" type="radio" value="public" checked="checked" /> Public
+ <input name="repoType" type="radio" value="private" /> Private
+ </td>
+ </tr>
+ <tr class="repoDetails">
+ <td><label for="repo_url" id="repoLabel">GIT repository URL: (http:// or https://)</label><span class="required">*</span></td>
+ <td><input id="repo_url" name="repo_url" type="text" style="width: 400px" maxlength="1000" />
+ </td>
+ </tr>
+ <tr class="repoDetails repoCredentials">
+ <td><label for="repo_username" id="repo_usernameLabel">GIT Repository Username</label><span class="required" style="display: none;">*</span></td>
+ <td><input id="repo_username" name="repo_username" type="text" style="width: 400px" maxlength="500" autocomplete="off" /></td>
+ </tr>
+ <tr class="repoDetails repoCredentials">
+ <td><label for="repo_password" id="repo_passwordLabel">GIT Repository Password</label><span class="required" style="display: none;">*</span></td>
+ <td><input id="repo_password" name="repo_password" type="password" style="width: 400px" maxlength="500" autocomplete="off" /></td>
+ </tr>
+ <tr class="repoDetails" id="testConnectionRow">
+ <td></td>
+ <td>
+ <input id="testGitButton" type="button" class="button" value="Test Connection"
+ onclick="postToBEService('test_git_ajaxprocessor.jsp', jQuery('#subscribeForm').serialize(), null, '#testGitButton', validateRepository);">
+ </td>
+ </tr>
+ <tr class="dataCartridgeRow" style="display: none;">
+ <td colspan="2" class="middle-header"><fmt:message key="cartridge.connect.information"/></td>
+ </tr>
+ <tr class="dataCartridgeRow" style="display: none;">
+ <td><label for="other_cartridge_type">Connect Data Cartridge</label><span class="required">*</span></td>
+ <td><select id="other_cartridge_type" name="other_cartridge_type" ><option value="mysql">mysql</option></select></td>
+ </tr>
+ <tr class="dataCartridgeRow" style="display: none;">
+ <td><label for="other_alias">Data Cartridge Alias</label><span class="required">*</span></td>
+ <td><input id="other_alias" name="other_alias" type="text" style="width: 400px" maxlength="300" /></td>
+ </tr>
+ <%}%>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr id="buttonRow" class="buttonRow">
+ <td>
+ <input id="subscribeButton" type="submit" class="button" value="Subscribe" />
+ <input id="subscribeCancelButton" type="button" class="button" value="Cancel" onclick="cancelSubscribe('<%=item%>');" />
+ <%if(!"data".equalsIgnoreCase(cartridgeProvider) && !multiTenant){%>
+ <a id="showConnect" onclick="showConnectCartridge();" style="cursor: pointer;">Connect another cartridge...</a>
+ <a id="hideConnect" onclick="hideConnectCartridge();" style="cursor: pointer; display: none;">Hide connecting cartridge fields...</a>
+ <%}%>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+
+ <p> </p>
+ </div>
+
+</div>
+
+<script type="text/javascript">
+ jQuery(document).ready(
+ function() {
+ if (jQuery("#internalRepoLabel").length > 0) {
+ jQuery('input:radio[name="internalRepo"]').click(
+ function() {
+ var $this = jQuery(this);
+ if ($this.val() == "no") {
+ jQuery(".repoDetails").show();
+ } else {
+ jQuery(".repoDetails").hide();
+ jQuery("#repo_url").val("");
+ jQuery("#repo_username").val("");
+ jQuery("#repo_password").val("");
+ }
+ })
+ };
+
+ jQuery('input:radio[name="repoType"]').click(
+ function() {
+ var $this = jQuery(this);
+ if ($this.val() == "private") {
+ jQuery(".repoCredentials .required").show();
+ } else {
+ jQuery(".repoCredentials .required").hide();
+ }
+ })
+
+ setStratosFormSubmitFunction("#subscribeForm", validate, "subscribe_ajaxprocessor.jsp", "subscribed_cartridges.jsp", "#subscribeButton");
+ });
+
+ function validate() {
+ if (jQuery("#cartridge_alias").val().length == 0) {
+ CARBON.showErrorDialog('Please enter an alias for the cartridge.');
+ return false;
+ }
+ if (!validateRepository()) {
+ return false;
+ }
+ if (jQuery(".dataCartridgeRow").length > 0 &&
+ jQuery(".dataCartridgeRow").css("display") != "none" && jQuery("#other_alias").val().length == 0) {
+ CARBON.showErrorDialog('Please enter an alias for the data cartridge.');
+ return false;
+ }
+ return true;
+ }
+
+ function validateRepository() {
+ var repoRequired = false;
+ if (jQuery("#internalRepoLabel").length > 0) {
+ if (jQuery('input[name="internalRepo"]:checked').val() == "no") {
+ repoRequired = true;
+ if (jQuery("#repo_url").val().length == 0) {
+ CARBON.showWarningDialog('Please enter GIT repository URL.');
+ return false;
+ }
+ }
+ } else {
+ // Some cartridges do not have a repo URL
+ if (jQuery("#repo_url").length > 0) {
+ repoRequired = true;
+ if (jQuery("#repo_url").val().length == 0) {
+ CARBON.showWarningDialog('Please enter GIT repository URL.');
+ return false;
+ }
+ }
+ }
+
+ if (repoRequired && jQuery("#repoTypeLabel").length > 0
+ && jQuery('input[name="repoType"]:checked').val() == "private") {
+ if (jQuery("#repo_username").val().length == 0) {
+ CARBON.showWarningDialog('Please enter GIT repository username.');
+ return false;
+ }
+ if (jQuery("#repo_password").val().length == 0) {
+ CARBON.showWarningDialog('Please enter GIT repository password.');
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function showConnectCartridge() {
+ jQuery(".dataCartridgeRow").show();
+ jQuery("#showConnect").hide();
+ jQuery("#hideConnect").show();
+ }
+
+ function hideConnectCartridge() {
+ jQuery(".dataCartridgeRow").hide();
+ jQuery("#showConnect").show();
+ jQuery("#hideConnect").hide();
+ }
+
+ function cancelSubscribe(item) {
+ location.href = "available_cartridges.jsp?item=" + item;
+ }
+</script>
+<script type="text/javascript" src="js/jquery.blockUI-1.33.js"></script>
+<script type="text/javascript" src="js/common.js"></script>
+</fmt:bundle>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribe_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribe_ajaxprocessor.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribe_ajaxprocessor.jsp
new file mode 100644
index 0000000..a993c00
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribe_ajaxprocessor.jsp
@@ -0,0 +1,90 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
+<%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge" %>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.SubscriptionInfo" %>
+<%@ page import="java.text.SimpleDateFormat" %>
+<%@ page import="java.util.ResourceBundle" %>
+<%@ page import="java.util.Map" %>
+<jsp:include page="../dialog/display_messages.jsp"/>
+
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+
+ ResourceBundle bundle = ResourceBundle
+ .getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
+
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext =
+ (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ CartridgeAdminClient client;
+ String repoUrl = "";
+ String repoUserName = "";
+ String repoPassword = "";
+ String otherCartridgeType = "";
+ String otherAlias = "";
+ String policy = null;
+ String repoType = null;
+
+ String cartridgeType = request.getParameter("cartridge_type");
+ String cartridgeProvider = request.getParameter("cartridge_provider");
+ String cartridgeAlias = request.getParameter("cartridge_alias");
+ if(!"data".equalsIgnoreCase(cartridgeProvider)){
+ repoUrl = request.getParameter("repo_url");
+ repoUserName = request.getParameter("repo_username");
+ repoPassword = request.getParameter("repo_password");
+ otherCartridgeType = request.getParameter("other_cartridge_type");
+ otherAlias = request.getParameter("other_alias");
+ policy = request.getParameter("policy");
+ repoType = request.getParameter("repoType");
+ }
+ try{
+ client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
+ SubscriptionInfo info = client.subscribeToCartridge(cartridgeType, cartridgeAlias, policy, repoUrl, "private".equals(repoType), repoUserName, repoPassword,
+ otherCartridgeType, otherAlias);
+ String message = "";
+ if (info != null && info.getHostname() != null) {
+ message = "Successfully subscribed. Please map the host name " + info.getHostname() + " to ELB IP";
+ } else {
+ message = "Successfully subscribed.";
+ }
+ //CarbonUIMessage.sendCarbonUIMessage(message, CarbonUIMessage.INFO, request);
+%>
+<span id="responseMsg"><%=message%></span>
+<%
+ } catch (Exception e) {
+ response.setStatus(500);
+%>
+<span id="responseMsg"><%=e.getMessage()%></span>
+<%
+ //CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request);
+ }
+%>
+
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribed_cartridges.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribed_cartridges.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribed_cartridges.jsp
new file mode 100644
index 0000000..f58d48a
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribed_cartridges.jsp
@@ -0,0 +1,176 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
+<%@ page import="org.wso2.carbon.CarbonConstants"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
+<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
+<%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient"%>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.CartridgeWrapper"%>
+<%@ page import="java.text.SimpleDateFormat"%>
+<%@ page import="java.util.ResourceBundle"%>
+<%@ page import="java.util.ArrayList"%>
+
+<jsp:include page="../dialog/display_messages.jsp" />
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+
+ String pageNumber = request.getParameter("pageNumber");
+ if (pageNumber == null) {
+ pageNumber = "0";
+ }
+ int pageNumberInt = 0;
+ try {
+ pageNumberInt = Integer.parseInt(pageNumber);
+ } catch (NumberFormatException ignored) {
+ }
+
+ String cartridgeSearchString = request.getParameter("cartridgeSearchString");
+ if (cartridgeSearchString == null) {
+ cartridgeSearchString = "";
+ }
+
+ // Fix issue when subscribed_cartridges_ajaxprocessor.jsp page return errors continuously
+ String reloadCount = request.getParameter("reload");
+ if (reloadCount == null) {
+ reloadCount = "0";
+ }
+ int reloadCountInt = 0;
+ try {
+ reloadCountInt = Integer.parseInt(reloadCount);
+ } catch (NumberFormatException ignored) {
+ }
+
+ if (new Boolean(request.getParameter("loginStatus"))) {
+ // This is a login request
+ // Initialize the reload count to zero
+ reloadCountInt = 0;
+ }
+%>
+
+<fmt:bundle basename="org.apache.stratos.cartridge.mgt.ui.i18n.Resources">
+ <carbon:breadcrumb label="cartrigdes.subscribed.header" resourceBundle="org.apache.stratos.cartridge.mgt.ui.i18n.Resources"
+ topPage="false" request="<%=request%>" />
+
+ <script type="text/javascript">
+ function searchCartridges() {
+ document.searchForm.submit();
+ }
+ function showCartridgeInfo(popupID, alias) {
+ CARBON.showPopupDialog(jQuery('#' + popupID).html(), "Cartridge Information for " + alias, 350, null, null, 400);
+ }
+ function unsubscribeCartridge(alias) {
+ if (alias) {
+ CARBON.showConfirmationDialog("<fmt:message key="cartridge.unsubscribe.prompt"></fmt:message>",
+ function() {
+ //location.href = './call_unsubscribe.jsp?cartridge_alias=' + alias;
+ postToBEService('unsubscribe_ajaxprocessor.jsp', 'cartridge_alias=' + alias, 'subscribed_cartridges.jsp');
+ }
+ );
+ }
+ }
+
+ function syncRepo(alias) {
+ if (alias) {
+ postToBEService('sync_repo_ajaxprocessor.jsp', 'cartridge_alias=' + alias);
+ }
+ }
+
+ function removeDomain(alias) {
+ if (alias) {
+ postToBEService('remove_domain_ajaxprocessor.jsp', 'cartridge_alias=' + alias, 'subscribed_cartridges.jsp');
+ }
+ }
+ </script>
+
+ <div id="middle">
+ <h2>
+ <fmt:message key="cartrigdes.subscribed.header" />
+ </h2>
+
+ <div id="workArea">
+ <form action="subscribed_cartridges.jsp" name="searchForm">
+ <table class="styledLeft">
+ <tr>
+ <td>
+ <table style="border: 0;">
+ <tbody>
+ <tr style="border: 0;">
+ <td style="border: 0;"><fmt:message key="search.cartrigdes" /> <input type="text"
+ name="cartridgeSearchString" value="<%=cartridgeSearchString != null ? cartridgeSearchString : ""%>" />
+ </td>
+ <td style="border: 0;"><a class="icon-link" href="#" style="background-image: url(images/search.gif);"
+ onclick="searchCartridges(); return false;" alt="<fmt:message key="search"/>"> </a></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </form>
+
+ <p> </p>
+ <div id="cartridges"></div>
+ </div>
+ </div>
+ <script type="text/javascript">
+ var refresh;
+ jQuery(document).ready(function() {
+ var refreshTable = function(){
+ jQuery.ajax({
+ url:'subscribed_cartridges_ajaxprocessor.jsp?pageNumber=<%=pageNumber%>&cartridgeSearchString=<%=cartridgeSearchString%>',
+ success:function(data){
+ jQuery('#cartridges').html(data);
+ },
+ error:function(jqXHR, textStatus, errorThrown) {
+ reloadPage();
+ }
+ })
+ }
+ // Call this initially
+ refreshTable();
+ refresh = setInterval(refreshTable, 15000);
+ });
+
+ function stopRefreshTable() {
+ if (refresh) {
+ clearInterval(refresh);
+ }
+ }
+
+ function reloadPage() {
+ stopRefreshTable();
+ <%
+ if (reloadCountInt <= 1) {
+ %>
+ // Reload page. If the session is not there, the page should redirect to login page.
+ location.href = 'subscribed_cartridges.jsp?reload=<%=++reloadCountInt%>';
+ <%
+ }
+ %>
+ }
+ </script>
+ <script type="text/javascript" src="js/jquery.blockUI-1.33.js"></script>
+ <script type="text/javascript" src="js/common.js"></script>
+</fmt:bundle>
[06/11] Refactoring org.wso2.carbon.cartridge.mgt.ui to
org.apache.stratos.cartridge.mgt.ui
Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribed_cartridges_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribed_cartridges_ajaxprocessor.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribed_cartridges_ajaxprocessor.jsp
new file mode 100644
index 0000000..ac5702e
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/subscribed_cartridges_ajaxprocessor.jsp
@@ -0,0 +1,281 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
+<%@ page import="org.wso2.carbon.CarbonConstants"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
+<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
+<%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient"%>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.CartridgeWrapper"%>
+<%@ page import="java.text.SimpleDateFormat"%>
+<%@ page import="java.util.ResourceBundle"%>
+<%@ page import="java.util.ArrayList"%>
+
+<jsp:include page="../dialog/display_messages.jsp" />
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext =
+ (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ CartridgeAdminClient client;
+ Cartridge[] cartridges = null;
+
+ int numberOfPages = 0;
+ String pageNumber = request.getParameter("pageNumber");
+ if (pageNumber == null) {
+ pageNumber = "0";
+ }
+ int pageNumberInt = 0;
+ try {
+ pageNumberInt = Integer.parseInt(pageNumber);
+ } catch (NumberFormatException ignored) {
+ }
+
+ String cartridgeSearchString = request.getParameter("cartridgeSearchString");
+ if (cartridgeSearchString == null) {
+ cartridgeSearchString = "";
+ }
+
+ try {
+ client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
+ CartridgeWrapper cartridgeWrapper = client.getPagedSubscribedCartridges(cartridgeSearchString, pageNumberInt);
+ if (cartridgeWrapper != null) {
+ numberOfPages = cartridgeWrapper.getNumberOfPages();
+ cartridges = cartridgeWrapper.getCartridges();
+ }
+ } catch (Exception e) {
+ response.setStatus(500);
+ CarbonUIMessage uiMsg = new CarbonUIMessage(CarbonUIMessage.ERROR, e.getMessage(), e);
+ session.setAttribute(CarbonUIMessage.ID, uiMsg);
+%>
+<jsp:include page="../admin/error.jsp" />
+<%
+ return;
+ }
+%>
+
+<fmt:bundle basename="org.apache.stratos.cartridge.mgt.ui.i18n.Resources">
+ <div>
+ <%
+ if (cartridges != null) {
+ String parameters = "cartridgeSearchString=" + cartridgeSearchString;
+ %>
+
+ <carbon:paginator pageNumber="<%=pageNumberInt%>" numberOfPages="<%=numberOfPages%>" page="subscribed_cartridges.jsp"
+ pageNumberParameterName="pageNumber" resourceBundle="org.apache.stratos.cartridge.mgt.ui.i18n.Resources" prevKey="prev"
+ nextKey="next" parameters="<%=parameters%>" />
+ <p> </p>
+
+ <form id="frmSubC" name="cartridgesForm" method="post">
+ <input type="hidden" name="pageNumber" value="<%=pageNumber%>" />
+ <table id="cartridgesTable" class="styledLeft" style="width: 100%">
+ <thead>
+ <tr>
+ <th style="width: 10%"><fmt:message key="cartridge.display.name" /></th>
+ <th style="width: 70px"><fmt:message key="cartridge.version" /></th>
+ <th style="width: 125px"><fmt:message key="cartridge.tenancymodel" /></th>
+ <th style="width: 10%"><fmt:message key="alias" /></th>
+ <th style="width: 5%"><fmt:message key="status" /></th>
+ <th style="text-align: right; padding-right: 5px; width: 125px;"><fmt:message key="instance.count" /></th>
+ <th><fmt:message key="url" /></th>
+ <th style="width: 12%"><fmt:message key="repo.url" /></th>
+ <th style="width: 8%"><fmt:message key="action" /></th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <%
+ int id = 1; // To generate ID
+
+ for (Cartridge cartridge : cartridges) {
+
+ String popupID = "cartridge_popup_" + id;
+ String rowStyleClass = ((id & 1) == 0) ? "tableEvenRow" : "tableOddRow";
+
+ // Increment ID
+ id++;
+
+ String[] accessURLs = cartridge.getAccessURLs();
+ StringBuilder urlBuilder = new StringBuilder();
+ if (accessURLs != null) {
+ for (int i = 0; i < accessURLs.length; i++) {
+ String url = accessURLs[i];
+ if (url != null) {
+ if (i > 0) {
+ urlBuilder.append("<br />");
+ }
+ urlBuilder.append("<a href=\"").append(url).append("\" target=\"_blank\">").append(url).append("</a>");
+ }
+ }
+ }
+
+ String displayName = (cartridge.getDisplayName() != null ? cartridge.getDisplayName() : "");
+ String version = (cartridge.getVersion() != null ? cartridge.getVersion() : "");
+ String description = (cartridge.getDescription() != null ? cartridge.getDescription() : "");
+ String alias = (cartridge.getCartridgeAlias() != null ? cartridge.getCartridgeAlias() : "");
+ String status = (cartridge.getStatus() != null ? cartridge.getStatus() : "");
+ int activeInstances = cartridge.getActiveInstances();
+ String instances = cartridge.getMultiTenant() ? "N/A" : String.valueOf(activeInstances);
+ String accessURL = urlBuilder.toString();
+ String repoURL = (cartridge.getRepoURL() != null ? cartridge.getRepoURL() : "");
+ String ip = (cartridge.getIp() != null ? cartridge.getIp() : "");
+ String dbUsername = (cartridge.getDbUserName() != null ? cartridge.getDbUserName() : "");
+ String password = (cartridge.getPassword() != null ? cartridge.getPassword() : "");
+ String mappedDomain = (cartridge.getMappedDomain() != null ? cartridge.getMappedDomain() : "");
+ String policy = (cartridge.getPolicyDescription() != null ? cartridge.getPolicyDescription() : "");
+ String tenancyModel = cartridge.getMultiTenant() ? "Multi-Tenant" : "Single-Tenant";
+
+ if (repoURL.startsWith("http")) {
+ StringBuilder repoURLBuilder = new StringBuilder();
+ repoURL = repoURLBuilder.append("<a href=\"").append(repoURL).append("\" target=\"_blank\">").append(repoURL).append("</a>").toString();
+ }
+ %>
+
+ <tr class="<%=rowStyleClass%>">
+ <td><%=displayName%></td>
+ <td><%=version%></td>
+ <td><%=tenancyModel%></td>
+ <td><a onclick="showCartridgeInfo('<%=popupID%>', '<%=alias%>')" style="background-image:url(../admin/images/information.gif);" class="icon-link"><%=alias%></a></td>
+ <td><span <%if (!"ACTIVE".equalsIgnoreCase(status)) {%>
+ style="background-image: url(images/ajax-loading.gif); background-repeat: no-repeat; background-position: left center; padding-left: 22px;"
+ <%}%>><%=status%></span></td>
+ <td style="text-align: right;"><%=instances%></td>
+ <td><%=accessURL%></td>
+ <td><%=repoURL%></td>
+ <td><a onclick="unsubscribeCartridge('<%=alias%>');" style="background-image:url(images/unsubscribe.png);" class="icon-link">
+ <fmt:message key="unsubscribe"/></a>
+ <% if (mappedDomain.length() == 0) { %>
+ <a href="./map_domain.jsp?cartridge_alias=<%=alias%>&domain=<%=mappedDomain%>" class="icon-link">
+ <fmt:message key="mapdomain"/></a>
+ <% } %>
+ <% if (repoURL.length() > 0) { %>
+ <a onclick="syncRepo('<%=alias%>');" class="icon-link">
+ <fmt:message key="syncrepo"/></a>
+ <% } %>
+ <% if (mappedDomain.length() > 0) { %>
+ <a onclick="removeDomain('<%=alias%>');" class="icon-link">
+ <fmt:message key="removedomain"/></a>
+ <% } %>
+ <div id="<%=popupID%>" style="display: none">
+ <table class="popupTable" style="width: 100%">
+ <tbody>
+ <tr class="tableOddRow">
+ <td style="width: 40%"><fmt:message key="cartridge.display.name" /></td>
+ <td><%=displayName%></td>
+ </tr>
+ <tr class="tableEvenRow">
+ <td style="width: 40%"><fmt:message key="cartridge.version" /></td>
+ <td><%=version%></td>
+ </tr>
+ <tr class="tableOddRow">
+ <td style="width: 40%"><fmt:message key="cartridge.description" /></td>
+ <td><%=description%></td>
+ </tr>
+ <tr class="tableEvenRow">
+ <td style="width: 40%"><fmt:message key="cartridge.tenancymodel" /></td>
+ <td><%=tenancyModel%></td>
+ </tr>
+ <tr class="tableOddRow">
+ <td style="width: 40%"><fmt:message key="alias" /></td>
+ <td><%=alias%></td>
+ </tr>
+ <tr class="tableEvenRow">
+ <td style="width: 40%"><fmt:message key="status" /></td>
+ <td><%=status%></td>
+ </tr>
+ <tr class="tableOddRow">
+ <td style="width: 40%"><fmt:message key="instance.count" /></td>
+ <td><%=instances%></td>
+ </tr>
+ <tr class="tableEvenRow">
+ <td style="width: 40%"><fmt:message key="url" /></td>
+ <td><%=accessURL%></td>
+ </tr>
+ <%
+ // Assign style class according to row
+ int popupRowId = 0;
+ %>
+ <% if (policy.length() > 0) { %>
+ <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
+ <td style="width: 40%"><fmt:message key="policy" /></td>
+ <td><%=policy%></td>
+ </tr>
+ <% } %>
+ <% if (repoURL.length() > 0) { %>
+ <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
+ <td style="width: 40%"><fmt:message key="repo.url" /></td>
+ <td><%=repoURL%></td>
+ </tr>
+ <% } %>
+ <% if (ip.length() > 0) { %>
+ <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
+ <td style="width: 40%"><fmt:message key="ip" /></td>
+ <td><%=ip%></td>
+ </tr>
+ <% } %>
+ <% if (dbUsername.length() > 0) { %>
+ <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
+ <td style="width: 40%"><fmt:message key="username" /></td>
+ <td><%=dbUsername%></td>
+ </tr>
+ <% } %>
+ <% if (password.length() > 0) { %>
+ <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
+ <td style="width: 40%"><fmt:message key="password" /></td>
+ <td><%=password%></td>
+ </tr>
+ <% } %>
+ <% if (mappedDomain.length() > 0) { %>
+ <tr class="<%=(((++popupRowId & 1) == 0) ? "tableEvenRow" : "tableOddRow")%>">
+ <td style="width: 40%"><fmt:message key="mappeddomain" /></td>
+ <td><%=mappedDomain%></td>
+ </tr>
+ <% } %>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <%
+ }
+ %>
+ </tbody>
+ </table>
+ </form>
+ <p> </p>
+ <carbon:paginator pageNumber="<%=pageNumberInt%>" numberOfPages="<%=numberOfPages%>" page="subscribed_cartridges.jsp"
+ pageNumberParameterName="pageNumber" resourceBundle="org.apache.stratos.cartridge.mgt.ui.i18n.Resources" prevKey="prev"
+ nextKey="next" parameters="<%=parameters%>" />
+ <%
+ } else {
+ %>
+ <b><fmt:message key="no.cartridges.found" /></b>
+ <%
+ }
+ %>
+ </div>
+</fmt:bundle>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/sync_repo_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/sync_repo_ajaxprocessor.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/sync_repo_ajaxprocessor.jsp
new file mode 100644
index 0000000..4cb7fcc
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/sync_repo_ajaxprocessor.jsp
@@ -0,0 +1,62 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
+<%@ page import="org.wso2.carbon.CarbonConstants"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
+<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
+<%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient"%>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
+<%@ page import="java.text.SimpleDateFormat"%>
+<%@ page import="java.util.ResourceBundle"%>
+<jsp:include page="../dialog/display_messages.jsp" />
+
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+
+ ResourceBundle bundle = ResourceBundle.getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
+
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext = (ConfigurationContext) config.getServletContext().getAttribute(
+ CarbonConstants.CONFIGURATION_CONTEXT);
+
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ CartridgeAdminClient client;
+
+ String cartridgeAlias = request.getParameter("cartridge_alias");
+ try {
+ client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
+ client.synchronizeRepository(cartridgeAlias);
+ //CarbonUIMessage.sendCarbonUIMessage("Initiated repository synchronization", CarbonUIMessage.INFO, request);
+ String message = "Initiated repository synchronization";
+%>
+<span id="responseMsg"><%=message%></span>
+<%
+ } catch (Exception e) {
+ //CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request);
+ response.setStatus(500);
+%>
+<span id="responseMsg"><%=e.getMessage()%></span>
+<%
+ }
+%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/test_git_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/test_git_ajaxprocessor.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/test_git_ajaxprocessor.jsp
new file mode 100644
index 0000000..cb7d32f
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/test_git_ajaxprocessor.jsp
@@ -0,0 +1,73 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
+<%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.RepositoryInformation" %>
+<%@ page import="java.text.SimpleDateFormat" %>
+<%@ page import="java.util.ResourceBundle" %>
+<%@ page import="java.util.Map" %>
+<jsp:include page="../dialog/display_messages.jsp"/>
+
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+
+ ResourceBundle bundle = ResourceBundle
+ .getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
+
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext =
+ (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ CartridgeAdminClient client;
+ String repoUrl = "";
+ String repoUserName = "";
+ String repoPassword = "";
+ String repoType = null;
+
+ repoUrl = request.getParameter("repo_url");
+ repoUserName = request.getParameter("repo_username");
+ repoPassword = request.getParameter("repo_password");
+ repoType = request.getParameter("repoType");
+ try{
+ client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
+ RepositoryInformation repositoryInformation = client.testRepositoryConnection(repoUrl, repoUserName, repoPassword, "private".equals(repoType));
+ String message = "";
+ if (repositoryInformation != null) {
+ message = "Successfully connected to the repository: " + repositoryInformation.getRepoURL();
+ }
+%>
+<span id="responseMsg"><%=message%></span>
+<%
+ } catch (Exception e) {
+ response.setStatus(500);
+%>
+<span id="responseMsg"><%=e.getMessage()%></span>
+<%
+ }
+%>
+
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/unsubscribe_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/unsubscribe_ajaxprocessor.jsp b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/unsubscribe_ajaxprocessor.jsp
new file mode 100644
index 0000000..9112e12
--- /dev/null
+++ b/components/org.apache.stratos.cartridge.mgt.ui/src/main/resources/web/cartridge-mgt/unsubscribe_ajaxprocessor.jsp
@@ -0,0 +1,66 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ ~
+ -->
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
+ <%@ page import="org.apache.stratos.cartridge.mgt.ui.CartridgeAdminClient" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge" %>
+<%@ page import="java.text.SimpleDateFormat" %>
+<%@ page import="java.util.ResourceBundle" %>
+<jsp:include page="../dialog/display_messages.jsp"/>
+
+
+<%
+ response.setHeader("Cache-Control", "no-cache");
+
+ ResourceBundle bundle = ResourceBundle
+ .getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
+
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext =
+ (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ CartridgeAdminClient client;
+
+ String cartridgeAlias = request.getParameter("cartridge_alias");
+
+ try{
+ client= new CartridgeAdminClient(cookie, backendServerURL, configContext,request.getLocale());
+ client.unsubscribe(cartridgeAlias);
+ //CarbonUIMessage.sendCarbonUIMessage("Successfully unsubscribed " ,
+ // CarbonUIMessage.INFO, request);
+ String message = "Successfully unsubscribed";
+%>
+<span id="responseMsg"><%=message%></span>
+<%
+ }catch (Exception e) {
+ response.setStatus(500);
+ //CarbonUIMessage uiMsg = new CarbonUIMessage(CarbonUIMessage.ERROR, e.getMessage(), e);
+ //session.setAttribute(CarbonUIMessage.ID, uiMsg);
+%>
+<span id="responseMsg"><%=e.getMessage()%></span>
+<%
+ }
+%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/pom.xml b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/pom.xml
deleted file mode 100644
index 5e9d0e5..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/pom.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- ~ Copyright (c) 2009-2010, WSO2 Inc. (http://www.wso2.org) All Rights
- Reserved. ~ ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License. ~ You
- may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0
- ~ ~ Unless required by applicable law or agreed to in writing, software ~
- distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT
- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the
- License for the specific language governing permissions and ~ limitations
- under the License. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <parent>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>stratos-components</artifactId>
- <version>2.1.0</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.wso2.carbon.cartridge.mgt.ui</artifactId>
- <version>2.1.3</version>
- <packaging>bundle</packaging>
- <name>WSO2 Carbon - Cartridge Management UI</name>
- <description>Cartridge management UI bundle</description>
-
- <dependencies>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.ui</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.utils</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.adc.mgt.stub</artifactId>
- <version>4.1.3</version>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.adc.reponotification.service.stub</artifactId>
- <version>4.1.1</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.1</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-Name>${project.artifactId}</Bundle-Name>
- <Export-Package>
- !org.wso2.carbon.cartridge.mgt.ui.internal,
- org.wso2.carbon.cartridge.mgt.ui.*;version="2.1.3"
- </Export-Package>
- <Bundle-Activator>
- org.wso2.carbon.cartridge.mgt.ui.internal.CartridgeManagementUIActivator
- </Bundle-Activator>
- <Private-Package>org.wso2.carbon.cartridge.mgt.ui.internal</Private-Package>
- <Carbon-Component>UIBundle</Carbon-Component>
- <Import-Package>
- !org.wso2.carbon.cartridge.mgt.ui.*,
- org.wso2.carbon.adc.mgt.stub.*;version="1.0.0",
- *;resolution:=optional
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/CartridgeAdminClient.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/CartridgeAdminClient.java b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/CartridgeAdminClient.java
deleted file mode 100644
index 8d85694..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/CartridgeAdminClient.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wso2.carbon.cartridge.mgt.ui;
-
-import java.rmi.RemoteException;
-import java.text.MessageFormat;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.adc.mgt.dto.xsd.CartridgeWrapper;
-import org.wso2.carbon.adc.mgt.dto.xsd.PolicyDefinition;
-import org.wso2.carbon.adc.mgt.dto.xsd.RepositoryInformation;
-import org.wso2.carbon.adc.mgt.dto.xsd.SubscriptionInfo;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceADCExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceAlreadySubscribedExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceDomainMappingExistsExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceDuplicateCartridgeAliasExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceInvalidCartridgeAliasExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceInvalidRepositoryExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceNotSubscribedExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServicePolicyExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceRepositoryCredentialsRequiredExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceRepositoryRequiredExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceRepositoryTransportExceptionException;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceStub;
-import org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceUnregisteredCartridgeExceptionException;
-
-/**
- * Client which communicates with the Application Management service of ADC
- */
-public class CartridgeAdminClient {
- public static final String BUNDLE = "org.wso2.carbon.cartridge.mgt.ui.i18n.Resources";
- public static final int MILLISECONDS_PER_MINUTE = 60 * 1000;
- private static final Log log = LogFactory.getLog(CartridgeAdminClient.class);
- private ResourceBundle bundle;
- public ApplicationManagementServiceStub stub;
-
- public CartridgeAdminClient(String cookie, String backendServerURL, ConfigurationContext configCtx, Locale locale) throws AxisFault {
- if (log.isDebugEnabled()) {
- log.debug("Creating CartridgeAdminClient for " + backendServerURL);
- }
- if (cookie == null || cookie.trim().length() == 0) {
- if (log.isDebugEnabled()) {
- log.debug("Cookie not found. Cannot create CartridgeAdminClient for " + backendServerURL);
- }
- throw new RuntimeException("Session has expired");
- }
- String serviceURL = backendServerURL + "ApplicationManagementService";
- bundle = ResourceBundle.getBundle(BUNDLE, locale);
-
- stub = new ApplicationManagementServiceStub(configCtx, serviceURL);
- ServiceClient client = stub._getServiceClient();
- Options option = client.getOptions();
- option.setManageSession(true);
- option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
- option.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
- }
-
- public CartridgeWrapper getPagedAvailableCartridges(String cartridgeSearchString, int pageNumber, boolean multiTenant) {
- try {
- return stub.getPagedAvailableCartridges(cartridgeSearchString, pageNumber, multiTenant);
- } catch (ApplicationManagementServiceADCExceptionException e) {
- handleException("cannot.list.available.cartridges", e);
- } catch (RemoteException e) {
- handleException("remote.error", e);
- }
- return null;
- }
-
- public CartridgeWrapper getPagedSubscribedCartridges(String cartridgeSearchString, int pageNumber) {
- try {
- return stub.getPagedSubscribedCartridges(cartridgeSearchString, pageNumber);
- } catch (ApplicationManagementServiceADCExceptionException e) {
- handleException("cannot.list.subscribed.cartridges", e);
- } catch (RemoteException e) {
- handleException("remote.error", e);
- }
- return null;
- }
-
- public String addDomainMapping(String mappedDomain, String cartridgeAlias) {
- String host = null;
- try {
- host = stub.addDomainMapping(mappedDomain, cartridgeAlias);
- } catch (ApplicationManagementServiceADCExceptionException e) {
- handleException("cannot.mapdomain", e);
- } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
- handleException("notsubscribed.error", e, cartridgeAlias);
- } catch (RemoteException e) {
- handleException("remote.error", e);
- } catch (ApplicationManagementServiceDomainMappingExistsExceptionException e) {
- handleException("domainmapping.exists.error", e, mappedDomain, cartridgeAlias);
- }
-
- return host;
- }
-
- public void removeDomainMapping(String cartridgeAlias) {
- try {
- stub.removeDomainMapping(cartridgeAlias);
- } catch (RemoteException e) {
- handleException("remote.error", e);
- } catch (ApplicationManagementServiceADCExceptionException e) {
- handleException("cannot.removedomain", e);
- } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
- handleException("notsubscribed.error", e, cartridgeAlias);
- }
- }
-
- public void synchronizeRepository(String cartridgeAlias) {
- try {
- stub.synchronizeRepository(cartridgeAlias);
- } catch (RemoteException e) {
- handleException("remote.error", e);
- } catch (ApplicationManagementServiceADCExceptionException e) {
- handleException("cannot.syncrepo", e);
- } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
- handleException("notsubscribed.error", e, cartridgeAlias);
- }
- }
-
- public RepositoryInformation testRepositoryConnection(String repoURL, String repoUsername, String repoPassword, boolean privateRepo) {
- try {
- return stub.testRepositoryConnection(repoURL, repoUsername, repoPassword, privateRepo);
- } catch (RemoteException e) {
- handleException("remote.error", e);
- } catch (ApplicationManagementServiceADCExceptionException e) {
- handleException("cannot.testrepo", e);
- } catch (ApplicationManagementServiceRepositoryRequiredExceptionException e) {
- handleException("repository.required", e);
- } catch (ApplicationManagementServiceRepositoryTransportExceptionException e) {
- handleException("repository.transport.error", e, repoURL);
- } catch (ApplicationManagementServiceRepositoryCredentialsRequiredExceptionException e) {
- handleException("repository.credentials.required", e, repoURL);
- } catch (ApplicationManagementServiceInvalidRepositoryExceptionException e) {
- handleException("repository.invalid.error", e, repoURL);
- }
- return null;
- }
-
- public void unsubscribe(String alias) {
- try {
- stub.unsubscribe(alias);
- } catch (RemoteException e) {
- handleException("remote.error", e);
- } catch (ApplicationManagementServiceADCExceptionException e) {
- handleException("cannot.unsubscribe", e);
- } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
- handleException("notsubscribed.error", e, alias);
- }
- }
-
- public PolicyDefinition[] getPolicyDefinitions() {
- try {
- return stub.getPolicyDefinitions();
- } catch (RemoteException e) {
- handleException("remote.error", e);
- }
- return null;
- }
-
- public boolean isFeatureEnabled(String feature) {
- try {
- return stub.isFeatureEnabled(feature);
- } catch (RemoteException e) {
- handleException("remote.error", e);
- }
- return false;
- }
-
- public SubscriptionInfo subscribeToCartridge(String cartridgeType,
- String cartridgeAlias,
- String policy,
- String repositoryUrl,
- boolean privateRepo,
- String repoUserName,
- String repoPassword,
- String otherCartridgeType,
- String otherCartridgeAlias) {
-
- if (log.isInfoEnabled()) {
- log.info("Subscribing to a Cartridge: " + cartridgeType + ", Alias: " + cartridgeAlias);
- }
-
- if (otherCartridgeAlias != null && otherCartridgeAlias.trim().length() > 0) {
- // currently passing empty strings for repo user name and
- // passwords
- try {
- stub.subscribe(otherCartridgeType, otherCartridgeAlias, policy, null, false, "", "", null, null);
- } catch (RemoteException e) {
- handleException("remote.error", e);
- } catch (ApplicationManagementServiceADCExceptionException e) {
- handleException("cannot.subscribe", e);
- } catch (ApplicationManagementServiceRepositoryRequiredExceptionException e) {
- handleException("repository.required", e);
- } catch (ApplicationManagementServiceUnregisteredCartridgeExceptionException e) {
- handleException("cartridge.notregistered", e, otherCartridgeType);
- } catch (ApplicationManagementServiceInvalidCartridgeAliasExceptionException e) {
- handleException("cartridge.invalid.alias", e, otherCartridgeAlias);
- } catch (ApplicationManagementServiceAlreadySubscribedExceptionException e) {
- handleException("cartridge.already.subscribed", e, e.getFaultMessage().getAlreadySubscribedException()
- .getCartridgeType());
- } catch (ApplicationManagementServiceDuplicateCartridgeAliasExceptionException e) {
- handleException("cartridge.alias.duplicate", e, otherCartridgeAlias);
- } catch (ApplicationManagementServicePolicyExceptionException e) {
- handleException("policy.error", e);
- } catch (ApplicationManagementServiceRepositoryTransportExceptionException e) {
- handleException("repository.transport.error", e, repositoryUrl);
- } catch (ApplicationManagementServiceRepositoryCredentialsRequiredExceptionException e) {
- handleException("repository.credentials.required", e, repositoryUrl);
- } catch (ApplicationManagementServiceInvalidRepositoryExceptionException e) {
- handleException("repository.invalid.error", e, repositoryUrl);
- }
- }
-
- try {
- return stub.subscribe(cartridgeType, cartridgeAlias, policy, repositoryUrl, privateRepo, repoUserName,
- repoPassword, otherCartridgeType, otherCartridgeAlias);
- } catch (RemoteException e) {
- handleException("remote.error", e);
- } catch (ApplicationManagementServiceADCExceptionException e) {
- handleException("cannot.subscribe", e);
- } catch (ApplicationManagementServiceRepositoryRequiredExceptionException e) {
- handleException("repository.required", e);
- } catch (ApplicationManagementServiceUnregisteredCartridgeExceptionException e) {
- handleException("cartridge.notregistered", e, cartridgeType);
- } catch (ApplicationManagementServiceInvalidCartridgeAliasExceptionException e) {
- handleException("cartridge.invalid.alias", e, cartridgeAlias);
- } catch (ApplicationManagementServiceAlreadySubscribedExceptionException e) {
- handleException("cartridge.already.subscribed", e, e.getFaultMessage().getAlreadySubscribedException()
- .getCartridgeType());
- } catch (ApplicationManagementServiceDuplicateCartridgeAliasExceptionException e) {
- handleException("cartridge.alias.duplicate", e, cartridgeAlias);
- } catch (ApplicationManagementServicePolicyExceptionException e) {
- handleException("policy.error", e);
- } catch (ApplicationManagementServiceRepositoryTransportExceptionException e) {
- handleException("repository.transport.error", e, repositoryUrl);
- } catch (ApplicationManagementServiceRepositoryCredentialsRequiredExceptionException e) {
- handleException("repository.credentials.required", e, repositoryUrl);
- } catch (ApplicationManagementServiceInvalidRepositoryExceptionException e) {
- handleException("repository.invalid.error", e, repositoryUrl);
- }
- return null;
- }
-
- private void handleException(String msgKey, Exception e, Object... args) {
- String msg = bundle.getString(msgKey);
- if (args != null) {
- msg = MessageFormat.format(msg, args);
- }
- log.error(msg, e);
- throw new RuntimeException(msg, e);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/CartridgeConstans.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/CartridgeConstans.java b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/CartridgeConstans.java
deleted file mode 100644
index e69de29..0000000
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/Payload.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/Payload.java b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/Payload.java
deleted file mode 100644
index 2c4a7b5..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/Payload.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.wso2.carbon.cartridge.mgt.ui;
-
-public class Payload {
- private Repository repository;
-
- public Repository getRepository() {
- return repository;
- }
-
- public void setRepository(Repository repository) {
- this.repository = repository;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/RepoNotificationClient.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/RepoNotificationClient.java b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/RepoNotificationClient.java
deleted file mode 100644
index 756daa8..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/RepoNotificationClient.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.wso2.carbon.cartridge.mgt.ui;
-
-import java.rmi.RemoteException;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.adc.reponotification.stub.RepoNotificationServiceException;
-import org.wso2.carbon.adc.reponotification.stub.RepoNotificationServiceStub;
-
-public class RepoNotificationClient {
-
- private ResourceBundle bundle;
- public RepoNotificationServiceStub stub;
- public static final String BUNDLE = "org.wso2.carbon.cartridge.mgt.ui.i18n.Resources";
- private static final Log log = LogFactory.getLog(RepoNotificationClient.class);
-
- public RepoNotificationClient(String cookie, String backendServerURL,
- ConfigurationContext configCtx, Locale locale) throws AxisFault {
- String serviceURL = backendServerURL + "RepoNotificationService";
- bundle = ResourceBundle.getBundle(BUNDLE, locale);
-
- stub = new RepoNotificationServiceStub(configCtx, serviceURL);
- ServiceClient client = stub._getServiceClient();
- Options option = client.getOptions();
- option.setManageSession(true);
- option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
- option.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
- }
-
- public void synchronize(String repositoryURL) throws AxisFault {
- try {
- stub.synchronize(repositoryURL);
- } catch (RemoteException e) {
- handleException("cannot.unsubscribe", e);
- } catch (RepoNotificationServiceException e) {
- handleException("cannot.unsubscribe", e);
- }
- }
-
- private void handleException(String msgKey, Exception e) throws AxisFault {
- String msg = bundle.getString(msgKey);
- log.error(msg, e);
- throw new AxisFault(msg, e);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/RepoNotificationServlet.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/RepoNotificationServlet.java b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/RepoNotificationServlet.java
deleted file mode 100644
index 817d5ad..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/RepoNotificationServlet.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.wso2.carbon.cartridge.mgt.ui;
-
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.CarbonConstants;
-import org.wso2.carbon.ui.CarbonUIUtil;
-import org.wso2.carbon.utils.ServerConstants;
-
-import com.google.gson.Gson;
-
-public class RepoNotificationServlet extends HttpServlet {
-
- private static final long serialVersionUID = 4315990619456849911L;
- private static final Log log = LogFactory
- .getLog(RepoNotificationServlet.class);
-
- public RepoNotificationServlet() {
- }
-
- @Override
- public void doPost(HttpServletRequest request, HttpServletResponse response) {
- String payload = request.getParameter("payload");
- log.info(" repository payload received ");
-
- String repositoryURL;
-
- Gson gson = new Gson();
- Payload p = gson.fromJson(payload, Payload.class);
- repositoryURL = p.getRepository().getUrl();
- try {
- String backendServerURL = CarbonUIUtil.getServerURL(
- getServletContext(), request.getSession());
- ConfigurationContext configContext = (ConfigurationContext) getServletContext()
- .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
- String cookie = (String) request.getSession().getAttribute(
- ServerConstants.ADMIN_SERVICE_COOKIE);
- new RepoNotificationClient(cookie, backendServerURL, configContext,
- request.getLocale()).synchronize(repositoryURL);
- } catch (Exception e) {
- log.error("Exception is occurred in synchronize, Reason : "
- + e.getMessage());
- }
-
- }
-
- @Override
- protected void doGet(HttpServletRequest req, HttpServletResponse res) {
-
- this.doPost(req, res);
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/Repository.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/Repository.java b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/Repository.java
deleted file mode 100644
index dec2a74..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/Repository.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.wso2.carbon.cartridge.mgt.ui;
-
-public class Repository {
- private String url;
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/internal/CartridgeManagementUIActivator.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/internal/CartridgeManagementUIActivator.java b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/internal/CartridgeManagementUIActivator.java
deleted file mode 100644
index cbdb497..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/java/org/wso2/carbon/cartridge/mgt/ui/internal/CartridgeManagementUIActivator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2013, WSO2, Inc. http://wso2.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-package org.wso2.carbon.cartridge.mgt.ui.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.wso2.carbon.utils.CarbonUtils;
-
-/**
- * Activator for the Cartridge Management Bundle
- */
-public class CartridgeManagementUIActivator implements BundleActivator {
-
- private static final Log log = LogFactory.getLog(CartridgeManagementUIActivator.class);
-
- public void start(final BundleContext bundleContext) {
-
- if (!CarbonUtils.isRunningInStandaloneMode()) {
- // uninstall this component
- Thread th = new Thread() {
- public void run() {
- try {
- bundleContext.getBundle().uninstall();
- } catch (Throwable e) {
- log.warn("Error occurred while uninstalling cartridge-mgt UI bundle", e);
- }
- }
- };
- try {
- th.join();
- } catch (InterruptedException ignored) {
- }
- th.start();
- }
- }
-
- public void stop(BundleContext bundleContext) {
- // No implementation required for this method
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/META-INF/component.xml
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/META-INF/component.xml b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/META-INF/component.xml
deleted file mode 100644
index b9a87bd..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/META-INF/component.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<!-- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights
- Reserved. ~ ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except ~ in compliance
- with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0
- ~ ~ Unless required by applicable law or agreed to in writing, ~ software
- distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT
- WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the
- License for the ~ specific language governing permissions and limitations
- ~ under the License. -->
-<component xmlns="http://products.wso2.org/carbon">
- <menus>
- <menu>
- <id>available_cartridges_menu</id>
- <i18n-key>cartridge.available.services.menu</i18n-key>
- <i18n-bundle>org.wso2.carbon.cartridge.mgt.ui.i18n.Resources</i18n-bundle>
- <parent-menu>manage_menu</parent-menu>
- <link>#</link>
- <region>region1</region>
- <order>1</order>
- <icon>../cartridge-mgt/images/cartridge.png</icon>
- <style-class>home</style-class>
- <require-permission>/permission/admin/manage/cartridges</require-permission>
- <require-not-super-tenant>true</require-not-super-tenant>
- </menu>
- <menu>
- <id>available_multitenant_cartridges</id>
- <i18n-key>cartridges.available.multitenant</i18n-key>
- <i18n-bundle>org.wso2.carbon.cartridge.mgt.ui.i18n.Resources</i18n-bundle>
- <parent-menu>available_cartridges_menu</parent-menu>
- <link>../cartridge-mgt/available_cartridges.jsp</link>
- <region>region1</region>
- <order>2</order>
- <icon>../cartridge-mgt/images/list.gif</icon>
- <style-class>home</style-class>
- <require-permission>/permission/admin/manage/cartridges</require-permission>
- <require-not-super-tenant>true</require-not-super-tenant>
- </menu>
- <menu>
- <id>available_singletenant_cartridges</id>
- <i18n-key>cartridges.available.singletenant</i18n-key>
- <i18n-bundle>org.wso2.carbon.cartridge.mgt.ui.i18n.Resources</i18n-bundle>
- <parent-menu>available_cartridges_menu</parent-menu>
- <link>../cartridge-mgt/available_cartridges.jsp</link>
- <region>region1</region>
- <order>3</order>
- <icon>../cartridge-mgt/images/list.gif</icon>
- <style-class>home</style-class>
- <require-permission>/permission/admin/manage/cartridges</require-permission>
- <require-not-super-tenant>true</require-not-super-tenant>
- </menu>
- <menu>
- <id>subscribed_cartridges_menu</id>
- <i18n-key>cartridge.subscribed.services.menu</i18n-key>
- <i18n-bundle>org.wso2.carbon.cartridge.mgt.ui.i18n.Resources</i18n-bundle>
- <parent-menu>manage_menu</parent-menu>
- <link>#</link>
- <region>region1</region>
- <order>4</order>
- <icon>../cartridge-mgt/images/cartridge.png</icon>
- <style-class>home</style-class>
- <require-permission>/permission/admin/manage/cartridges</require-permission>
- <require-not-super-tenant>true</require-not-super-tenant>
- </menu>
- <menu>
- <id>subscribed_cartridges</id>
- <i18n-key>cartridges.subscribed.list</i18n-key>
- <i18n-bundle>org.wso2.carbon.cartridge.mgt.ui.i18n.Resources</i18n-bundle>
- <parent-menu>subscribed_cartridges_menu</parent-menu>
- <link>../cartridge-mgt/subscribed_cartridges.jsp</link>
- <region>region1</region>
- <order>5</order>
- <icon>../cartridge-mgt/images/list.gif</icon>
- <style-class>home</style-class>
- <require-permission>/permission/admin/manage/cartridges</require-permission>
- <require-not-super-tenant>true</require-not-super-tenant>
- </menu>
- </menus>
- <servlets>
- <servlet id="RepoNotificationServlet">
- <servlet-name>RepoNotificationServlet</servlet-name>
- <url-pattern>/repo_notification</url-pattern>
- <display-name>Repository Notification Servlet</display-name>
- <servlet-class>org.wso2.carbon.cartridge.mgt.ui.RepoNotificationServlet</servlet-class>
- </servlet>
- </servlets>
- <framework-configuration>
- <bypass>
- <authentication>
- <link>/repo_notification</link>
- </authentication>
- </bypass>
- </framework-configuration>
-</component>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/org/wso2/carbon/cartridge/mgt/ui/i18n/Resources.properties
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/org/wso2/carbon/cartridge/mgt/ui/i18n/Resources.properties b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/org/wso2/carbon/cartridge/mgt/ui/i18n/Resources.properties
deleted file mode 100644
index d8d8ed1..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/org/wso2/carbon/cartridge/mgt/ui/i18n/Resources.properties
+++ /dev/null
@@ -1,96 +0,0 @@
-list=List
-
-remote.error=Error connecting to back-end service.
-notsubscribed.error=You have not subscribed to {0}
-
-cartridge.information=Cartridge Information
-cartridge.connect.information=Connect Cartridge Information
-cartridge.available.services.menu=Available Cartridges
-cartridge.subscribed.services.menu=Subscribed Cartridges
-cartridges=Cartridges
-cartridges.available.multitenant=Multi-Tenant Cartridges
-cartridges.available.singletenant=Single-Tenant Cartridges
-cartridges.subscribed.list=List Cartridges
-cartrigdes.available.header=Available Cartridges
-cartrigdes.subscribed.header=Subscribed Cartridges
-cartridge.display.name=Cartridge Name
-cartridge.version=Version
-cartridge.description=Description
-cartridge.tenancymodel=Tenancy Model
-search.cartrigdes=Search Cartridges
-subscribe.new.cartridge=Subscribe to a New Cartridge
-subscribe.to=Subscribe to {0} Cartridge
-subscribed.cartridges=Subscribed cartridges
-no.subscribed.cartridges=There are no Subscribed cartridges
-no.cartridges.found=No Cartridges Found
-already.subscribed=Already Subscribed
-
-cartridge.notregistered=Cartridge {0} is not registered
-cartridge.invalid.alias=The provided cartridge alias is not valid. The alias can contain only lowercase characters and numbers.
-cartridge.already.subscribed=You have already subscribed for cartridge type {0}
-cartridge.alias.duplicate=Duplicate cartridge alias {0}
-
-policy.error=Could not load policy.
-
-ip=IP
-mapdomain.information=Map Domain Information
-mapdomain.to=Map Domain to Alias
-mapdomain=Map Domain
-removedomain=Remove Domain
-mappeddomain=Mapped Domain
-cannot.mapdomain=Map Domain failed
-cannot.removedomain=Mapped Domain removal failed
-domainmapping.exists.error=Provided domain mapping {0} already exists
-
-syncrepo=Synchronize
-cannot.syncrepo=Synchronization failed
-
-repository.information=Git Repository Information
-repository.required=An external repository required
-repository.credentials.required=Username and Password are required for the repository: {0}
-repository.transport.error=Error connecting to the repository: {0}
-repository.invalid.error=Invalid repository: {0}
-
-select.cartridge.file=Select the file to upload
-invalid.cartridge.file=Selected file is invalid
-cartridge.app=Cartridge Application
-upload.application=Upload Applications
-app.archiveapp=Upload new applications
-upload=Upload
-cancel=Cancel
-subscribe=Subscribe
-unsubscribe=Unsubscribe
-url=Access URL(s)
-repo.url=Repository URL
-upload.apps=Upload Apps
-policy=Policy
-
-type=Type
-status=Status
-instance.count=Running Instances
-alias=Alias
-action=Action
-search=Search
-
-username=Username
-password=Password
-
-next=next
-prev=prev
-
-appmgt.add.app.menu=Add
-appmgt.listservices.menu=List
-appmgt.services.menu=Cartridge Applications
-select.cartridge=Select a Cartridge
-no.selected.cartridge=Please select a cartridge
-cartridge=Cartridge
-
-successfully.subscribed=Successfully subscribed.
-
-cartridge.unsubscribe.prompt=Are you sure you want to unsubscribe?
-
-cannot.testrepo=An error occurred when testing repository connection.
-cannot.list.available.cartridges=An error occurred when getting available cartridges.
-cannot.list.subscribed.cartridges=An error occurred when getting subscribed cartridges.
-cannot.unsubscribe=Unsubscribe unsuccessful
-cannot.subscribe=Subscribe unsuccessful
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/available_cartridges.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/available_cartridges.jsp b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/available_cartridges.jsp
deleted file mode 100644
index ae7b24c..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/available_cartridges.jsp
+++ /dev/null
@@ -1,186 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
-<%@ page import="org.wso2.carbon.CarbonConstants"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
-<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
-<%@ page import="org.wso2.carbon.cartridge.mgt.ui.CartridgeAdminClient"%>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon"%>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.Cartridge"%>
-<%@ page import="org.wso2.carbon.adc.mgt.dto.xsd.CartridgeWrapper"%>
-<%@ page import="org.wso2.carbon.adc.mgt.stub.ApplicationManagementServiceADCExceptionException"%>
-<%@ page import="java.text.SimpleDateFormat"%>
-<%@ page import="java.util.ResourceBundle"%>
-<%@ page import="java.util.ArrayList"%>
-
-<jsp:include page="../dialog/display_messages.jsp" />
-
-<%
- response.setHeader("Cache-Control", "no-cache");
-
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext =
- (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
-
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- CartridgeAdminClient client;
- Cartridge[] cartridges = null;
-
- String item = request.getParameter("item");
- boolean multiTenant = "available_multitenant_cartridges".equals(item);
-
- int numberOfPages = 0;
- String pageNumber = request.getParameter("pageNumber");
- if (pageNumber == null) {
- pageNumber = "0";
- }
- int pageNumberInt = 0;
- try {
- pageNumberInt = Integer.parseInt(pageNumber);
- } catch (NumberFormatException ignored) {
- }
-
- String cartridgeSearchString = request.getParameter("cartridgeSearchString");
- if (cartridgeSearchString == null) {
- cartridgeSearchString = "";
- }
-
- try {
- client = new CartridgeAdminClient(cookie, backendServerURL, configContext, request.getLocale());
- CartridgeWrapper cartridgeWrapper = client.getPagedAvailableCartridges(cartridgeSearchString, pageNumberInt, multiTenant);
- if (cartridgeWrapper != null) {
- numberOfPages = cartridgeWrapper.getNumberOfPages();
- cartridges = cartridgeWrapper.getCartridges();
- }
- } catch (Exception e) {
- response.setStatus(500);
- CarbonUIMessage uiMsg = new CarbonUIMessage(CarbonUIMessage.ERROR, e.getMessage(), e);
- session.setAttribute(CarbonUIMessage.ID, uiMsg);
-%>
-<jsp:include page="../admin/error.jsp" />
-<%
- return;
- }
-
- ResourceBundle bundle = ResourceBundle.getBundle(CartridgeAdminClient.BUNDLE, request.getLocale());
-%>
-
-<fmt:bundle basename="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources">
- <carbon:breadcrumb label="cartrigdes.available.header" resourceBundle="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources"
- topPage="false" request="<%=request%>" />
-
- <script type="text/javascript">
- function searchCartridges() {
- document.searchForm.submit();
- }
- </script>
-
- <div id="middle">
- <h2>
- <fmt:message key="cartrigdes.available.header" />
- </h2>
-
- <div id="workArea">
- <form action="available_cartridges.jsp" name="searchForm">
- <table class="styledLeft">
- <tr>
- <td>
- <table style="border: 0;">
- <tbody>
- <tr style="border: 0;">
- <td style="border: 0;"><fmt:message key="search.cartrigdes" /> <input type="text"
- name="cartridgeSearchString" value="<%=cartridgeSearchString != null ? cartridgeSearchString : ""%>" />
- </td>
- <td style="border: 0;"><a class="icon-link" href="#" style="background-image: url(images/search.gif);"
- onclick="searchCartridges(); return false;" alt="<fmt:message key="search"/>"> </a></td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </table>
- <input type="hidden" name="item" value="<%=item%>" />
- </form>
-
- <p> </p>
- <%
- if (cartridges != null) {
- String parameters = "cartridgeSearchString=" + cartridgeSearchString + "&item=" + item;
- %>
-
- <carbon:paginator pageNumber="<%=pageNumberInt%>" numberOfPages="<%=numberOfPages%>" page="available_cartridges.jsp"
- pageNumberParameterName="pageNumber" resourceBundle="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources" prevKey="prev"
- nextKey="next" parameters="<%=parameters%>" />
- <p> </p>
-
- <form name="cartridgesForm" method="post">
- <input type="hidden" name="pageNumber" value="<%=pageNumber%>" />
- <table class="styledLeft" id="cartridgesTable" style="width: 100%">
- <thead>
- <tr>
- <th style="width: 15%"><fmt:message key="cartridge.display.name" /></th>
- <th style="width: 80px"><fmt:message key="cartridge.version" /></th>
- <th><fmt:message key="cartridge.description" /></th>
- <th style="width: 15%"><fmt:message key="action" /></th>
- </tr>
- </thead>
- <tbody>
-
- <%
- for (Cartridge cartridge : cartridges) {
- boolean subscribed = "SUBSCRIBED".equals(cartridge.getStatus());
- %>
-
- <tr>
- <td><%=(cartridge.getDisplayName() != null ? cartridge.getDisplayName() : "")%></td>
- <td><%=(cartridge.getVersion() != null ? cartridge.getVersion() : "")%></td>
- <td><%=(cartridge.getDescription() != null ? cartridge.getDescription() : "")%></td>
- <td>
- <% if (!subscribed) { %>
- <a href="./subscribe.jsp?cartridgeType=<%=cartridge.getCartridgeType()%>&cartridgeProvider=<%=cartridge.getProvider()%>&multiTenant=<%=cartridge.getMultiTenant()%>&item=<%=item%>"
- style="background-image: url(images/subscribe.gif);" class="icon-link"> <fmt:message key="subscribe" /></a>
- <% } else { %>
- <fmt:message key="already.subscribed" />
- <% } %>
- </td>
- </tr>
- <%
- }
- %>
- </tbody>
- </table>
- </form>
- <p> </p>
- <carbon:paginator pageNumber="<%=pageNumberInt%>" numberOfPages="<%=numberOfPages%>" page="available_cartridges.jsp"
- pageNumberParameterName="pageNumber" resourceBundle="org.wso2.carbon.cartridge.mgt.ui.i18n.Resources" prevKey="prev"
- nextKey="next" parameters="<%=parameters%>" />
- <%
- } else {
- %>
- <b><fmt:message key="no.cartridges.found" /></b>
- <%
- }
- %>
- </div>
- </div>
- <script type="text/javascript">
- alternateTableRows('cartridgesTable', 'tableEvenRow', 'tableOddRow');
- </script>
-</fmt:bundle>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/docs/userguide.html
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/docs/userguide.html b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/docs/userguide.html
deleted file mode 100644
index 326738d..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/docs/userguide.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Cartridge Management - User Guide</title>
-<link href="../../admin/css/documentation.css" rel="stylesheet"
- type="text/css" media="all" />
-</head>
-
-<body>
-
-
- <h1>Cartridge Management</h1>
-
-
- <p>
- Please refer WSO2 Stratos 2.0 Wiki <a
- href="http://docs.wso2.org/wiki/display/Stratos200/GUI+User+Guide">GUI
- User Guide</a> for more information.
- </p>
-
-
-</body>
-
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/ajax-loading.gif
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/ajax-loading.gif b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/ajax-loading.gif
deleted file mode 100644
index 168d273..0000000
Binary files a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/ajax-loading.gif and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/cartridge.png
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/cartridge.png b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/cartridge.png
deleted file mode 100644
index 3cef1d5..0000000
Binary files a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/cartridge.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/list.gif
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/list.gif b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/list.gif
deleted file mode 100644
index 638d8ab..0000000
Binary files a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/list.gif and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/search.gif
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/search.gif b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/search.gif
deleted file mode 100644
index 86f81ed..0000000
Binary files a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/search.gif and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/subscribe.gif
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/subscribe.gif b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/subscribe.gif
deleted file mode 100644
index 3b0b695..0000000
Binary files a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/subscribe.gif and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/unsubscribe.png
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/unsubscribe.png b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/unsubscribe.png
deleted file mode 100644
index 0c71c3c..0000000
Binary files a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/images/unsubscribe.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f5c169db/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/js/common.js
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/js/common.js b/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/js/common.js
deleted file mode 100644
index 76910b2..0000000
--- a/components/stratos/org.wso2.carbon.cartridge.mgt.ui/2.1.3/src/main/resources/web/cartridge-mgt/js/common.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2013, WSO2, Inc. http://wso2.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-function setStratosFormSubmitFunction(form, validateFunction,
- ajaxprocessorPage, successPage, commandButton) {
- jQuery(form).submit(
- function(event) {
- if (validateFunction && typeof validateFunction == "function"
- && !validateFunction()) {
- return false;
- }
-
- postToBEService(ajaxprocessorPage, jQuery(form).serialize(), successPage, commandButton);
- return false;
- });
-}
-
-function postToBEService(ajaxprocessorPage, data, successPage, commandButton, validateFunction) {
- if (validateFunction && typeof validateFunction == "function"
- && !validateFunction()) {
- return;
- }
- showWait(commandButton);
- jQuery.post(ajaxprocessorPage, data).done(
- function(data, textStatus, jqXHR) {
- stopWait(commandButton);
- var msg = jQuery(jqXHR.responseText).filter('#responseMsg')
- .text();
- if (successPage) {
- CARBON.showInfoDialog(msg, function() {
- location.href = successPage;
- });
- } else {
- CARBON.showInfoDialog(msg);
- }
- }).fail(function(jqXHR, textStatus, errorThrown) {
- var msg = jQuery(jqXHR.responseText).filter('#responseMsg').text();
- if (msg && msg.length > 0) {
- CARBON.showErrorDialog(msg);
- } else {
- // Ignore
- // Refer SPI-310
- }
- }).complete(function() {
- stopWait(commandButton);
- });
-}
-
-function showWait(commandButton) {
- jQuery.blockUI('Please wait...');
- if (commandButton) {
- jQuery(commandButton).attr("disabled", "disabled");
- }
- //jQuery("body").css("cursor", "wait");
-}
-
-function stopWait(commandButton) {
- jQuery.unblockUI();
- if (commandButton) {
- jQuery(commandButton).removeAttr("disabled");
- }
- //jQuery("body").css("cursor", "auto");
-}
\ No newline at end of file