blob: 943e8950f2e86f39d609b28ce48e8c3fc034305d [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.jsp.core.internal.contentmodel;
import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocType;
/**
* CMDocument factory for TAG documents
* plugin).
*/
public final class TAGCMDocumentFactory {
private TAGCMDocumentFactory() {
super();
}
public static CMDocument getCMDocument() {
return getCMDocument(CMDocType.TAG21_DOC_TYPE);
}
/**
* @return org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
* @param cmtype
* java.lang.String
*/
public static CMDocument getCMDocument(String cmtype) {
if (cmtype == null)
return getCMDocument();
return HTMLCMDocumentFactory.getCMDocument(cmtype);
}
public static CMDocument getCMDocument(float jspVersion) {
if (jspVersion >= 2.1f)
return getCMDocument(CMDocType.TAG21_DOC_TYPE);
else
return getCMDocument(CMDocType.TAG20_DOC_TYPE);
}
}