Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavid_williams2005-03-18 07:20:23 +0000
committerdavid_williams2005-03-18 07:20:23 +0000
commit95990efbc5478ec6123ecd9ca473aa34489b1678 (patch)
treeca162ccb820e56fe7b8ecdaf602e2bea61d77940
parent75dccf31a38c8e39dff45e9eaa953bcb926882c2 (diff)
downloadwebtools.sourceediting-95990efbc5478ec6123ecd9ca473aa34489b1678.tar.gz
webtools.sourceediting-95990efbc5478ec6123ecd9ca473aa34489b1678.tar.xz
webtools.sourceediting-95990efbc5478ec6123ecd9ca473aa34489b1678.zip
[88424] ContentModel moved to Internal and SSE Core
-rw-r--r--bundles/org.eclipse.jst.jsp.core/plugin.xml3
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDAttributeDeclaration.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDDocument.java2
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDElementDeclaration.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDFunction.java2
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMContentWrapperImpl.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMDocumentWrapperImpl.java12
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMElementDeclarationWrapperImpl.java14
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMGroupWrapperImpl.java14
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMNodeWrapperImpl.java2
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDataTypeImpl.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java14
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java12
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNamedNodeMapImpl.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNodeListImpl.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java2
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TaglibTracker.java2
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java8
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryAdapterImpl.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryAssociationProvider.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryCMProvider.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryImpl.java14
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/ModelQueryAdapterFactoryForJSP.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/plugin.xml1
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java10
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URIHyperlinkDetector.java2
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java10
-rw-r--r--bundles/org.eclipse.wst.css.ui/plugin.xml1
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForHTMLTag.java8
-rw-r--r--bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentEncodingHelper.java2
-rw-r--r--bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java4
-rw-r--r--bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java2
-rw-r--r--bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java36
-rw-r--r--bundles/org.eclipse.wst.dtd.core/plugin.xml3
-rw-r--r--bundles/org.eclipse.wst.html.core/plugin.xml3
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCMProperties.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/commentelement/handlers/CommentElementHandlerForSSI.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/AttributeCollection.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMContentImpl.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMGroupImpl.java12
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamedNodeMapImpl.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamespaceImpl.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeImpl.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeListImpl.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ComplexTypeDefinition.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdAddress.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdColumnGroup.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdDl.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdEmbed.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFieldset.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFlowContainer.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFrameset.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHead.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHtml.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdInlineContainer.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdLiContainer.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdMap.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdNoframesContent.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdOptionContainer.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdParamContainer.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdSelect.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTable.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTableCellContainer.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTrContainer.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/DeclCollection.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ElementCollection.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/EntityCollection.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HCMDocImpl.java12
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttrDeclImpl.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttributeDeclaration.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataType.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataTypeImpl.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocument.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocumentFactory.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMNode.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElemDeclImpl.java24
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElementDeclaration.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclaration.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLPropertyDeclaration.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedA.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedADDRESS.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBASEFONT.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBDO.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBGSOUND.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBLOCKQUOTE.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBODY.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBUTTON.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCENTER.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOL.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOLGROUP.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDIV.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDL.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEMBED.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEmpty.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFIELDSET.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFONT.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFORM.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFRAMESET.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFontStyle.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHR.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHeading.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIFRAME.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIMG.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedINPUT.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedISINDEX.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLABEL.java12
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLI.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLINK.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMAP.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMARQUEE.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMENU.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMETA.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOFRAMES.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOSCRIPT.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOBJECT.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOL.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOPTGROUP.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedP.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPARAM.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPRE.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPcdata.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSCRIPT.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSELECT.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIPrintenv.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSTYLE.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedScripts.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTABLE.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTEXTAREA.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTITLE.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedUL.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JCMDocImpl.java14
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPCMDocument.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPElementCollection.java16
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/PropertyProviderFactory.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/AttributeCollection.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CHCMDocImpl.java16
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMContentImpl.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMGroupImpl.java12
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNamedNodeMapImpl.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeImpl.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeListImpl.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ComplexTypeDefinition.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdAddress.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdDl.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdFlowContainer.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHead.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHtml.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdInlineContainer.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdLiContainer.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdOptionContainer.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdSelect.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/DeclCollection.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ElementCollection.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/EntityCollection.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLAttrDeclImpl.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMDataTypeImpl.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMNode.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLElemDeclImpl.java24
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLEntityDeclImpl.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedA.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedADDRESS.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedBLOCKQUOTE.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedCENTER.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDIV.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDL.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedEmpty.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedFORM.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHR.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHeading.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedIMG.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedINPUT.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMENU.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMETA.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedOL.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedP.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPRE.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPcdata.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSELECT.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIPrintenv.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedTITLE.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedUL.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/PropertyProviderFactory.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ssi/SSICMDocumentFactory.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAdapterFactory.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMAttributeDeclarationBuddySystem.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMDocumentForBuddySystem.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMElementDeclarationBuddySystem.java14
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNamedNodeMapForBuddySystem.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNodeBuddySystem.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ElementDeclarationAdapter.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HMQUtil.java12
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLElementDeclarationAdapter.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryAssociationProvider.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java10
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/XHTMLAssociationProvider.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/preferences/HTMLContentBuilder.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java16
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java8
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java2
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java2
-rw-r--r--bundles/org.eclipse.wst.html.ui/plugin.xml1
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java6
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java4
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java2
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/URIHyperlinkDetector.java2
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java10
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLNodeActionManager.java4
-rw-r--r--bundles/org.eclipse.wst.sse.core/.classpath1
-rw-r--r--bundles/org.eclipse.wst.sse.core/plugin.xml21
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMAnyElement.java24
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMAttributeDeclaration.java52
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMContent.java32
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDataType.java78
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDocument.java38
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDocumentation.java22
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMElementDeclaration.java68
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMEntityDeclaration.java30
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMGroup.java39
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNamedNodeMap.java41
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNamespace.java30
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNode.java61
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNodeList.java31
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/ContentModelManager.java81
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/annotation/Annotation.java53
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/annotation/AnnotationMap.java116
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMAnyElementImpl.java51
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMAttributeDeclarationImpl.java123
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMContentImpl.java46
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMDataTypeImpl.java73
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMDocumentImpl.java88
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMElementDeclarationImpl.java121
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMEntityDeclarationImpl.java47
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMGroupImpl.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNamedNodeMapImpl.java91
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNodeImpl.java46
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNodeListImpl.java77
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactory.java22
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryDescriptor.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryRegistry.java67
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryRegistryReader.java76
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileParser.java218
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileRegistry.java58
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileRegistryReader.java91
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationUtility.java48
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/ResourceBundleHelper.java57
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/modelqueryimpl/InferredGrammarFactory.java156
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/modelqueryimpl/ModelQueryExtensionManagerImpl.java79
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/CMPrinter.java329
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/CMUtility.java151
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/Test.java109
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/CMDataTypeValueHelper.java161
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/CMValidator.java1042
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/DOMValidator.java402
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/FTable.java68
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentManager.java122
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentManagerListener.java23
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentReference.java20
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentReferenceProvider.java27
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQuery.java195
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryAction.java36
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryAssociationProvider.java35
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryCMProvider.java30
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/DataTypeValueExtension.java24
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ElementContentFilterExtension.java24
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ModelQueryExtension.java22
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ModelQueryExtensionManager.java32
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/BaseAssociationProvider.java88
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentLoader.java214
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java321
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentReferenceImpl.java42
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/InferredGrammarBuildingCMDocumentLoader.java189
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/ModelQueryActionHelper.java570
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/ModelQueryImpl.java848
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/SimpleAssociationProvider.java49
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/XMLAssociationProvider.java402
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDescriptionBuilder.java138
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDocumentCache.java203
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDocumentCacheListener.java33
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMVisitor.java118
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/ContentBuilder.java171
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMContentBuilder.java53
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMContentBuilderImpl.java693
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMNamespaceHelper.java198
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMNamespaceInfoManager.java225
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMVisitor.java133
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMWriter.java411
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/InferredGrammarFactory.java30
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceAttributeVisitor.java94
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceInfo.java83
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceTable.java251
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/CMDocumentTracker.java2
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/CMNodeWrapper.java2
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/ContentModelAdapter.java4
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/NullContentModel.java8
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java2
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/ModelQueryAdapter.java4
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/ModelQueryAdapterImpl.java4
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/MovableModelQuery.java2
-rw-r--r--bundles/org.eclipse.wst.xml.core/plugin.xml1
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java8
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java6
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CMNodeUtil.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java8
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForEmbeddedXML.java2
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForXML.java6
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryUtil.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryAssociationProvider.java4
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryImpl.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/plugin.xml1
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/DOMPropertyDescriptorFactory.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java6
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeContentProvider.java10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreePropertyDescriptorFactory.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java6
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java20
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/DOMObserver.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/JobStatusLineHelper.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java18
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java14
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ReplacePrefixAction.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java26
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentModelGenerator.java10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationProvider.java14
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/ContextInfoModelUtil.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/NonValidatingModelQueryAction.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/SimpleCMElementDeclaration.java10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentModelGenerator.java6
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesDialog.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/openon/DefaultOpenOnXML.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepAdapterForXML.java18
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForXML.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java14
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/XMLTagInfoHoverProcessor.java12
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapter.java12
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapterFactory.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/XMLNodeActionManager.java2
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySourceAdapter.java10
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/plugin.xml3
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDDataTypeValueExtension.java6
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java4
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java2
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/XSDEditNamespacesAction.java4
378 files changed, 11788 insertions, 851 deletions
diff --git a/bundles/org.eclipse.jst.jsp.core/plugin.xml b/bundles/org.eclipse.jst.jsp.core/plugin.xml
index a738ae101b..91ff16efd0 100644
--- a/bundles/org.eclipse.jst.jsp.core/plugin.xml
+++ b/bundles/org.eclipse.jst.jsp.core/plugin.xml
@@ -22,7 +22,6 @@
<import plugin="org.eclipse.wst.sse.core"/>
<import plugin="org.eclipse.wst.xml.uriresolver"/>
<import plugin="org.eclipse.jdt.core"/>
- <import plugin="org.eclipse.wst.common.contentmodel"/>
<import plugin="org.eclipse.text"/>
<import plugin="org.eclipse.wst.common.uriresolver"/>
</requires>
@@ -37,7 +36,7 @@
</modelHandler>
</extension>
<extension
- point="org.eclipse.wst.common.contentmodel.documentFactories">
+ point="org.eclipse.wst.sse.core.documentFactories">
<factory
type="tld"
class="org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentFactoryTLD">
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDAttributeDeclaration.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDAttributeDeclaration.java
index 335b1608b8..8fbe772ca3 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDAttributeDeclaration.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDAttributeDeclaration.java
@@ -12,8 +12,8 @@ package org.eclipse.jst.jsp.core.contentmodel.tld;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
/**
* Represents an attribute definition from a TLD
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDDocument.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDDocument.java
index 04b72890fb..938c4feed4 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDDocument.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDDocument.java
@@ -12,7 +12,7 @@ package org.eclipse.jst.jsp.core.contentmodel.tld;
import java.util.List;
-import org.eclipse.wst.common.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
public interface TLDDocument extends CMDocument {
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDElementDeclaration.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDElementDeclaration.java
index 8ca165e20d..a37f9c015d 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDElementDeclaration.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDElementDeclaration.java
@@ -12,8 +12,8 @@ package org.eclipse.jst.jsp.core.contentmodel.tld;
import java.util.List;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
public interface TLDElementDeclaration extends CMElementDeclaration {
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDFunction.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDFunction.java
index 917efa763f..df6906d6f5 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDFunction.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/contentmodel/tld/TLDFunction.java
@@ -12,7 +12,7 @@ package org.eclipse.jst.jsp.core.contentmodel.tld;
import java.util.List;
-import org.eclipse.wst.common.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
public interface TLDFunction {
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMContentWrapperImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMContentWrapperImpl.java
index 176e67f3e3..232ad6cfe1 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMContentWrapperImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMContentWrapperImpl.java
@@ -12,8 +12,8 @@ package org.eclipse.jst.jsp.core.internal.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
public class CMContentWrapperImpl extends CMNodeWrapperImpl implements CMContent {
@@ -22,9 +22,9 @@ public class CMContentWrapperImpl extends CMNodeWrapperImpl implements CMContent
/**
* CMContentWrapper constructor comment.
* @param prefix java.lang.String
- * @param node org.eclipse.wst.common.contentmodel.CMNode
+ * @param node org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
- public CMContentWrapperImpl(String prefix, org.eclipse.wst.common.contentmodel.CMContent node) {
+ public CMContentWrapperImpl(String prefix, org.eclipse.wst.sse.core.internal.contentmodel.CMContent node) {
super(prefix, node);
fCMContent = node;
}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMDocumentWrapperImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMDocumentWrapperImpl.java
index 111770d5b8..aa8dc143e9 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMDocumentWrapperImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMDocumentWrapperImpl.java
@@ -15,12 +15,12 @@ package org.eclipse.jst.jsp.core.internal.contentmodel;
import java.util.Hashtable;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNamespace;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.sse.core.contentmodel.CMNodeWrapper;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
public class CMDocumentWrapperImpl implements CMDocument, CMNodeWrapper {
@@ -107,7 +107,7 @@ public class CMDocumentWrapperImpl implements CMDocument, CMNodeWrapper {
/**
*
- * @return org.eclipse.wst.common.contentmodel.CMDocument
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
*/
public CMDocument getDocument() {
return fDocument;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMElementDeclarationWrapperImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMElementDeclarationWrapperImpl.java
index 660eb8fb33..8376d7a1c5 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMElementDeclarationWrapperImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMElementDeclarationWrapperImpl.java
@@ -12,12 +12,12 @@ package org.eclipse.jst.jsp.core.internal.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
public class CMElementDeclarationWrapperImpl extends CMNodeWrapperImpl implements CMElementDeclaration {
private CMContent fCMContent = null;
@@ -27,7 +27,7 @@ public class CMElementDeclarationWrapperImpl extends CMNodeWrapperImpl implement
/**
* CMElementDeclarationWrapper constructor comment.
* @param prefix java.lang.String
- * @param node org.eclipse.wst.common.contentmodel.CMNode
+ * @param node org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
public CMElementDeclarationWrapperImpl(String prefix, CMElementDeclaration node) {
super(prefix, node);
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMGroupWrapperImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMGroupWrapperImpl.java
index d931e68452..f53d3f32d0 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMGroupWrapperImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMGroupWrapperImpl.java
@@ -13,10 +13,10 @@ package org.eclipse.jst.jsp.core.internal.contentmodel;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
public class CMGroupWrapperImpl extends CMContentWrapperImpl implements CMGroup {
class CMNodeListImpl implements CMNodeList {
@@ -31,8 +31,8 @@ public class CMGroupWrapperImpl extends CMContentWrapperImpl implements CMGroup
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMNode
- * @param node org.eclipse.wst.common.contentmodel.CMNode
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNode
+ * @param node org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
public void appendItem(CMNode node) {
nodes.add(node);
@@ -64,7 +64,7 @@ public class CMGroupWrapperImpl extends CMContentWrapperImpl implements CMGroup
/**
* CMGroupWrapper constructor comment.
* @param prefix java.lang.String
- * @param node org.eclipse.wst.common.contentmodel.CMContent
+ * @param node org.eclipse.wst.sse.core.internal.contentmodel.CMContent
*/
public CMGroupWrapperImpl(String prefix, CMGroup node) {
super(prefix, node);
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMNodeWrapperImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMNodeWrapperImpl.java
index b2cf95396d..7b9a5c164c 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMNodeWrapperImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMNodeWrapperImpl.java
@@ -12,8 +12,8 @@ package org.eclipse.jst.jsp.core.internal.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.sse.core.contentmodel.CMNodeWrapper;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
public class CMNodeWrapperImpl implements CMNode, CMNodeWrapper {
private CMNode fNode = null;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java
index 637fcce3a1..bcc4b53358 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java
@@ -10,11 +10,11 @@
*******************************************************************************/
package org.eclipse.jst.jsp.core.internal.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNamespace;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.sse.core.contentmodel.CMDocType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
/**
* CMDocument factory for JSP documents.
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java
index adf9348f4a..8e9213e036 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java
@@ -16,9 +16,9 @@ import java.util.Enumeration;
import org.eclipse.jst.jsp.core.contentmodel.tld.TLDAttributeDeclaration;
import org.eclipse.jst.jsp.core.contentmodel.tld.TLDDocument;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
import org.eclipse.wst.sse.core.util.StringUtils;
public class CMAttributeDeclarationImpl implements TLDAttributeDeclaration {
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDataTypeImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDataTypeImpl.java
index 04cdb212ad..f88f870c00 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDataTypeImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDataTypeImpl.java
@@ -12,8 +12,8 @@ package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
public class CMDataTypeImpl implements CMDataType {
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java
index 274bab021e..03a7a1353c 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java
@@ -32,10 +32,10 @@ import org.eclipse.jst.jsp.core.internal.contentmodel.JarRecord;
import org.eclipse.jst.jsp.core.internal.contentmodel.TLDRecord;
import org.eclipse.jst.jsp.core.internal.contentmodel.URLRecord;
import org.eclipse.jst.jsp.core.internal.util.DocumentProvider;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.factory.CMDocumentFactory;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.factory.CMDocumentFactory;
import org.eclipse.wst.sse.core.util.JarUtilities;
import org.eclipse.wst.xml.uriresolver.util.URIHelper;
import org.w3c.dom.Element;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java
index de54c5e4eb..65da525e3e 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java
@@ -21,12 +21,12 @@ import java.util.Map;
import org.eclipse.jst.jsp.core.contentmodel.tld.TLDDocument;
import org.eclipse.jst.jsp.core.contentmodel.tld.TLDValidator;
import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNamespace;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMPlugin;
-import org.eclipse.wst.common.contentmodel.annotation.AnnotationMap;
-import org.eclipse.wst.common.contentmodel.internal.annotation.AnnotationFileParser;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.ContentModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.annotation.AnnotationMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.annotation.AnnotationFileParser;
import org.eclipse.wst.sse.core.util.StringUtils;
public class CMDocumentImpl implements TLDDocument {
@@ -107,7 +107,7 @@ public class CMDocumentImpl implements TLDDocument {
if (fAnnotationMap == null) {
fAnnotationMap = new AnnotationMap();
- List annotationFiles = CMPlugin.getInstance().getAnnotationFiles(getUri());
+ List annotationFiles = ContentModelManager.getInstance().getAnnotationFiles(getUri());
for (Iterator i = annotationFiles.iterator(); i.hasNext();) {
try {
String annotationFileURI = (String) i.next();
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java
index 4469319378..b32ba37b05 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java
@@ -19,12 +19,12 @@ import org.eclipse.jst.jsp.core.contentmodel.tld.JSP11TLDNames;
import org.eclipse.jst.jsp.core.contentmodel.tld.JSP12TLDNames;
import org.eclipse.jst.jsp.core.contentmodel.tld.TLDDocument;
import org.eclipse.jst.jsp.core.contentmodel.tld.TLDElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.annotation.AnnotationMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.annotation.AnnotationMap;
import org.eclipse.wst.sse.core.util.StringUtils;
public class CMElementDeclarationImpl implements TLDElementDeclaration {
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNamedNodeMapImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNamedNodeMapImpl.java
index ec0683d36e..296a2be95f 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNamedNodeMapImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNamedNodeMapImpl.java
@@ -15,8 +15,8 @@ package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
import java.util.Hashtable;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
public class CMNamedNodeMapImpl implements CMNamedNodeMap {
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNodeListImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNodeListImpl.java
index 93b352013e..efec3d345c 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNodeListImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNodeListImpl.java
@@ -17,8 +17,8 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
public class CMNodeListImpl implements CMNodeList {
static CMNodeListImpl EMPTY_NODE_LIST = new CMNodeListImpl(Collections.EMPTY_LIST);
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
index 2f01c6e3d0..a7628a4de4 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
@@ -48,9 +48,9 @@ import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibIndex;
import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
import org.eclipse.jst.jsp.core.model.parser.DOMJSPRegionContexts;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.common.uriresolver.URIResolverPlugin;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.sse.core.parser.BlockMarker;
import org.eclipse.wst.sse.core.parser.StructuredDocumentRegionHandler;
import org.eclipse.wst.sse.core.parser.StructuredDocumentRegionHandlerExtension;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java
index 9f420153a8..a0be443cf6 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java
@@ -14,7 +14,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.jst.jsp.core.contentmodel.tld.TLDFunction;
-import org.eclipse.wst.common.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
public class TLDFunctionImpl implements TLDFunction {
private String fClassName = null;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TaglibTracker.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TaglibTracker.java
index 8a9885f437..13814c974c 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TaglibTracker.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TaglibTracker.java
@@ -13,8 +13,8 @@ package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
import org.eclipse.jst.jsp.core.internal.contentmodel.CMDocumentWrapperImpl;
-import org.eclipse.wst.common.contentmodel.CMDocument;
import org.eclipse.wst.sse.core.contentmodel.CMDocumentTracker;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
/**
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
index e8ab8a6679..36e52e1a5b 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
@@ -35,12 +35,12 @@ import org.eclipse.jst.jsp.core.internal.Logger;
import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
import org.eclipse.jst.jsp.core.model.parser.DOMJSPRegionContexts;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.contentmodel.CMDocumentTracker;
import org.eclipse.wst.sse.core.contentmodel.CMNodeWrapper;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.parser.BlockMarker;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java
index e45fbe9aef..cd7f49b235 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java
@@ -22,8 +22,8 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.jst.jsp.core.internal.Logger;
import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
import org.eclipse.jst.jsp.core.model.parser.DOMJSPRegionContexts;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
import org.eclipse.wst.sse.core.parser.BlockMarker;
import org.eclipse.wst.sse.core.parser.StructuredDocumentRegionHandler;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryAdapterImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryAdapterImpl.java
index d6a669fc1f..b25252195c 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryAdapterImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryAdapterImpl.java
@@ -12,8 +12,8 @@ package org.eclipse.jst.jsp.core.modelquery;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapterImpl;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryAssociationProvider.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryAssociationProvider.java
index d91bc64513..5008f15a76 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryAssociationProvider.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryAssociationProvider.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.jst.jsp.core.modelquery;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.SimpleAssociationProvider;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.SimpleAssociationProvider;
/**
*/
@@ -18,7 +18,7 @@ public class JSPModelQueryAssociationProvider extends SimpleAssociationProvider
/**
* @param modelQueryCMProvider
- * org.eclipse.wst.common.contentmodel.modelquery.ModelQueryCMProvider
+ * org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryCMProvider
*/
public JSPModelQueryAssociationProvider() {
super(new JSPModelQueryCMProvider());
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryCMProvider.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryCMProvider.java
index 842c09b15b..65880d56cd 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryCMProvider.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryCMProvider.java
@@ -17,9 +17,9 @@ import java.util.List;
import org.eclipse.jst.jsp.core.internal.contentmodel.JSPCMDocumentFactory;
import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQueryCMProvider;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryCMProvider;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.w3c.dom.Node;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryImpl.java
index 2e92555ec0..a8dbf276ae 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryImpl.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/JSPModelQueryImpl.java
@@ -14,14 +14,14 @@ package org.eclipse.jst.jsp.core.modelquery;
import java.util.List;
import org.eclipse.jst.jsp.core.PageDirectiveAdapter;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.ModelQueryImpl;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.ModelQueryImpl;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapter;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.w3c.dom.Attr;
@@ -105,7 +105,7 @@ public class JSPModelQueryImpl extends ModelQueryImpl {
}
/* (non-Javadoc)
- * @see org.eclipse.wst.common.contentmodel.modelquery.ModelQuery#getCMAttributeDeclaration(org.w3c.dom.Attr)
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery#getCMAttributeDeclaration(org.w3c.dom.Attr)
*/
public CMAttributeDeclaration getCMAttributeDeclaration(Attr attr) {
CMAttributeDeclaration result = super.getCMAttributeDeclaration(attr);
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/ModelQueryAdapterFactoryForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/ModelQueryAdapterFactoryForJSP.java
index c72fe5fdc4..5abf924e22 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/ModelQueryAdapterFactoryForJSP.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/modelquery/ModelQueryAdapterFactoryForJSP.java
@@ -16,14 +16,14 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.AbstractAdapterFactory;
import org.eclipse.wst.sse.core.AdapterFactory;
import org.eclipse.wst.sse.core.IModelStateListener;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapter;
import org.eclipse.wst.sse.core.util.Debug;
import org.eclipse.wst.xml.core.document.XMLNode;
diff --git a/bundles/org.eclipse.jst.jsp.ui/plugin.xml b/bundles/org.eclipse.jst.jsp.ui/plugin.xml
index ca45d4bb70..f803a7a2fb 100644
--- a/bundles/org.eclipse.jst.jsp.ui/plugin.xml
+++ b/bundles/org.eclipse.jst.jsp.ui/plugin.xml
@@ -26,7 +26,6 @@
<import plugin="org.eclipse.wst.xml.core" />
<import plugin="org.eclipse.wst.xml.uriresolver" />
<import plugin="org.eclipse.wst.sse.core" />
- <import plugin="org.eclipse.wst.common.contentmodel" />
<import plugin="org.eclipse.jdt.ui" />
<import plugin="org.eclipse.jdt.core" />
<import plugin="org.eclipse.wst.javascript.common.ui" />
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java
index eb5b10b7e8..45f27179b3 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java
@@ -18,12 +18,12 @@ import org.eclipse.jst.jsp.core.JSP12Namespace;
import org.eclipse.jst.jsp.core.contentmodel.tld.TLDElementDeclaration;
import org.eclipse.jst.jsp.core.model.parser.DOMJSPRegionContexts;
import org.eclipse.ui.IEditorInput;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.contentmodel.CMNodeWrapper;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
index a711932943..89c586f3f4 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
@@ -43,11 +43,6 @@ import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImages;
import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
import org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeIdsJSP;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQueryAction;
import org.eclipse.wst.css.ui.contentassist.CSSContentAssistProcessor;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDocumentFactory;
@@ -64,6 +59,11 @@ import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.contentmodel.CMDocType;
import org.eclipse.wst.sse.core.contentmodel.CMDocumentTracker;
import org.eclipse.wst.sse.core.contentmodel.CMNodeWrapper;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryAction;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapter;
import org.eclipse.wst.sse.core.parser.BlockMarker;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java
index 2ae3cbea17..a1943611aa 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java
@@ -21,11 +21,11 @@ import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.ui.contentassist.IResourceDependentProcessor;
@@ -68,7 +68,7 @@ public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcess
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#addContent(java.util.List, org.eclipse.wst.common.contentmodel.CMContent)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#addContent(java.util.List, org.eclipse.wst.sse.core.internal.contentmodel.CMContent)
*/
protected void addContent(List contentList, CMContent content) {
super.addContent(contentList, content);
@@ -159,7 +159,7 @@ public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcess
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#attributeInList(com.ibm.sed.model.xml.XMLNode, org.w3c.dom.Node, org.eclipse.wst.common.contentmodel.CMNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#attributeInList(com.ibm.sed.model.xml.XMLNode, org.w3c.dom.Node, org.eclipse.wst.sse.core.internal.contentmodel.CMNode)
*/
protected boolean attributeInList(XMLNode node, Node parent, CMNode cmnode) {
return super.attributeInList(node, parent, cmnode);
@@ -264,7 +264,7 @@ public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcess
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#getAdditionalInfo(org.eclipse.wst.common.contentmodel.CMNode, org.eclipse.wst.common.contentmodel.CMNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#getAdditionalInfo(org.eclipse.wst.sse.core.internal.contentmodel.CMNode, org.eclipse.wst.sse.core.internal.contentmodel.CMNode)
*/
protected String getAdditionalInfo(CMNode parentOrOwner, CMNode cmnode) {
return super.getAdditionalInfo(parentOrOwner, cmnode);
@@ -362,28 +362,28 @@ public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcess
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#getPossibleDataTypeValues(org.w3c.dom.Node, org.eclipse.wst.common.contentmodel.CMAttributeDeclaration)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#getPossibleDataTypeValues(org.w3c.dom.Node, org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration)
*/
protected List getPossibleDataTypeValues(Node node, CMAttributeDeclaration ad) {
return super.getPossibleDataTypeValues(node, ad);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#getRequiredName(org.w3c.dom.Node, org.eclipse.wst.common.contentmodel.CMNode)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#getRequiredName(org.w3c.dom.Node, org.eclipse.wst.sse.core.internal.contentmodel.CMNode)
*/
protected String getRequiredName(Node parentOrOwner, CMNode cmnode) {
return super.getRequiredName(parentOrOwner, cmnode);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#getRequiredText(org.w3c.dom.Node, org.eclipse.wst.common.contentmodel.CMAttributeDeclaration)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#getRequiredText(org.w3c.dom.Node, org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration)
*/
protected String getRequiredText(Node parentOrOwner, CMAttributeDeclaration attrDecl) {
return super.getRequiredText(parentOrOwner, attrDecl);
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#getRequiredText(org.w3c.dom.Node, org.eclipse.wst.common.contentmodel.CMElementDeclaration)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#getRequiredText(org.w3c.dom.Node, org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration)
*/
protected String getRequiredText(Node parentOrOwner, CMElementDeclaration elementDecl) {
return super.getRequiredText(parentOrOwner, elementDecl);
@@ -432,7 +432,7 @@ public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcess
}
/**
- * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#mapToProperties(org.eclipse.wst.common.contentmodel.CMNamedNodeMap)
+ * @see com.ibm.sed.structured.contentassist.xml.AbstractContentAssistProcessor#mapToProperties(org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap)
*/
protected Properties mapToProperties(CMNamedNodeMap map) {
return super.mapToProperties(map);
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URIHyperlinkDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URIHyperlinkDetector.java
index 4f4ac76db9..f2f8a22ec9 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URIHyperlinkDetector.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URIHyperlinkDetector.java
@@ -1,10 +1,10 @@
package org.eclipse.jst.jsp.ui.internal.hyperlink;
import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.jst.jsp.ui.internal.Logger;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.sse.core.util.URIResolver;
import org.w3c.dom.Attr;
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java
index df705a0aec..d736d0df01 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java
@@ -18,15 +18,15 @@ import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.jface.text.hyperlink.URLHyperlink;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.common.uriresolver.URIResolverPlugin;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.xml.core.document.XMLAttr;
import org.eclipse.wst.xml.core.document.XMLNode;
diff --git a/bundles/org.eclipse.wst.css.ui/plugin.xml b/bundles/org.eclipse.wst.css.ui/plugin.xml
index 8ab6e0254c..a5724121e3 100644
--- a/bundles/org.eclipse.wst.css.ui/plugin.xml
+++ b/bundles/org.eclipse.wst.css.ui/plugin.xml
@@ -23,7 +23,6 @@
<import plugin="org.eclipse.wst.sse.ui"/>
<import plugin="org.eclipse.wst.css.core"/>
<import plugin="org.eclipse.wst.sse.core"/>
- <import plugin="org.eclipse.wst.common.contentmodel"/>
<import plugin="org.eclipse.wst.html.core"/>
<import plugin="org.eclipse.wst.xml.core"/>
<import plugin="org.eclipse.core.resources"/>
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForHTMLTag.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForHTMLTag.java
index 02f250123c..9a880907e8 100644
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForHTMLTag.java
+++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentassist/CSSProposalGeneratorForHTMLTag.java
@@ -16,15 +16,15 @@ import java.util.Iterator;
import java.util.List;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.css.core.document.ICSSModel;
import org.eclipse.wst.css.core.document.ICSSStyleRule;
import org.eclipse.wst.css.ui.image.CSSImageType;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.sse.core.contentmodel.CMDocType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.document.DocumentTypeAdapter;
import org.eclipse.wst.xml.core.document.XMLDocument;
import org.w3c.dom.Document;
diff --git a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentEncodingHelper.java b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentEncodingHelper.java
index dc873602cb..fabaffc770 100644
--- a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentEncodingHelper.java
+++ b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentEncodingHelper.java
@@ -13,7 +13,7 @@ package org.eclipse.wst.dtd.core.internal.contentmodel;
import java.io.InputStream;
import java.net.URL;
-import org.eclipse.wst.common.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.sse.core.internal.encoding.EncodingHelper;
public class CMDocumentEncodingHelper {
diff --git a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java
index fb08c0b3a8..a2846784fd 100644
--- a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java
+++ b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.wst.dtd.core.internal.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.factory.CMDocumentFactory;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.factory.CMDocumentFactory;
/**
* This builder handles building .dtd grammar files
diff --git a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java
index e05714db27..6c7735bcc3 100644
--- a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java
+++ b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java
@@ -11,7 +11,7 @@
package org.eclipse.wst.dtd.core.internal.contentmodel;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
public abstract class CMNodeImpl extends AdapterImpl implements CMNode {
protected static final String PROPERTY_DOCUMENTATION = "documentation";
diff --git a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java
index 94c9e1f9ec..e5d7f21dd5 100644
--- a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java
+++ b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java
@@ -22,24 +22,6 @@ import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMDocumentation;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMEntityDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNamespace;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
-import org.eclipse.wst.common.contentmodel.annotation.AnnotationMap;
-import org.eclipse.wst.common.contentmodel.basic.CMDataTypeImpl;
-import org.eclipse.wst.common.contentmodel.basic.CMEntityDeclarationImpl;
-import org.eclipse.wst.common.contentmodel.basic.CMNamedNodeMapImpl;
-import org.eclipse.wst.common.contentmodel.basic.CMNodeListImpl;
-import org.eclipse.wst.common.contentmodel.util.CMDescriptionBuilder;
import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent;
import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType;
@@ -63,6 +45,24 @@ import org.eclipse.wst.dtd.core.internal.emf.impl.DTDBasicTypeImpl;
import org.eclipse.wst.dtd.core.internal.emf.impl.DTDPackageImpl;
import org.eclipse.wst.dtd.core.internal.emf.util.DTDMetrics;
import org.eclipse.wst.dtd.core.internal.emf.util.DTDUtil;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocumentation;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMEntityDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.annotation.AnnotationMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMDataTypeImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMEntityDeclarationImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMNodeListImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDescriptionBuilder;
public class DTDImpl {
diff --git a/bundles/org.eclipse.wst.dtd.core/plugin.xml b/bundles/org.eclipse.wst.dtd.core/plugin.xml
index b09bbc0de4..e4d19e6ad7 100644
--- a/bundles/org.eclipse.wst.dtd.core/plugin.xml
+++ b/bundles/org.eclipse.wst.dtd.core/plugin.xml
@@ -18,7 +18,6 @@
<import plugin="org.eclipse.emf.ecore"/>
<import plugin="org.eclipse.jface.text" />
<import plugin="org.eclipse.ui" />
- <import plugin="org.eclipse.wst.common.contentmodel"/>
<import plugin="org.eclipse.wst.common.uriresolver"/>
<import plugin="org.eclipse.wst.sse.core" />
<import plugin="org.eclipse.wst.validation"/>
@@ -99,7 +98,7 @@
</extension>
<extension
- point="org.eclipse.wst.common.contentmodel.documentFactories">
+ point="org.eclipse.wst.sse.core.documentFactories">
<factory
type="dtd, ent, mod, xml"
class="org.eclipse.wst.dtd.core.internal.contentmodel.CMDocumentFactoryDTD">
diff --git a/bundles/org.eclipse.wst.html.core/plugin.xml b/bundles/org.eclipse.wst.html.core/plugin.xml
index 723b63db45..5d21a9f803 100644
--- a/bundles/org.eclipse.wst.html.core/plugin.xml
+++ b/bundles/org.eclipse.wst.html.core/plugin.xml
@@ -16,7 +16,6 @@
<import plugin="org.eclipse.wst.css.core"/>
<import plugin="org.eclipse.wst.sse.ui"/>
<import plugin="org.eclipse.wst.sse.core"/>
- <import plugin="org.eclipse.wst.common.contentmodel"/>
<import plugin="org.eclipse.wst.xml.core"/>
<import plugin="org.eclipse.wst.xml.uriresolver"/>
<import plugin="org.eclipse.core.resources"/>
@@ -104,7 +103,7 @@
</extension>
<!-- Extension point for taghelp documentation -->
<extension
- point="org.eclipse.wst.common.contentmodel.annotationFiles">
+ point="org.eclipse.wst.sse.core.annotationFiles">
<annotationFile
location="data/htmref.xml"
publicId="-//W3C//DTD XHTML 1.0 Strict//EN">
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCMProperties.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCMProperties.java
index 16d4719cce..61b1cd45f6 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCMProperties.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/HTMLCMProperties.java
@@ -39,7 +39,7 @@ public interface HTMLCMProperties {
*/
public static final String CONTENT_HINT = "contentHint";//$NON-NLS-1$
/**
- * "prohibitedAncestors" returns org.eclipse.wst.common.contentmodel.CMNamedNodeMap.
+ * "prohibitedAncestors" returns org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap.
*/
public static final String PROHIBITED_ANCESTORS = "prohibitedAncestors";//$NON-NLS-1$
/**
@@ -71,7 +71,7 @@ public interface HTMLCMProperties {
*/
public static final String OMIT_TYPE = "omitType";//$NON-NLS-1$
/**
- * "inclusion" returns org.eclipse.wst.common.contentmodel.CMContent.
+ * "inclusion" returns org.eclipse.wst.sse.core.internal.contentmodel.CMContent.
*/
public static final String INCLUSION = "inclusion";//$NON-NLS-1$
/**
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/commentelement/handlers/CommentElementHandlerForSSI.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/commentelement/handlers/CommentElementHandlerForSSI.java
index f24b10800f..b61f61fc42 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/commentelement/handlers/CommentElementHandlerForSSI.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/commentelement/handlers/CommentElementHandlerForSSI.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.commentelement.handlers;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.commentelement.CommentElementHandler;
import org.eclipse.wst.xml.core.commentelement.util.CommentElementFactory;
import org.eclipse.wst.xml.core.commentelement.util.TagScanner;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/AttributeCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/AttributeCollection.java
index 435e8ccc82..6b64dfe545 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/AttributeCollection.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/AttributeCollection.java
@@ -15,10 +15,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Factory for attribute declarations.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMContentImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMContentImpl.java
index 20341fb6aa..a0c3d1a382 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMContentImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMContentImpl.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMGroupImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMGroupImpl.java
index cbbe37f4df..ae038f62ac 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMGroupImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMGroupImpl.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
/**
*/
@@ -41,8 +41,8 @@ class CMGroupImpl extends CMContentImpl implements CMGroup {
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMNode
- * @param org.eclipse.wst.common.contentmodel.CMNode
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNode
+ * @param org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
protected CMNode appendChild(CMNode child) {
if (child == null)
@@ -53,7 +53,7 @@ class CMGroupImpl extends CMContentImpl implements CMGroup {
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMNodeList
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList
*/
public CMNodeList getChildNodes() {
return children;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamedNodeMapImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamedNodeMapImpl.java
index ac775f61df..a433156dad 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamedNodeMapImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamedNodeMapImpl.java
@@ -15,8 +15,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Hashtable;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* An implementation of the CMNamedNodeMap interface.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamespaceImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamespaceImpl.java
index f24a601225..942388be1e 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamespaceImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNamespaceImpl.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamespace;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* CMNamespace implementation.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeImpl.java
index 9c45f16e0e..174d1ab91f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeImpl.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeListImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeListImpl.java
index a821fc51b9..cea52bbcd7 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeListImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CMNodeListImpl.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
/**
* Analog of dom.NodeList for CM.
@@ -33,8 +33,8 @@ class CMNodeListImpl implements CMNodeList {
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMNode
- * @param node org.eclipse.wst.common.contentmodel.CMNode
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNode
+ * @param node org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
protected CMNode appendNode(CMNode node) {
nodes.addElement(node);
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ComplexTypeDefinition.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ComplexTypeDefinition.java
index 8ddb7732e2..3bf5bf0586 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ComplexTypeDefinition.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ComplexTypeDefinition.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
/**
* This class is intended to represent a complex type definition
@@ -40,7 +40,7 @@ abstract class ComplexTypeDefinition {
protected abstract void createContent();
/**
- * @return org.eclipse.wst.common.contentmodel.CMGroup
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMGroup
*/
public CMGroup getContent() {
return content;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdAddress.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdAddress.java
index a524a1cd73..95a230ff7b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdAddress.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdAddress.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for ADDRESS.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdColumnGroup.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdColumnGroup.java
index f3b8e5585a..6f639e64ad 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdColumnGroup.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdColumnGroup.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* COL group.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdDl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdDl.java
index abd3dd42ab..8ddaf29629 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdDl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdDl.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for DL.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdEmbed.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdEmbed.java
index f5abdd5bcb..4cd227c348 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdEmbed.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdEmbed.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for EMBED.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFieldset.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFieldset.java
index e54e8f5e65..7c0ebbea13 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFieldset.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFieldset.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for FIELDSET.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFlowContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFlowContainer.java
index 7b202bea5c..6f87025000 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFlowContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFlowContainer.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
/**
* Complex type definition for containers of <code>%flow;</code>.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFrameset.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFrameset.java
index 759d983ad4..fcc4a815a0 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFrameset.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdFrameset.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for FRAMESET.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHead.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHead.java
index 684241edd8..0d2c83b1c1 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHead.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHead.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Complex type definition for the head content.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHtml.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHtml.java
index b13ba6bd42..2c767b382f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHtml.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdHtml.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Complex type definition for <code>HTML</code>.<br>
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdInlineContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdInlineContainer.java
index 09ee6b80fa..d768a76034 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdInlineContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdInlineContainer.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
/**
* Complex type definition for (%inline;)*.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdLiContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdLiContainer.java
index 4f56f0d569..0be5da57cd 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdLiContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdLiContainer.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* List item container.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdMap.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdMap.java
index ac295ec012..f994013ec3 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdMap.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdMap.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for MAP.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdNoframesContent.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdNoframesContent.java
index 4f220a33ab..4e7cccd284 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdNoframesContent.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdNoframesContent.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for NOFRAMES.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdOptionContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdOptionContainer.java
index 05237b3694..b58bdbb769 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdOptionContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdOptionContainer.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* OPTION container.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdParamContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdParamContainer.java
index 587ec35c0d..0d73544c2e 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdParamContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdParamContainer.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* PARAM container. For OBJECT and APPLET.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdSelect.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdSelect.java
index 7f03f22a4f..b3869444c2 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdSelect.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdSelect.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for SELECT.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTable.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTable.java
index 1e5f4b0c11..2d09709827 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTable.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTable.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for TABLE.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTableCellContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTableCellContainer.java
index 39221ff0bd..ec94cf2170 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTableCellContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTableCellContainer.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Table cell container.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTrContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTrContainer.java
index 4a494bd8d2..2e26323a5d 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTrContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/CtdTrContainer.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Table record container.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/DeclCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/DeclCollection.java
index c9449fd6bf..1cb3706fd8 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/DeclCollection.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/DeclCollection.java
@@ -15,8 +15,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.HashMap;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
*/
@@ -136,7 +136,7 @@ abstract class DeclCollection implements CMNamedNodeMap {
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMNode
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNode
* @param id int
*/
protected abstract CMNode create(String name);
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ElementCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ElementCollection.java
index 26da0269b2..36476cee35 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ElementCollection.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ElementCollection.java
@@ -17,7 +17,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Factory for element declarations.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/EntityCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/EntityCollection.java
index dfecba9e08..0625f27bb0 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/EntityCollection.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/EntityCollection.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.html.core.contentmodel;
import java.lang.reflect.Field;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Factory for entity declarations.
@@ -821,7 +821,7 @@ final class EntityCollection extends DeclCollection implements org.eclipse.wst.h
/**
* Create an entity declaration.
- * @return org.eclipse.wst.common.contentmodel.CMNode
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNode
* @param attrName java.lang.String
*/
protected CMNode create(String entityName) {
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HCMDocImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HCMDocImpl.java
index 2d4508906d..2d0c2f8fde 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HCMDocImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HCMDocImpl.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNamespace;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* CMDocument implementation for the HTML.
@@ -54,14 +54,14 @@ class HCMDocImpl extends CMNodeImpl implements HTMLCMDocument {
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDocument
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
*/
public CMNamedNodeMap getElements() {
return elements;
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDocument
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
*/
public CMNamedNodeMap getEntities() {
return entities;
@@ -77,7 +77,7 @@ class HCMDocImpl extends CMNodeImpl implements HTMLCMDocument {
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDocument
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
*/
public CMNamespace getNamespace() {
return namespace;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttrDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttrDeclImpl.java
index f9311ac852..ac7954def4 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttrDeclImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttrDeclImpl.java
@@ -16,9 +16,9 @@ import java.util.Arrays;
import java.util.Enumeration;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Implementation class of {@link <code>HTMLAttributeDeclaration</code>} interface.<br>
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttributeDeclaration.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttributeDeclaration.java
index 5ea976a264..54efc9db88 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttributeDeclaration.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLAttributeDeclaration.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataType.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataType.java
index fe0e16eee8..74fed6a62e 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataType.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataType.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* HTML extension for data types.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataTypeImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataTypeImpl.java
index d0674787de..48ac755f57 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataTypeImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDataTypeImpl.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
@@ -53,7 +53,7 @@ class HTMLCMDataTypeImpl extends CMNodeImpl implements HTMLCMDataType {
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDataType
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDataType
*/
public String getDataTypeName() {
return getNodeName();
@@ -90,7 +90,7 @@ class HTMLCMDataTypeImpl extends CMNodeImpl implements HTMLCMDataType {
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMNode
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
public int getNodeType() {
return CMNode.DATA_TYPE;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocument.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocument.java
index 46177cc52b..23e2981625 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocument.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocument.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocumentFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocumentFactory.java
index 4e7ea65f39..26f8f3ee33 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocumentFactory.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMDocumentFactory.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Hashtable;
-import org.eclipse.wst.common.contentmodel.CMDocument;
import org.eclipse.wst.html.core.HTML40Namespace;
import org.eclipse.wst.html.core.contentmodel.chtml.CHCMDocImpl;
import org.eclipse.wst.sse.core.contentmodel.CMDocType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
/**
* INodeAdapter factory for HTML and JSP documents.
@@ -47,7 +47,7 @@ public final class HTMLCMDocumentFactory {
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMDocument
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
* @param cmtype java.lang.String
*/
public static CMDocument getCMDocument(String cmtype) {
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMNode.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMNode.java
index f7a783d145..33a7a8c379 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMNode.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLCMNode.java
@@ -21,7 +21,7 @@ package org.eclipse.wst.html.core.contentmodel;
* This intermediate interface is intended to provide whether ignore cases
* or not.<br>
*/
-interface HTMLCMNode extends org.eclipse.wst.common.contentmodel.CMNode {
+interface HTMLCMNode extends org.eclipse.wst.sse.core.internal.contentmodel.CMNode {
/**
* Returns <code>true</code>, if declaration is for HTML attribute/element/entity.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElemDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElemDeclImpl.java
index 6814cbe164..fa15d89003 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElemDeclImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElemDeclImpl.java
@@ -14,12 +14,12 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Base class for all Hed???? classes.
@@ -131,7 +131,7 @@ abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDecl
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public CMNamedNodeMap getAttributes() {
if (attributes == null)
@@ -156,7 +156,7 @@ abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDecl
* This default implementation always tries to create a complex type definition
* instance and access to it.
* <br>
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public CMContent getContent() {
ComplexTypeDefinition def = getComplexTypeDefinition(); // lazy eval.
@@ -170,7 +170,7 @@ abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDecl
* This default implementation always tries to create a complex type definition
* instance and access to it.
* <br>
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public int getContentType() {
ComplexTypeDefinition def = getComplexTypeDefinition(); // lazy eval.
@@ -187,14 +187,14 @@ abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDecl
/**
* HTML element doesn't have any data type. So, this method always
* returns <code>null</code>.<br>
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public CMDataType getDataType() {
return null;
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public String getElementName() {
return getNodeName();
@@ -258,14 +258,14 @@ abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDecl
/**
* No HTML element has local elements. So, this method always
* returns an empty map.
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public CMNamedNodeMap getLocalElements() {
return EMPTY_MAP;
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMNode
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
public int getNodeType() {
return CMNode.ELEMENT_DECLARATION;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElementDeclaration.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElementDeclaration.java
index 99e673578b..68e61fbc63 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElementDeclaration.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLElementDeclaration.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
/**
* This interface is intended to be a public interface which has
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java
index 3ec7fdb7dc..85cae2edf0 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclImpl.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclaration.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclaration.java
index b1b10148f6..f31dd117f9 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclaration.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLEntityDeclaration.java
@@ -17,6 +17,6 @@ package org.eclipse.wst.html.core.contentmodel;
* interfaces defined in both of {@link <code>CMEntityDeclaration</code>}
* and {@link <code>HTMLCMNode</code>}.<br>
*/
-public interface HTMLEntityDeclaration extends org.eclipse.wst.common.contentmodel.CMEntityDeclaration {
+public interface HTMLEntityDeclaration extends org.eclipse.wst.sse.core.internal.contentmodel.CMEntityDeclaration {
} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLPropertyDeclaration.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLPropertyDeclaration.java
index 9ff07f645f..c2eb1a6903 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLPropertyDeclaration.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HTMLPropertyDeclaration.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* This interface is commonly used in declaration implementation, and internal use.
@@ -31,7 +31,7 @@ public interface HTMLPropertyDeclaration {
int getCorrectionType();
/**
* Get the list of declarations those should be excluded from the content.<br>
- * @return org.eclipse.wst.common.contentmodel.CMContent
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMContent
*/
CMContent getExclusion();
/**
@@ -43,7 +43,7 @@ public interface HTMLPropertyDeclaration {
int getFormatType();
/**
* Get the list of declarations those should be included into the content.<br>
- * @return org.eclipse.wst.common.contentmodel.CMContent
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMContent
*/
CMContent getInclusion();
/**
@@ -72,7 +72,7 @@ public interface HTMLPropertyDeclaration {
*/
int getOmitType();
/**
- * @return org.eclipse.wst.common.contentmodel.CMNamedNodeMap
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap
*/
CMNamedNodeMap getProhibitedAncestors();
/**
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedA.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedA.java
index 84cb78bffe..44fa5b1aef 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedA.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedA.java
@@ -14,11 +14,11 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* A.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedADDRESS.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedADDRESS.java
index 3fb721c0e7..ca77cb83c6 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedADDRESS.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedADDRESS.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* ADDRESS.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBASEFONT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBASEFONT.java
index da1536fc63..cbecd2f2a9 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBASEFONT.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBASEFONT.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* BASEFONT.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBDO.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBDO.java
index 3cde33173e..efb73a38f1 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBDO.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBDO.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* BDO.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBGSOUND.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBGSOUND.java
index baa939ff26..fc0a100089 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBGSOUND.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBGSOUND.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBLOCKQUOTE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBLOCKQUOTE.java
index dc0fed2697..7fb8419f3e 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBLOCKQUOTE.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBLOCKQUOTE.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* BLOCKQUOTE.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBODY.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBODY.java
index fdd5b98e20..530bc8dd38 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBODY.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBODY.java
@@ -15,9 +15,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMGroup;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
/**
* BODY.
@@ -71,7 +71,7 @@ final class HedBODY extends HedFlowContainer {
/**
* Inclusion.
* "Lazy eval."<br>
- * @return org.eclipse.wst.common.contentmodel.CMContent
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMContent
*/
public CMContent getInclusion() {
if (inclusion != null)
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBUTTON.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBUTTON.java
index 7360060415..ba8f392666 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBUTTON.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedBUTTON.java
@@ -14,12 +14,12 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* BUTTON.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCENTER.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCENTER.java
index 55e0fbf021..0288dbc99a 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCENTER.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCENTER.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* CENTER.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOL.java
index ba3f1b7362..c34c1b8d21 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOL.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOL.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
/**
* COL.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOLGROUP.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOLGROUP.java
index 37528e5a1e..4c9f256fd1 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOLGROUP.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedCOLGROUP.java
@@ -15,8 +15,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
/**
* COLGROUP.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDIV.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDIV.java
index 5faaf3c093..4de52089da 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDIV.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDIV.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* DIV.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDL.java
index ff2aba550b..e5c3adc8ee 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDL.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedDL.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* DL.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEMBED.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEMBED.java
index 1b94431f97..67c867cfab 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEMBED.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEMBED.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* EMBED.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEmpty.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEmpty.java
index bcf3dcee79..f7925c23ab 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEmpty.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedEmpty.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
/**
* Base class for EMPTY type element declarations.
@@ -33,7 +33,7 @@ abstract class HedEmpty extends HTMLElemDeclImpl {
* Content.<br>
* EMPTY type always returns <code>null</code>.
* <br>
- * @return org.eclipse.wst.common.contentmodel.CMContent
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMContent
*/
public CMContent getContent() {
return null;
@@ -41,7 +41,7 @@ abstract class HedEmpty extends HTMLElemDeclImpl {
/**
* Content type.<br>
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public int getContentType() {
return CMElementDeclaration.EMPTY;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFIELDSET.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFIELDSET.java
index 16d28c0333..9b1a53d87a 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFIELDSET.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFIELDSET.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* FIELDSET.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFONT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFONT.java
index 20ec1a5860..17aee05fc8 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFONT.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFONT.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* FONT.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFORM.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFORM.java
index e823b0f134..813eacd15a 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFORM.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFORM.java
@@ -14,11 +14,11 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* FORM.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFRAMESET.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFRAMESET.java
index a2ab71ffbd..d704fe558f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFRAMESET.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFRAMESET.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* FRAMESET.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFontStyle.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFontStyle.java
index ff06724101..b7ff22abda 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFontStyle.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedFontStyle.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* %fontstyle;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHR.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHR.java
index 958a1fd556..77930b3cc3 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHR.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHR.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* HR.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHeading.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHeading.java
index 1e572ebd5c..5954dd1757 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHeading.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedHeading.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* H[1-6].
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIFRAME.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIFRAME.java
index a2c592f596..c55e424560 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIFRAME.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIFRAME.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* IFRAME.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIMG.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIMG.java
index b2244bde26..53bcdbdd99 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIMG.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedIMG.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* IMG.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedINPUT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedINPUT.java
index c1dc3d15b1..c643da5dd0 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedINPUT.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedINPUT.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* INPUT.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedISINDEX.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedISINDEX.java
index 7f84d63662..dd317c0d97 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedISINDEX.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedISINDEX.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* ISINDEX.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLABEL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLABEL.java
index 5251560714..6b1e5f86a5 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLABEL.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLABEL.java
@@ -14,13 +14,13 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* LABEL.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLI.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLI.java
index 892af63cde..d96f338625 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLI.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLI.java
@@ -15,9 +15,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* LI.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLINK.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLINK.java
index 7489b750f4..9d8bb48c35 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLINK.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedLINK.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
/**
* LINK.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMAP.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMAP.java
index d167f6976d..a3ddcde11b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMAP.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMAP.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMARQUEE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMARQUEE.java
index d9ab01cae4..cdb9509d5b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMARQUEE.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMARQUEE.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* MARQUEE.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMENU.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMENU.java
index 29f0456288..6ebce93d69 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMENU.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMENU.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* MENU/DIR.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMETA.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMETA.java
index 17f09b4f2c..618cd9c8d3 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMETA.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedMETA.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
/**
* META.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOFRAMES.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOFRAMES.java
index c780b6d353..382a260c2f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOFRAMES.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOFRAMES.java
@@ -12,11 +12,11 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* NOFRAMES.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOSCRIPT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOSCRIPT.java
index a3d154c996..a2939194d1 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOSCRIPT.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedNOSCRIPT.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* NOSCRIPT.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOBJECT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOBJECT.java
index a0b3c861f5..9a87862d52 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOBJECT.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOBJECT.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* OBJECT.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOL.java
index 8e4aa25ddc..f8b2044b13 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOL.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOL.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* OL.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOPTGROUP.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOPTGROUP.java
index 5ba00196b1..d7bea243d1 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOPTGROUP.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedOPTGROUP.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
/**
* OPTGROUP.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedP.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedP.java
index 492be84fca..fec66e4b00 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedP.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedP.java
@@ -16,8 +16,8 @@ import java.util.Collection;
import java.util.Iterator;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* P.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPARAM.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPARAM.java
index 3b6c56bc98..40a0e47cce 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPARAM.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPARAM.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* PARAM.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPRE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPRE.java
index 19c9019163..bb30f416fa 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPRE.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPRE.java
@@ -14,12 +14,12 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* PRE.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPcdata.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPcdata.java
index b9d053d0d3..b588925c4e 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPcdata.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedPcdata.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
/**
* Base class for PCDATA type element declarations.<br>
@@ -31,7 +31,7 @@ abstract class HedPcdata extends HTMLElemDeclImpl {
* Content.<br>
* PCDATA type always returns <code>null</code>.
* <br>
- * @return org.eclipse.wst.common.contentmodel.CMContent
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMContent
*/
public CMContent getContent() {
return null;
@@ -39,7 +39,7 @@ abstract class HedPcdata extends HTMLElemDeclImpl {
/**
* Content type.<br>
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public int getContentType() {
return CMElementDeclaration.PCDATA;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSCRIPT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSCRIPT.java
index 6a0153db86..d6d6945c8e 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSCRIPT.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSCRIPT.java
@@ -14,11 +14,11 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
/**
* SCRIPT.
@@ -65,7 +65,7 @@ final class HedSCRIPT extends HTMLElemDeclImpl {
* <code>SCRIPT</code> is CDATA type.
* So, the method always returns <code>null</code>.
* <br>
- * @return org.eclipse.wst.common.contentmodel.CMContent
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMContent
*/
public CMContent getContent() {
return null;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSELECT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSELECT.java
index 3e7438e6d4..5adc2562d8 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSELECT.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSELECT.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* SELECT.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIPrintenv.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIPrintenv.java
index 29b4ed9e10..b1f75f8ce3 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIPrintenv.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSSIPrintenv.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* SSI:PRINTENV.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSTYLE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSTYLE.java
index 4288cf7bc7..063d135f75 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSTYLE.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedSTYLE.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
/**
* STYLE.
@@ -61,7 +61,7 @@ final class HedSTYLE extends HTMLElemDeclImpl {
/**
* Content.<br>
* <code>STYLE</code> is CDATA content type. So, it always returns <code>null</code>.
- * @return org.eclipse.wst.common.contentmodel.CMContent
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMContent
*/
public CMContent getContent() {
return null;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedScripts.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedScripts.java
index f25a804fd9..296622c788 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedScripts.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedScripts.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* SUB and SUP.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTABLE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTABLE.java
index 7a77ff639c..e08b2d8863 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTABLE.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTABLE.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* TABLE.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTEXTAREA.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTEXTAREA.java
index ad5f71acdc..9eb865447f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTEXTAREA.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTEXTAREA.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* TEXTAREA.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTITLE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTITLE.java
index 23e77ce572..8ac380e6ad 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTITLE.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedTITLE.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMGroup;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
/**
* TITLE.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedUL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedUL.java
index 1bf48d381e..48c9f3b58c 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedUL.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/HedUL.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* UL.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JCMDocImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JCMDocImpl.java
index 7401ac5bc8..8a8a3613c0 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JCMDocImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JCMDocImpl.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Implementation of CMDocument for the JSP 1.1.
@@ -43,14 +43,14 @@ class JCMDocImpl extends CMNodeImpl implements JSPCMDocument {
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDocument
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
*/
public CMNamedNodeMap getElements() {
return elements;
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDocument
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
*/
public CMNamedNodeMap getEntities() {
return null;
@@ -64,14 +64,14 @@ class JCMDocImpl extends CMNodeImpl implements JSPCMDocument {
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDocument
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
*/
- public org.eclipse.wst.common.contentmodel.CMNamespace getNamespace() {
+ public org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace getNamespace() {
return namespace;
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMNode
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
public int getNodeType() {
return CMNode.DOCUMENT;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPCMDocument.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPCMDocument.java
index e547c93ed1..e1ba0735b0 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPCMDocument.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPCMDocument.java
@@ -17,7 +17,7 @@ package org.eclipse.wst.html.core.contentmodel;
* This interface provides some short hand methods to get declarations
* by a name.
*/
-public interface JSPCMDocument extends org.eclipse.wst.common.contentmodel.CMDocument {
+public interface JSPCMDocument extends org.eclipse.wst.sse.core.internal.contentmodel.CMDocument {
/**
* A short hand method to get a element declaration for a JSP element.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPElementCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPElementCollection.java
index 3cd6748ab4..9d3174efc7 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPElementCollection.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/JSPElementCollection.java
@@ -18,14 +18,14 @@ import java.util.Enumeration;
import java.util.Iterator;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Factory for element declarations of the JSP 1.1.
@@ -683,7 +683,7 @@ final class JSPElementCollection extends DeclCollection implements JSP11Namespac
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMNode
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNode
* @param elementName java.lang.String
*/
protected CMNode create(String elementName) {
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/PropertyProviderFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/PropertyProviderFactory.java
index 3347343d40..5b91246e7a 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/PropertyProviderFactory.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/PropertyProviderFactory.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel;
import java.util.Hashtable;
-import org.eclipse.wst.common.contentmodel.annotation.AnnotationMap;
import org.eclipse.wst.html.core.HTMLCMProperties;
+import org.eclipse.wst.sse.core.internal.contentmodel.annotation.AnnotationMap;
/**
* The factory object of PropertyProvider.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/AttributeCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/AttributeCollection.java
index 8b388bd48c..458fa06c4b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/AttributeCollection.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/AttributeCollection.java
@@ -14,11 +14,11 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.contentmodel.HTMLAttributeDeclaration;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Factory for attribute declarations.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CHCMDocImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CHCMDocImpl.java
index d191f98b40..cd18ee6bd1 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CHCMDocImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CHCMDocImpl.java
@@ -12,12 +12,12 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNamespace;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDocument;
import org.eclipse.wst.html.core.contentmodel.HTMLElementDeclaration;
import org.eclipse.wst.html.core.contentmodel.HTMLEntityDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* CMDocument implementation for the HTML.
@@ -57,14 +57,14 @@ public class CHCMDocImpl extends CMNodeImpl implements HTMLCMDocument {
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDocument
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
*/
public CMNamedNodeMap getElements() {
return elements;
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDocument
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
*/
public CMNamedNodeMap getEntities() {
return entities;
@@ -80,14 +80,14 @@ public class CHCMDocImpl extends CMNodeImpl implements HTMLCMDocument {
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDocument
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDocument
*/
- public org.eclipse.wst.common.contentmodel.CMNamespace getNamespace() {
+ public org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace getNamespace() {
return namespace;
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMNode
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
public int getNodeType() {
return CMNode.DOCUMENT;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMContentImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMContentImpl.java
index c9f5219d8f..876c90e0e1 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMContentImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMContentImpl.java
@@ -15,7 +15,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
/**
* Implementation of CMContent for HTML CM.
*/
-abstract class CMContentImpl extends CMNodeImpl implements org.eclipse.wst.common.contentmodel.CMContent {
+abstract class CMContentImpl extends CMNodeImpl implements org.eclipse.wst.sse.core.internal.contentmodel.CMContent {
public static final int UNBOUNDED = -1;
/** -1: it's UNBOUNDED. */
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMGroupImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMGroupImpl.java
index 509bf9e173..dedd6e10e4 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMGroupImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMGroupImpl.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
/**
*/
@@ -41,8 +41,8 @@ class CMGroupImpl extends CMContentImpl implements CMGroup {
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMNode
- * @param org.eclipse.wst.common.contentmodel.CMNode
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNode
+ * @param org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
protected CMNode appendChild(CMNode child) {
if (child == null)
@@ -53,7 +53,7 @@ class CMGroupImpl extends CMContentImpl implements CMGroup {
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMNodeList
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList
*/
public CMNodeList getChildNodes() {
return children;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNamedNodeMapImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNamedNodeMapImpl.java
index 39a7ba9a81..8c408a7c0e 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNamedNodeMapImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNamedNodeMapImpl.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* An implementation of the CMNamedNodeMap interface.
@@ -23,7 +23,7 @@ import org.eclipse.wst.common.contentmodel.CMNode;
* to the fact that this class is tolerant of the key name case. That is, this
* class does not distinguish "name", "NAME", and "Name" as a key name.
*/
-class CMNamedNodeMapImpl implements org.eclipse.wst.common.contentmodel.CMNamedNodeMap {
+class CMNamedNodeMapImpl implements org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap {
private java.util.Hashtable items = null;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeImpl.java
index 69707962d5..d3fd72547b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeImpl.java
@@ -16,7 +16,7 @@ import org.eclipse.wst.html.core.HTMLCMProperties;
/**
*/
-abstract class CMNodeImpl implements org.eclipse.wst.common.contentmodel.CMNode {
+abstract class CMNodeImpl implements org.eclipse.wst.sse.core.internal.contentmodel.CMNode {
private java.lang.String name = null;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeListImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeListImpl.java
index 1aba885873..60f334051e 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeListImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CMNodeListImpl.java
@@ -12,14 +12,14 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Analog of dom.NodeList for CM.
* So, the implementation is very similar to
* {@link com.ibm.sed.model.xml.NodeListImpl}.<br>
*/
-class CMNodeListImpl implements org.eclipse.wst.common.contentmodel.CMNodeList {
+class CMNodeListImpl implements org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList {
private java.util.Vector nodes = null;
@@ -32,8 +32,8 @@ class CMNodeListImpl implements org.eclipse.wst.common.contentmodel.CMNodeList {
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMNode
- * @param node org.eclipse.wst.common.contentmodel.CMNode
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNode
+ * @param node org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
protected CMNode appendNode(CMNode node) {
nodes.addElement(node);
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ComplexTypeDefinition.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ComplexTypeDefinition.java
index c3d730496b..d01eaca8b8 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ComplexTypeDefinition.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ComplexTypeDefinition.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMGroup;
import org.eclipse.wst.html.core.contentmodel.HTMLElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
/**
* This class is intended to represent a complex type definition
@@ -41,7 +41,7 @@ abstract class ComplexTypeDefinition {
protected abstract void createContent();
/**
- * @return org.eclipse.wst.common.contentmodel.CMGroup
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMGroup
*/
public CMGroup getContent() {
return content;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdAddress.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdAddress.java
index 8b2392e7ff..8bb5fa8a69 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdAddress.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdAddress.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for ADDRESS.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdDl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdDl.java
index 51cd5ad75d..76e8fde0a5 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdDl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdDl.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for DL.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdFlowContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdFlowContainer.java
index cbf733a867..53c1034611 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdFlowContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdFlowContainer.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
/**
* Complex type definition for containers of <code>%flow;</code>.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHead.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHead.java
index a3172351ef..035b7b16c7 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHead.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHead.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Complex type definition for the head content.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHtml.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHtml.java
index 34db54866f..e58bf18bf4 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHtml.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdHtml.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Complex type definition for <code>HTML</code>.<br>
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdInlineContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdInlineContainer.java
index b00c3acf6b..29c07ada27 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdInlineContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdInlineContainer.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
/**
* Complex type definition for (%inline;)*.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdLiContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdLiContainer.java
index 7b8cb714ed..d659439edd 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdLiContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdLiContainer.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* List item container.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdOptionContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdOptionContainer.java
index 45f8430586..8b4ca189bb 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdOptionContainer.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdOptionContainer.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* OPTION container.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdSelect.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdSelect.java
index ea83c5991c..e7c883b0b2 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdSelect.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/CtdSelect.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* for SELECT.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/DeclCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/DeclCollection.java
index 62809a8cdd..a83fcad753 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/DeclCollection.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/DeclCollection.java
@@ -15,8 +15,8 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.HashMap;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
*/
@@ -136,7 +136,7 @@ abstract class DeclCollection implements CMNamedNodeMap {
}
/**
- * @return org.eclipse.wst.common.contentmodel.CMNode
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNode
* @param id int
*/
protected abstract CMNode create(String name);
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ElementCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ElementCollection.java
index 854806427d..6d410a7207 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ElementCollection.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/ElementCollection.java
@@ -17,7 +17,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Factory for element declarations.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/EntityCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/EntityCollection.java
index 1ae092584c..30c40c2299 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/EntityCollection.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/EntityCollection.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.lang.reflect.Field;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Factory for entity declarations.
@@ -821,7 +821,7 @@ final class EntityCollection extends DeclCollection implements org.eclipse.wst.h
/**
* Create an entity declaration.
- * @return org.eclipse.wst.common.contentmodel.CMNode
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMNode
* @param attrName java.lang.String
*/
protected CMNode create(String entityName) {
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLAttrDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLAttrDeclImpl.java
index e0fbc52466..1186d87d09 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLAttrDeclImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLAttrDeclImpl.java
@@ -16,10 +16,10 @@ import java.util.Arrays;
import java.util.Enumeration;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contentmodel.HTMLAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Implementation class of {@link <code>HTMLAttributeDeclaration</code>} interface.<br>
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMDataTypeImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMDataTypeImpl.java
index 3757c6eea7..5b1970cb4d 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMDataTypeImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMDataTypeImpl.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
@@ -54,7 +54,7 @@ class HTMLCMDataTypeImpl extends CMNodeImpl implements HTMLCMDataType {
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMDataType
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMDataType
*/
public String getDataTypeName() {
return getNodeName();
@@ -91,7 +91,7 @@ class HTMLCMDataTypeImpl extends CMNodeImpl implements HTMLCMDataType {
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMNode
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
public int getNodeType() {
return CMNode.DATA_TYPE;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMNode.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMNode.java
index 26166410de..a06de8aa08 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMNode.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLCMNode.java
@@ -21,7 +21,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
* This intermediate interface is intended to provide whether ignore cases
* or not.<br>
*/
-interface HTMLCMNode extends org.eclipse.wst.common.contentmodel.CMNode {
+interface HTMLCMNode extends org.eclipse.wst.sse.core.internal.contentmodel.CMNode {
/**
* Returns <code>true</code>, if declaration is for HTML attribute/element/entity.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLElemDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLElemDeclImpl.java
index c1fac6421f..ab42b6d8c8 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLElemDeclImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLElemDeclImpl.java
@@ -14,15 +14,15 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contentmodel.HTMLAttributeDeclaration;
import org.eclipse.wst.html.core.contentmodel.HTMLElementDeclaration;
import org.eclipse.wst.html.core.contentmodel.HTMLPropertyDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* Base class for all Hed???? classes.
@@ -134,7 +134,7 @@ abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDecl
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public CMNamedNodeMap getAttributes() {
if (attributes == null)
@@ -159,7 +159,7 @@ abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDecl
* This default implementation always tries to create a complex type definition
* instance and access to it.
* <br>
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public CMContent getContent() {
ComplexTypeDefinition def = getComplexTypeDefinition(); // lazy eval.
@@ -173,7 +173,7 @@ abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDecl
* This default implementation always tries to create a complex type definition
* instance and access to it.
* <br>
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public int getContentType() {
ComplexTypeDefinition def = getComplexTypeDefinition(); // lazy eval.
@@ -190,14 +190,14 @@ abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDecl
/**
* HTML element doesn't have any data type. So, this method always
* returns <code>null</code>.<br>
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public CMDataType getDataType() {
return null;
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public String getElementName() {
return getNodeName();
@@ -261,14 +261,14 @@ abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDecl
/**
* No HTML element has local elements. So, this method always
* returns an empty map.
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public CMNamedNodeMap getLocalElements() {
return EMPTY_MAP;
}
/**
- * @see org.eclipse.wst.common.contentmodel.CMNode
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMNode
*/
public int getNodeType() {
return CMNode.ELEMENT_DECLARATION;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLEntityDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLEntityDeclImpl.java
index 5d91c853d2..868225d5d9 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLEntityDeclImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HTMLEntityDeclImpl.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contentmodel.HTMLEntityDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedA.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedA.java
index 60aa5ba8f0..fad076d3ba 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedA.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedA.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* A.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedADDRESS.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedADDRESS.java
index 3126e0d748..d99524b806 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedADDRESS.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedADDRESS.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* ADDRESS.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedBLOCKQUOTE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedBLOCKQUOTE.java
index e730d080e5..3380f97c8d 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedBLOCKQUOTE.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedBLOCKQUOTE.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* BLOCKQUOTE.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedCENTER.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedCENTER.java
index 115f7e22c1..1e526f1aa4 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedCENTER.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedCENTER.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* CENTER.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDIV.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDIV.java
index 95b6c64007..7ff7ea2dd5 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDIV.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDIV.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* DIV.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDL.java
index 9274ddf31f..7b25225ed3 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDL.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedDL.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* DL.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedEmpty.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedEmpty.java
index 188c107de3..a8206b6f78 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedEmpty.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedEmpty.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
/**
* Base class for EMPTY type element declarations.
@@ -33,7 +33,7 @@ abstract class HedEmpty extends HTMLElemDeclImpl {
* Content.<br>
* EMPTY type always returns <code>null</code>.
* <br>
- * @return org.eclipse.wst.common.contentmodel.CMContent
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMContent
*/
public CMContent getContent() {
return null;
@@ -41,7 +41,7 @@ abstract class HedEmpty extends HTMLElemDeclImpl {
/**
* Content type.<br>
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public int getContentType() {
return CMElementDeclaration.EMPTY;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedFORM.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedFORM.java
index 3c05641966..64953dc0f9 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedFORM.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedFORM.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* FORM.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHR.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHR.java
index c94fd0d6c3..c26ef81ecd 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHR.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHR.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* HR.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHeading.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHeading.java
index b93ecfa212..f0c599f108 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHeading.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedHeading.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* H[1-6].
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedIMG.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedIMG.java
index f6ace06817..e9c69adcd9 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedIMG.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedIMG.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* IMG.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedINPUT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedINPUT.java
index a4959345ec..00bc76c78a 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedINPUT.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedINPUT.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* INPUT.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMENU.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMENU.java
index ff8cc21618..fbff0b3fad 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMENU.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMENU.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* MENU/DIR.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMETA.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMETA.java
index b7eac5d11b..d834fdb972 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMETA.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedMETA.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* META.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedOL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedOL.java
index 9e0fe9a9f9..7e57f271ad 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedOL.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedOL.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* OL.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedP.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedP.java
index d04ffbcc6b..d44da8d129 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedP.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedP.java
@@ -16,7 +16,7 @@ import java.util.Collection;
import java.util.Iterator;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* P.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPRE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPRE.java
index f82d15ec5b..db284a633f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPRE.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPRE.java
@@ -14,11 +14,11 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* PRE.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPcdata.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPcdata.java
index 07460073d7..5674f3c9c6 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPcdata.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedPcdata.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
/**
* Base class for PCDATA type element declarations.<br>
@@ -31,7 +31,7 @@ abstract class HedPcdata extends HTMLElemDeclImpl {
* Content.<br>
* PCDATA type always returns <code>null</code>.
* <br>
- * @return org.eclipse.wst.common.contentmodel.CMContent
+ * @return org.eclipse.wst.sse.core.internal.contentmodel.CMContent
*/
public CMContent getContent() {
return null;
@@ -39,7 +39,7 @@ abstract class HedPcdata extends HTMLElemDeclImpl {
/**
* Content type.<br>
- * @see org.eclipse.wst.common.contentmodel.CMElementDeclaration
+ * @see org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration
*/
public int getContentType() {
return CMElementDeclaration.PCDATA;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSELECT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSELECT.java
index cc844f8c88..7d7528f104 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSELECT.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSELECT.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
* SELECT.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIPrintenv.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIPrintenv.java
index ff252708b2..a08b440876 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIPrintenv.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedSSIPrintenv.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* SSI:PRINTENV.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedTITLE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedTITLE.java
index 545848b40d..f770307b58 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedTITLE.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedTITLE.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Arrays;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
/**
* TITLE.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedUL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedUL.java
index e7a23c0226..df47e7380b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedUL.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/HedUL.java
@@ -12,7 +12,7 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
/**
* UL.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/PropertyProviderFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/PropertyProviderFactory.java
index 5512025995..39e4d5ad1c 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/PropertyProviderFactory.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/chtml/PropertyProviderFactory.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.contentmodel.chtml;
import java.util.Hashtable;
-import org.eclipse.wst.common.contentmodel.annotation.AnnotationMap;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contentmodel.HTMLElementDeclaration;
import org.eclipse.wst.html.core.contentmodel.HTMLPropertyDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.annotation.AnnotationMap;
/**
* The factory object of PropertyProvider.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ssi/SSICMDocumentFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ssi/SSICMDocumentFactory.java
index 66fbaf1bb7..4d89fd5136 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ssi/SSICMDocumentFactory.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/contentmodel/ssi/SSICMDocumentFactory.java
@@ -13,14 +13,14 @@ package org.eclipse.wst.html.core.contentmodel.ssi;
import java.util.Hashtable;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNamespace;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTML40Namespace;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.sse.core.contentmodel.CMDocType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* CMDocument factory for SSI documents.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java
index e8b4fb3593..fb91485e38 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/document/HTMLModelParserAdapter.java
@@ -12,15 +12,15 @@ package org.eclipse.wst.html.core.document;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
import org.eclipse.wst.html.core.HTML40Namespace;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contentmodel.HTMLElementDeclaration;
import org.eclipse.wst.sse.core.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
import org.eclipse.wst.xml.core.document.TagAdapter;
import org.eclipse.wst.xml.core.document.XMLElement;
import org.eclipse.wst.xml.core.document.XMLText;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java
index f4c55ce14c..b4e54ceee8 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java
@@ -13,8 +13,6 @@ package org.eclipse.wst.html.core.format;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.HTMLFormatContraints;
import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
@@ -22,6 +20,8 @@ import org.eclipse.wst.sse.core.format.IStructuredFormatContraints;
import org.eclipse.wst.sse.core.format.IStructuredFormatPreferences;
import org.eclipse.wst.sse.core.format.IStructuredFormatter;
import org.eclipse.wst.sse.core.internal.SSECorePlugin;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java
index 167fcf3c9b..e7a2ac0ce7 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLTextFormatter.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.format;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.HTMLFormatContraints;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.xml.core.document.XMLElement;
import org.eclipse.wst.xml.core.document.XMLNode;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAdapterFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAdapterFactory.java
index 30d88ad643..6cddb7f416 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAdapterFactory.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/htmlcss/StyleAdapterFactory.java
@@ -12,11 +12,6 @@ package org.eclipse.wst.html.core.htmlcss;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.css.core.adapters.IStyleDeclarationAdapter;
import org.eclipse.wst.css.core.adapters.IStyleSheetAdapter;
import org.eclipse.wst.css.core.adapters.IStyleSheetListAdapter;
@@ -24,6 +19,11 @@ import org.eclipse.wst.html.core.HTML40Namespace;
import org.eclipse.wst.sse.core.AdapterFactory;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java
index 465d1379e9..dbea9d12d1 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java
@@ -20,10 +20,6 @@ import java.util.Locale;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.text.edits.InsertEdit;
import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.css.core.adapters.IStyleDeclarationAdapter;
import org.eclipse.wst.css.core.document.ICSSModel;
import org.eclipse.wst.css.core.document.ICSSNode;
@@ -32,6 +28,10 @@ import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupHandler;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMAttributeDeclarationBuddySystem.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMAttributeDeclarationBuddySystem.java
index 9d38dad87c..24e0b2ecfc 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMAttributeDeclarationBuddySystem.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMAttributeDeclarationBuddySystem.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.modelquery;
import java.util.Enumeration;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
/**
*/
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMDocumentForBuddySystem.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMDocumentForBuddySystem.java
index b63c6a6116..fc9f061833 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMDocumentForBuddySystem.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMDocumentForBuddySystem.java
@@ -12,14 +12,14 @@ package org.eclipse.wst.html.core.modelquery;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNamespace;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.html.core.contentmodel.ssi.SSICMDocumentFactory;
import org.eclipse.wst.sse.core.contentmodel.CMDocType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
*/
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMElementDeclarationBuddySystem.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMElementDeclarationBuddySystem.java
index 030b4f41ce..63476e3116 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMElementDeclarationBuddySystem.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMElementDeclarationBuddySystem.java
@@ -11,16 +11,16 @@
package org.eclipse.wst.html.core.modelquery;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.sse.core.contentmodel.CMDocType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
*/
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNamedNodeMapForBuddySystem.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNamedNodeMapForBuddySystem.java
index 0969a93fdd..86badb92fa 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNamedNodeMapForBuddySystem.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNamedNodeMapForBuddySystem.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.html.core.modelquery;
import java.util.Hashtable;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
*/
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNodeBuddySystem.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNodeBuddySystem.java
index 908b7e18c3..b3fdce7d75 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNodeBuddySystem.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/CMNodeBuddySystem.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.wst.html.core.modelquery;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
*/
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ElementDeclarationAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ElementDeclarationAdapter.java
index 60545feedc..ced742b204 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ElementDeclarationAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ElementDeclarationAdapter.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.modelquery;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.sse.core.INodeAdapter;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
/**
*/
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HMQUtil.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HMQUtil.java
index 38574c3a98..7358d82bda 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HMQUtil.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HMQUtil.java
@@ -15,13 +15,13 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.html.core.HTMLCMProperties;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLElementDeclarationAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLElementDeclarationAdapter.java
index 0774d880df..3df666d8f3 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLElementDeclarationAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLElementDeclarationAdapter.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.modelquery;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.sse.core.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
/**
*/
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryAssociationProvider.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryAssociationProvider.java
index 6161a17728..377f521e18 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryAssociationProvider.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryAssociationProvider.java
@@ -12,8 +12,8 @@ package org.eclipse.wst.html.core.modelquery;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.SimpleAssociationProvider;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.SimpleAssociationProvider;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
/**
@@ -21,7 +21,7 @@ import org.eclipse.wst.xml.uriresolver.util.IdResolver;
public class HTMLModelQueryAssociationProvider extends SimpleAssociationProvider {
/**
- * @param modelQueryCMProvider org.eclipse.wst.common.contentmodel.modelquery.ModelQueryCMProvider
+ * @param modelQueryCMProvider org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryCMProvider
*/
public HTMLModelQueryAssociationProvider(CMDocumentCache cache, IdResolver idResolver) {
super(new HTMLModelQueryCMProvider(cache, idResolver));
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java
index c5c11ce428..babc556bd6 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryCMProvider.java
@@ -13,13 +13,13 @@ package org.eclipse.wst.html.core.modelquery;
import java.util.Hashtable;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQueryCMProvider;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.html.core.contentmodel.HTMLCMDocumentFactory;
import org.eclipse.wst.html.core.document.HTMLDocumentTypeEntry;
import org.eclipse.wst.html.core.document.HTMLDocumentTypeRegistry;
import org.eclipse.wst.sse.core.contentmodel.CMDocType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryCMProvider;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.xml.core.document.XMLDocument;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.w3c.dom.Document;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java
index 3e3b9a7d5c..6aa018fa8b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/HTMLModelQueryImpl.java
@@ -14,12 +14,12 @@ package org.eclipse.wst.html.core.modelquery;
import java.util.List;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.ModelQueryImpl;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.html.core.HTMLCMProperties;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.ModelQueryImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.modelquery.MovableModelQuery;
import org.eclipse.wst.xml.core.document.XMLElement;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java
index 9d4169d956..71c6a39940 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java
@@ -18,14 +18,14 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.AbstractAdapterFactory;
import org.eclipse.wst.sse.core.AdapterFactory;
import org.eclipse.wst.sse.core.IModelStateListener;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapter;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapterImpl;
import org.eclipse.wst.sse.core.util.Debug;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/XHTMLAssociationProvider.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/XHTMLAssociationProvider.java
index fe331c4059..22132e6a05 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/XHTMLAssociationProvider.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/XHTMLAssociationProvider.java
@@ -11,9 +11,9 @@
package org.eclipse.wst.html.core.modelquery;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.XMLAssociationProvider;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.XMLAssociationProvider;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.w3c.dom.Document;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/preferences/HTMLContentBuilder.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/preferences/HTMLContentBuilder.java
index 9edaa8e884..0bd9e02c2b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/preferences/HTMLContentBuilder.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/preferences/HTMLContentBuilder.java
@@ -13,14 +13,14 @@ package org.eclipse.wst.html.core.preferences;
import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-public class HTMLContentBuilder extends org.eclipse.wst.common.contentmodel.util.DOMContentBuilderImpl {
+public class HTMLContentBuilder extends org.eclipse.wst.sse.core.internal.contentmodel.util.DOMContentBuilderImpl {
private int fTagCase;
private int fAttrCase;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java
index 38f351d2e1..91cd90490f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/CMUtil.java
@@ -13,16 +13,16 @@ package org.eclipse.wst.html.core.validate;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.modelquery.HMQUtil;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.document.XMLElement;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.w3c.dom.Document;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java
index e392193d3f..999f4e983f 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLAttributeValidator.java
@@ -14,11 +14,11 @@ package org.eclipse.wst.html.core.validate;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.sse.core.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionContainer;
import org.eclipse.wst.sse.core.text.ITextRegionList;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java
index 14e298aed7..87d58df046 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLDocumentContentValidator.java
@@ -15,9 +15,9 @@ import java.util.Iterator;
import java.util.List;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.html.core.HTML40Namespace;
import org.eclipse.wst.sse.core.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.document.DocumentTypeAdapter;
import org.eclipse.wst.xml.core.document.XMLDocument;
import org.eclipse.wst.xml.core.document.XMLNode;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java
index b4c26b4561..2db6e2000b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementAncestorValidator.java
@@ -12,11 +12,11 @@ package org.eclipse.wst.html.core.validate;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.sse.core.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.w3c.dom.Element;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java
index 007c225719..314fa5113b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/HTMLElementContentValidator.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.wst.html.core.validate;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.sse.core.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.eclipse.wst.xml.core.document.XMLText;
import org.w3c.dom.Element;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java
index f2e605da44..fdba55bb19 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/NamespaceValidator.java
@@ -10,10 +10,10 @@
*******************************************************************************/
package org.eclipse.wst.html.core.validate;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.sse.core.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.xml.core.document.XMLAttr;
import org.eclipse.wst.xml.core.document.XMLElement;
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java
index 01b217727e..be2a90e40e 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/SyntaxValidator.java
@@ -12,10 +12,10 @@ package org.eclipse.wst.html.core.validate;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.html.core.document.HTMLDocumentTypeEntry;
import org.eclipse.wst.html.core.document.HTMLDocumentTypeRegistry;
import org.eclipse.wst.sse.core.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
diff --git a/bundles/org.eclipse.wst.html.ui/plugin.xml b/bundles/org.eclipse.wst.html.ui/plugin.xml
index 4fa54cfc6d..014b123dae 100644
--- a/bundles/org.eclipse.wst.html.ui/plugin.xml
+++ b/bundles/org.eclipse.wst.html.ui/plugin.xml
@@ -27,7 +27,6 @@
<import plugin="org.eclipse.wst.html.core"/>
<import plugin="org.eclipse.wst.javascript.common.ui"/>
<import plugin="org.eclipse.wst.xml.core"/>
- <import plugin="org.eclipse.wst.common.contentmodel"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.jdt.ui"/>
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
index f3f5af025c..66a01aacf4 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
@@ -20,9 +20,6 @@ import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.css.ui.contentassist.CSSContentAssistProcessor;
import org.eclipse.wst.html.core.HTML40Namespace;
import org.eclipse.wst.html.core.HTMLCMProperties;
@@ -39,6 +36,9 @@ import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapter;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java
index a056830a9e..df5ca79135 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java
@@ -11,11 +11,11 @@
package org.eclipse.wst.html.ui.internal.contentassist;
import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contentmodel.HTMLElementDeclaration;
import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.xml.ui.contentassist.XMLContentModelGenerator;
import org.w3c.dom.Node;
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java
index e64bb1fe1c..6b42dc7395 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.ui.internal.contentassist;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contentmodel.HTMLElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.ui.contentassist.XMLContentModelGenerator;
import org.w3c.dom.Node;
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/URIHyperlinkDetector.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/URIHyperlinkDetector.java
index 3f1b6b9990..9cb09aecc5 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/URIHyperlinkDetector.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/URIHyperlinkDetector.java
@@ -1,10 +1,10 @@
package org.eclipse.wst.html.ui.internal.hyperlink;
import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.html.ui.internal.Logger;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.sse.core.util.URIResolver;
import org.w3c.dom.Attr;
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java
index ce2e24bfb8..6eb0a5c891 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java
@@ -18,15 +18,15 @@ import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.jface.text.hyperlink.URLHyperlink;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.common.uriresolver.URIResolverPlugin;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.xml.core.document.XMLAttr;
import org.eclipse.wst.xml.core.document.XMLNode;
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLNodeActionManager.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLNodeActionManager.java
index 373cf18f8a..20fd336d40 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLNodeActionManager.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLNodeActionManager.java
@@ -12,8 +12,6 @@ package org.eclipse.wst.html.ui.views.contentoutline;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.util.DOMContentBuilder;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.contenttype.ContentTypeIdForHTML;
import org.eclipse.wst.html.core.format.HTMLFormatProcessorImpl;
@@ -21,6 +19,8 @@ import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
import org.eclipse.wst.html.core.preferences.HTMLContentBuilder;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.format.IStructuredFormatProcessor;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMContentBuilder;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.xml.ui.views.contentoutline.XMLNodeActionManager;
import org.w3c.dom.Document;
diff --git a/bundles/org.eclipse.wst.sse.core/.classpath b/bundles/org.eclipse.wst.sse.core/.classpath
index ea297c9fac..6698eb4b85 100644
--- a/bundles/org.eclipse.wst.sse.core/.classpath
+++ b/bundles/org.eclipse.wst.sse.core/.classpath
@@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-encoding"/>
+ <classpathentry kind="src" path="src-contentmodel"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.wst.sse.core/plugin.xml b/bundles/org.eclipse.wst.sse.core/plugin.xml
index c4448f11c9..04cf9eda30 100644
--- a/bundles/org.eclipse.wst.sse.core/plugin.xml
+++ b/bundles/org.eclipse.wst.sse.core/plugin.xml
@@ -26,7 +26,6 @@
-->
<import plugin="org.eclipse.emf.common" export="true"/>
- <import plugin="org.eclipse.wst.common.contentmodel"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.filebuffers"/>
<import plugin="org.eclipse.wst.xml.uriresolver"/>
@@ -57,4 +56,24 @@
<super type="org.eclipse.core.resources.taskmarker"/>
<persistent value="true"/>
</extension>
+
+
+ <!-- added following from content model plugin.xml -->
+
+
+
+ <extension-point name="%Content_Model_Document_Factories_Extension.name" id="documentFactories"/>
+
+ <extension-point name="%Content_Model_Annotation_Files_Extension.name" id="annotationFiles"/>
+
+ <!-- <extension-point name="DOM Extension Provider" id="DOMExtensionProvider"/>-->
+
+ <extension
+ id="Test"
+ point="org.eclipse.core.runtime.applications">
+ <application>
+ <run class="org.eclipse.wst.sse.core.internal.contentmodel.internal.test.Test"/>
+ </application>
+ </extension>
+
</plugin>
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMAnyElement.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMAnyElement.java
new file mode 100644
index 0000000000..79627a465c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMAnyElement.java
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+/**
+ * CMAnyElement interface
+ */
+public interface CMAnyElement extends CMContent {
+/**
+ * getNamespaceURI method
+ * @return java.lang.String
+ */
+String getNamespaceURI();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMAttributeDeclaration.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMAttributeDeclaration.java
new file mode 100644
index 0000000000..c2a1fbb9b5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMAttributeDeclaration.java
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+import java.util.Enumeration;
+
+/**
+ * AttributeDeclaration interface
+ */
+public interface CMAttributeDeclaration extends CMNode {
+ public static final int OPTIONAL = 1;
+ public static final int REQUIRED = 2;
+ public static final int FIXED = 3;
+ public static final int PROHIBITED = 4;
+/**
+ * getAttrName method
+ * @return java.lang.String
+ */
+String getAttrName();
+/**
+ * getAttrType method
+ * @return CMDataType
+ */
+CMDataType getAttrType();
+/**
+ * getDefaultValue method
+ * @return java.lang.String
+ * @deprecated -- to be replaced in future with additional CMDataType methods (currently found on CMDataTypeHelper)
+ */
+String getDefaultValue();
+/**
+ * getEnumAttr method
+ * @return java.util.Enumeration
+ * @deprecated -- to be replaced in future with additional CMDataType methods (currently found on CMDataTypeHelper)
+ */
+Enumeration getEnumAttr();
+/**
+ * getUsage method
+ * @return int
+ */
+int getUsage();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMContent.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMContent.java
new file mode 100644
index 0000000000..80fe406f1f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMContent.java
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+public interface CMContent extends CMNode
+{
+/**
+ * getMaxOccur method
+ * @return int
+ *
+ * If -1, it's UNBOUNDED.
+ */
+int getMaxOccur();
+/**
+ * getMinOccur method
+ * @return int
+ *
+ * If 0, it's OPTIONAL.
+ * If 1, it's REQUIRED.
+ */
+int getMinOccur();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDataType.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDataType.java
new file mode 100644
index 0000000000..87d784daf8
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDataType.java
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+/**
+ * CMDataType
+ */
+public interface CMDataType extends CMNode {
+
+ // todo... at some point we should remove these names to
+ // avoid exposing implementation details via the interfaces
+ //
+ static final String CDATA = "CDATA";
+ static final String ID = "ID";
+ static final String IDREF = "IDREF";
+ static final String ENTITY = "ENTITY";
+ static final String ENTITIES = "ENTITIES";
+ static final String NOTATION = "NOTATION";
+ static final String NMTOKEN = "NMTOKEN";
+ static final String NMTOKENS = "NMTOKENS";
+ static final String NUMBER = "NUMBER";
+ static final String URI = "URI";
+ static final String ENUM = "ENUM";
+
+ static final int IMPLIED_VALUE_NONE = 1;
+ static final int IMPLIED_VALUE_FIXED = 2;
+ static final int IMPLIED_VALUE_DEFAULT = 3;
+
+/**
+ * getTypeName method
+ * @return java.lang.String
+ */
+String getDataTypeName();
+
+/**
+ * getImpliedValueKind method
+ * @return int
+ *
+ * Returns one of :
+ * IMPLIED_VALUE_NONE, IMPLIED_VALUE_FIXED, IMPLIED_VALUE_DEFAULT.
+ */
+
+int getImpliedValueKind();
+
+/**
+ * getTypeName method
+ * @return java.lang.String
+ *
+ * Returns the implied value or null if none exists.
+ */
+String getImpliedValue();
+
+/**
+ * getTypeName method
+ * @return java.lang.String[]
+ *
+ */
+String[] getEnumeratedValues();
+
+/**
+ * getTypeName method
+ * @return java.lang.String
+ *
+ * This method returns a suitable default value that can be used when an instance of the data type is created.
+ * This returns null of a suitable default is not available.
+ */
+String generateInstanceValue();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDocument.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDocument.java
new file mode 100644
index 0000000000..8b009490ba
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDocument.java
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+/**
+ * CMDocument interface
+ */
+public interface CMDocument extends CMNode {
+/**
+ * getElements method
+ * @return CMNamedNodeMap
+ *
+ * Returns CMNamedNodeMap of ElementDeclaration
+ */
+CMNamedNodeMap getElements();
+/**
+ * getEntities method
+ * @return CMNamedNodeMap
+ *
+ * Returns CMNamedNodeMap of EntityDeclaration
+ */
+CMNamedNodeMap getEntities();
+/**
+ * getNamespace method
+ * @return CMNamespace
+ */
+CMNamespace getNamespace();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDocumentation.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDocumentation.java
new file mode 100644
index 0000000000..30db6655bc
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMDocumentation.java
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+/**
+ * CMDocumentation interface
+ */
+public interface CMDocumentation extends CMNode {
+ public String getValue();
+ public String getLanguage();
+ public String getSource();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMElementDeclaration.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMElementDeclaration.java
new file mode 100644
index 0000000000..b9090a253b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMElementDeclaration.java
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+/**
+ * CMElementDeclaration interface
+ */
+public interface CMElementDeclaration extends CMContent {
+
+ public static final int ANY = 0;
+ public static final int EMPTY = 1;
+ public static final int ELEMENT = 2;
+ public static final int MIXED = 3;
+ public static final int PCDATA = 4;
+ public static final int CDATA = 5; // todo... clarify this one
+/**
+ * getAttributes method
+ * @return CMNamedNodeMap
+ *
+ * Returns CMNamedNodeMap of AttributeDeclaration
+ */
+CMNamedNodeMap getAttributes();
+/**
+ * getCMContent method
+ * @return CMContent
+ *
+ * Returns the root node of this element's content model.
+ * This can be an CMElementDeclaration or a CMGroup
+ */
+CMContent getContent();
+/**
+ * getContentType method
+ * @return int
+ *
+ * Returns one of :
+ * ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA.
+ */
+public int getContentType();
+/**
+ * getElementName method
+ * @return java.lang.String
+ */
+String getElementName();
+
+/**
+ * getDataType method
+ * @return java.lang.String
+ */
+CMDataType getDataType();
+
+/**
+ * getLocalElements method
+ * @return CMNamedNodeMap
+ *
+ * Returns a list of locally defined elements.
+ */
+CMNamedNodeMap getLocalElements();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMEntityDeclaration.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMEntityDeclaration.java
new file mode 100644
index 0000000000..390be6fe1b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMEntityDeclaration.java
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+/**
+ * CMEntityDeclaration interface
+ */
+public interface CMEntityDeclaration extends CMNode {
+
+/**
+ * getName method
+ * @return java.lang.String
+ */
+String getName();
+/**
+ * getValue method
+ * @return java.lang.String
+ */
+String getValue();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMGroup.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMGroup.java
new file mode 100644
index 0000000000..eaff436a5d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMGroup.java
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+/**
+ * CMGroup interface
+ */
+public interface CMGroup extends CMContent {
+
+ static final int ALL = 3;
+ static final int CHOICE = 2;
+ static final int SEQUENCE = 1;
+/**
+ * getChildNodes method
+ * @return CMNodeList
+ *
+ * Returns child CMNodeList, which includes ElementDefinition or CMElement.
+ */
+CMNodeList getChildNodes();
+
+/**
+ * getOperation method
+ * @return int
+ *
+ * Returns one of :
+ * ALONE (a), SEQUENCE (a,b), CHOICE (a|b), ALL (a&b).
+ */
+int getOperator();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNamedNodeMap.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNamedNodeMap.java
new file mode 100644
index 0000000000..a9de05df06
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNamedNodeMap.java
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+import java.util.Iterator;
+/**
+ * NamedCMNodeMap
+ */
+public interface CMNamedNodeMap {
+/**
+ * getLength method
+ * @return int
+ */
+int getLength();
+/**
+ * getNamedItem method
+ * @return CMNode
+ * @param name java.lang.String
+ */
+CMNode getNamedItem(String name);
+/**
+ * item method
+ * @return CMNode
+ * @param index int
+ */
+CMNode item(int index);
+
+/**
+ *
+ */
+Iterator iterator();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNamespace.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNamespace.java
new file mode 100644
index 0000000000..d7def1d388
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNamespace.java
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+/**
+ * CMNamespace interface
+ */
+public interface CMNamespace extends CMNode {
+
+/**
+ * getPrefix method
+ * @return java.lang.String
+ */
+String getPrefix();
+/**
+ * getURI method
+ * @return java.lang.String
+ */
+String getURI();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNode.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNode.java
new file mode 100644
index 0000000000..ab672a65b1
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNode.java
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+/**
+ * CMNode interface
+ */
+public interface CMNode {
+
+ static final int ANY_ELEMENT = 1;
+ static final int ATTRIBUTE_DECLARATION = 2;
+ static final int DATA_TYPE = 3;
+ static final int DOCUMENT = 4;
+ static final int ELEMENT_DECLARATION = 5;
+ static final int ENTITY_DECLARATION = 6;
+ static final int GROUP = 7;
+ static final int NAME_SPACE = 8;
+ static final int DOCUMENTATION = 9;
+/**
+ * getNodeName method
+ * @return java.lang.String
+ */
+String getNodeName();
+/**
+ * getNodeType method
+ * @return int
+ *
+ * Returns one of :
+ *
+ */
+int getNodeType();
+
+/**
+ * supports method
+ * @return boolean
+ *
+ * Returns true if the CMNode supports a specified property
+ *
+ */
+boolean supports(String propertyName);
+
+/**
+ * getProperty method
+ * @return java.lang.Object
+ *
+ * Returns the object property desciped by the propertyName
+ *
+ */
+Object getProperty(String propertyName); //todo throw unsupported property exception
+
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNodeList.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNodeList.java
new file mode 100644
index 0000000000..1ff5c9aa81
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/CMNodeList.java
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+/**
+ * CMNodeList interface
+ */
+public interface CMNodeList {
+
+/**
+ * getLength method
+ * @return int
+ */
+int getLength();
+/**
+ * item method
+ * @return CMNode
+ * @param index int
+ */
+CMNode item(int index);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/ContentModelManager.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/ContentModelManager.java
new file mode 100644
index 0000000000..a7c72138ce
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/ContentModelManager.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2002 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ * Jens Lukowski/Innoopract - initial renaming/restructuring
+ *
+ */
+package org.eclipse.wst.sse.core.internal.contentmodel;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.wst.sse.core.internal.contentmodel.factory.CMDocumentFactory;
+import org.eclipse.wst.sse.core.internal.contentmodel.factory.CMDocumentFactoryRegistry;
+import org.eclipse.wst.sse.core.internal.contentmodel.factory.CMDocumentFactoryRegistryReader;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.annotation.AnnotationFileRegistry;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.annotation.AnnotationFileRegistryReader;
+
+
+/**
+ * ContentModelManager class
+ */
+public class ContentModelManager extends Plugin {
+ // private static InferredGrammarFactory inferredGrammarFactory;
+ private CMDocumentFactoryRegistry cmDocumentFactoryRegistry;
+ private AnnotationFileRegistry annotationFileRegistry;
+
+ private static ContentModelManager instance;
+
+ public ContentModelManager() {
+ super();
+ }
+
+ public static ContentModelManager getInstance() {
+ if (instance == null) {
+ instance = new ContentModelManager();
+ }
+ return instance;
+ }
+
+ public CMDocument createCMDocument(String uri, String resourceType) {
+ if (resourceType == null && uri != null) {
+ int index = uri.lastIndexOf(".");
+ resourceType = uri.substring(index + 1);
+ }
+
+ if (resourceType != null) {
+ resourceType = resourceType.toLowerCase();
+ }
+ CMDocumentFactory factory = getCMDocumentFactoryRegistry().getFactory(resourceType);
+ return factory != null ? factory.createCMDocument(uri) : null;
+ }
+
+
+ private CMDocumentFactoryRegistry getCMDocumentFactoryRegistry() {
+ if (cmDocumentFactoryRegistry == null) {
+ cmDocumentFactoryRegistry = new CMDocumentFactoryRegistry();
+ new CMDocumentFactoryRegistryReader(cmDocumentFactoryRegistry).readRegistry();
+ }
+ return cmDocumentFactoryRegistry;
+ }
+
+
+ public List getAnnotationFiles(String publicId) {
+ return getAnnotationFileRegistry().getAnnotationFiles(publicId);
+ }
+
+
+ private AnnotationFileRegistry getAnnotationFileRegistry() {
+ if (annotationFileRegistry == null) {
+ annotationFileRegistry = new AnnotationFileRegistry();
+ new AnnotationFileRegistryReader(annotationFileRegistry).readRegistry();
+ }
+ return annotationFileRegistry;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/annotation/Annotation.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/annotation/Annotation.java
new file mode 100644
index 0000000000..190a6abb9f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/annotation/Annotation.java
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.annotation;
+
+import java.util.Hashtable;
+import java.util.List;
+
+/**
+ *
+ */
+public class Annotation
+{
+ protected Hashtable hashtable = new Hashtable();
+
+ public Annotation()
+ {
+ }
+
+ public void setSpec(String spec)
+ {
+ hashtable.put("spec", spec);
+ }
+
+ public String getSpec()
+ {
+ return (String)hashtable.get("spec");
+ }
+
+ public void setProperty(String name, String value)
+ {
+ hashtable.put(name, value);
+ }
+
+ public String getProperty(String propertyName)
+ {
+ return (String)hashtable.get(propertyName);
+ }
+
+ public List getAttributeList()
+ {
+ return null; // todo
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/annotation/AnnotationMap.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/annotation/AnnotationMap.java
new file mode 100644
index 0000000000..6f3c90f645
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/annotation/AnnotationMap.java
@@ -0,0 +1,116 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.annotation;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.annotation.*;
+
+
+/**
+ * AnnotationMap
+ */
+public class AnnotationMap
+{
+ protected List list = new Vector();
+ protected Hashtable hashtable = new Hashtable();
+ protected boolean isCaseSensitive = true;
+
+ public AnnotationMap()
+ {
+ }
+
+ public void setCaseSensitive(boolean isCaseSensitive)
+ {
+ this.isCaseSensitive = isCaseSensitive;
+ }
+
+ public void addAnnotation(Annotation annotation)
+ {
+ String spec = annotation.getSpec();
+ if (spec != null)
+ {
+ list.add(annotation);
+ StringTokenizer st = new StringTokenizer(spec, "[]|\t\n\r\f ");
+ while (st.hasMoreTokens())
+ {
+ String cmNodeSpec = st.nextToken();
+ addAnnotationForCMNodeSpec(cmNodeSpec, annotation);
+ }
+ }
+ }
+
+ protected void addAnnotationForCMNodeSpec(String cmNodeSpec, Annotation annotation)
+ {
+ String key = isCaseSensitive ? cmNodeSpec : cmNodeSpec.toLowerCase();
+ List list = (List)hashtable.get(key);
+ if (list == null)
+ {
+ list = new Vector();
+
+ hashtable.put(key, list);
+ }
+ list.add(annotation);
+ }
+
+ public String getProperty(String cmNodeSpec, String propertyName)
+ {
+ String result = null;
+ String key = isCaseSensitive ? cmNodeSpec : cmNodeSpec.toLowerCase();
+ List annotationList = (List)hashtable.get(key);
+ if (annotationList != null)
+ {
+ for (Iterator i = annotationList.iterator(); i.hasNext(); )
+ {
+ Annotation annotation = (Annotation)i.next();
+ result = annotation.getProperty(propertyName);
+ if (result != null)
+ {
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+ public String getProperty(CMNode cmNode, String propertyName)
+ {
+ String result = null;
+ String cmNodeSpec = (String)cmNode.getProperty("spec");
+ if (cmNodeSpec == null)
+ {
+ cmNodeSpec = cmNode.getNodeName();
+ }
+ if (cmNodeSpec != null)
+ {
+ result = getProperty(cmNodeSpec, propertyName);
+ }
+ return result;
+ }
+
+ public List getAnnotations()
+ {
+ return list;
+ }
+
+ public void load(String uri) throws Exception
+ {
+ AnnotationFileParser parser = new AnnotationFileParser();
+ parser.parse(this, uri);
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMAnyElementImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMAnyElementImpl.java
new file mode 100644
index 0000000000..806c922f83
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMAnyElementImpl.java
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+
+
+public class CMAnyElementImpl extends CMContentImpl implements CMAnyElement
+{
+ protected String namespaceURI;
+
+ public CMAnyElementImpl(String namespaceURI)
+ {
+ this.namespaceURI = namespaceURI;
+ minOccur = -1;
+ }
+
+ public static String computeNodeName(String uri)
+ {
+ return uri != null ? ("any#" + uri) : "any";
+ }
+
+ // implements CMNode
+ //
+ public String getNodeName()
+ {
+ return computeNodeName(namespaceURI);
+ }
+
+ public int getNodeType()
+ {
+ return ANY_ELEMENT;
+ }
+
+ // implements CMAnyElement
+ //
+ public String getNamespaceURI()
+ {
+ return namespaceURI;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMAttributeDeclarationImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMAttributeDeclarationImpl.java
new file mode 100644
index 0000000000..800c1eff6c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMAttributeDeclarationImpl.java
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import java.util.Enumeration;
+import java.util.List;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+
+
+public class CMAttributeDeclarationImpl extends CMNodeImpl implements CMAttributeDeclaration
+{
+ protected CMDataType dataType;
+ protected String nodeName;
+ protected int usage;
+ protected CMDocument cmDocument;
+ protected boolean prefixQualification;
+ protected List xsiTypes;
+
+ public CMAttributeDeclarationImpl(String nodeName, int usage)
+ {
+ this(nodeName, usage, null);
+ }
+
+ public CMAttributeDeclarationImpl(String nodeName, int usage, CMDataType dataType)
+ {
+ this.nodeName = nodeName;
+ this.usage = usage;
+ this.dataType = dataType;
+ }
+
+ public int getNodeType()
+ {
+ return CMNode.ATTRIBUTE_DECLARATION;
+ }
+
+ public Object getProperty(String propertyName)
+ {
+ Object result = null;
+ if (propertyName.equals("CMDocument"))
+ {
+ result = cmDocument;
+ }
+ else if (propertyName.equals("XSITypes"))
+ {
+ result = xsiTypes;
+ }
+ else if (propertyName.equals("http://org.eclipse.wst/cm/properties/nsPrefixQualification"))
+ {
+ result = prefixQualification ? "qualified" : "unqualified";
+ }
+ else
+ {
+ result = super.getProperty(propertyName);
+ }
+ return result;
+ }
+
+ public void setPrefixQualification(boolean qualified)
+ {
+ prefixQualification = qualified;
+ }
+
+ public void setXSITypes(List list)
+ {
+ xsiTypes = list;
+ }
+
+ public void setCMDocument(CMDocument cmDocument)
+ {
+ this.cmDocument = cmDocument;
+ }
+
+ public String getNodeName()
+ {
+ return nodeName;
+ }
+
+ public String getAttrName()
+ {
+ return nodeName;
+ }
+
+ public void setAttrType(CMDataType dataType)
+ {
+ this.dataType = dataType;
+ }
+
+ public CMDataType getAttrType()
+ {
+ return dataType;
+ }
+
+ public int getUsage()
+ {
+ return usage;
+ }
+
+ /** @deprecated */
+ public String getDefaultValue()
+ {
+ return "";
+ }
+
+ /** @deprecated */
+ public Enumeration getEnumAttr()
+ {
+ return null;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMContentImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMContentImpl.java
new file mode 100644
index 0000000000..40b587b9cb
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMContentImpl.java
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+
+
+public abstract class CMContentImpl extends CMNodeImpl implements CMContent
+{
+ protected int minOccur = 0;
+ protected int maxOccur = -1;
+
+ // implements CMContent
+ //
+ public int getMaxOccur()
+ {
+ return maxOccur;
+ }
+
+ public int getMinOccur()
+ {
+ return minOccur;
+ }
+
+ // implementation specific
+ //
+ public void setMaxOccur(int n)
+ {
+ maxOccur = n;
+ }
+
+ public void setMinOccur(int n)
+ {
+ minOccur = n;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMDataTypeImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMDataTypeImpl.java
new file mode 100644
index 0000000000..fb0d3e7753
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMDataTypeImpl.java
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+
+public class CMDataTypeImpl extends CMNodeImpl implements CMDataType
+{
+ protected String dataTypeName;
+ protected String[] enumeratedValues;
+ protected String instanceValue;
+
+ public CMDataTypeImpl(String dataTypeName, String instanceValue)
+ {
+ this.dataTypeName = dataTypeName;
+ this.instanceValue = instanceValue;
+ this.enumeratedValues = new String[0];
+ }
+
+ public CMDataTypeImpl(String dataTypeName, String[] enumeratedValues)
+ {
+ this.dataTypeName = dataTypeName;
+ this.enumeratedValues = enumeratedValues;
+ this.instanceValue = enumeratedValues[0];
+ }
+
+
+ public int getNodeType()
+ {
+ return CMNode.DATA_TYPE;
+ }
+
+ public String getNodeName()
+ {
+ return getDataTypeName();
+ }
+
+ public String getDataTypeName()
+ {
+ return dataTypeName;
+ }
+
+ public int getImpliedValueKind()
+ {
+ return IMPLIED_VALUE_NONE;
+ }
+
+ public String getImpliedValue()
+ {
+ return null;
+ }
+
+ public String[] getEnumeratedValues()
+ {
+ return enumeratedValues;
+ }
+
+ public String generateInstanceValue()
+ {
+ return instanceValue;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMDocumentImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMDocumentImpl.java
new file mode 100644
index 0000000000..ea60aab9c3
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMDocumentImpl.java
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
+
+
+public class CMDocumentImpl extends CMNodeImpl implements CMDocument
+{
+ protected String targetNamespace;
+ protected CMNamedNodeMapImpl elements = new CMNamedNodeMapImpl();
+ protected CMNamedNodeMapImpl localElementPool;
+ protected CMNamedNodeMapImpl anyElements;
+
+ public CMDocumentImpl(String targetNamespace)
+ {
+ this.targetNamespace = targetNamespace;
+ }
+
+ public int getNodeType()
+ {
+ return DOCUMENT;
+ }
+
+ public String getNodeName()
+ {
+ return "";
+ }
+
+ public Object getProperty(String propertyName)
+ {
+ Object result = null;
+ if (propertyName.equals("http://org.eclipse.wst/cm/properties/targetNamespaceURI"))
+ {
+ result = targetNamespace;
+ }
+ else
+ {
+ result = super.getProperty(propertyName);
+ }
+ return result;
+ }
+
+ public CMNamedNodeMap getElements()
+ {
+ return elements;
+ }
+
+ public CMNamedNodeMapImpl getAnyElements()
+ {
+ if (anyElements == null)
+ {
+ anyElements = new CMNamedNodeMapImpl();
+ }
+ return anyElements;
+ }
+
+ public CMNamedNodeMapImpl getLocalElementPool()
+ {
+ if (localElementPool == null)
+ {
+ localElementPool = new CMNamedNodeMapImpl();
+ }
+ return localElementPool;
+ }
+
+ public CMNamedNodeMap getEntities()
+ {
+ return new CMNamedNodeMapImpl();
+ }
+
+ public CMNamespace getNamespace()
+ {
+ return null;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMElementDeclarationImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMElementDeclarationImpl.java
new file mode 100644
index 0000000000..7dc93e7184
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMElementDeclarationImpl.java
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+
+
+public class CMElementDeclarationImpl extends CMContentImpl implements CMElementDeclaration
+{
+ protected String name;
+ protected CMDocument cmDocument;
+ protected CMNamedNodeMapImpl attributeMap = new CMNamedNodeMapImpl();
+ protected CMNamedNodeMapImpl localElementMap = new CMNamedNodeMapImpl();
+ protected CMContent content;
+ protected CMDataType dataType;
+ protected boolean isLocal;
+
+ public CMElementDeclarationImpl(CMDocument cmDocument, String name)
+ {
+ this.cmDocument = cmDocument;
+ this.name = name;
+ }
+
+ // implements CMNode
+ //
+ public String getNodeName()
+ {
+ return name;
+ }
+
+ public int getNodeType()
+ {
+ return ELEMENT_DECLARATION;
+ }
+
+ public Object getProperty(String propertyName)
+ {
+ Object result = null;
+ if (propertyName.equals("http://org.eclipse.wst/cm/properties/nsPrefixQualification"))
+ {
+ result = isLocal ? "unqualified" : "qualified";
+ }
+ else if (propertyName.equals("CMDocument"))
+ {
+ result = cmDocument;
+ }
+ else
+ {
+ result = super.getProperty(propertyName);
+ }
+ return result;
+ }
+
+ // implements CMElementDeclaration
+ //
+ public CMNamedNodeMap getAttributes()
+ {
+ return attributeMap;
+ }
+
+ public CMContent getContent()
+ {
+ return content;
+ }
+
+ public int getContentType()
+ {
+ return MIXED;
+ }
+
+ public String getElementName()
+ {
+ return name;
+ }
+
+ public CMDataType getDataType()
+ {
+ return dataType;
+ }
+
+ public CMNamedNodeMap getLocalElements()
+ {
+ return localElementMap;
+ }
+
+ //
+ //
+ public void setContent(CMContent cmContent)
+ {
+ content = cmContent;
+ }
+
+ public void setDataType(CMDataType cmDataType)
+ {
+ dataType = cmDataType;
+ }
+
+ public CMNamedNodeMapImpl getAttributeMap()
+ {
+ return attributeMap;
+ }
+
+ public void setLocal(boolean isLocal)
+ {
+ this.isLocal = isLocal;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMEntityDeclarationImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMEntityDeclarationImpl.java
new file mode 100644
index 0000000000..de76c5f23a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMEntityDeclarationImpl.java
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMEntityDeclaration;
+
+public class CMEntityDeclarationImpl extends CMNodeImpl implements CMEntityDeclaration
+{
+ protected String name;
+ protected String value;
+
+ public CMEntityDeclarationImpl(String name, String value)
+ {
+ this.name = name;
+ this.value = value;
+ }
+
+ public int getNodeType()
+ {
+ return ENTITY_DECLARATION;
+ }
+
+ public String getNodeName()
+ {
+ return name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMGroupImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMGroupImpl.java
new file mode 100644
index 0000000000..7820ca05b4
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMGroupImpl.java
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+
+public class CMGroupImpl extends CMContentImpl implements CMGroup
+{
+ protected CMNodeList nodeList;
+ protected int operator;
+
+ public CMGroupImpl(CMNodeList nodeList, int operator)
+ {
+ this.nodeList = nodeList;
+ this.operator = operator;
+ }
+
+ public int getNodeType()
+ {
+ return GROUP;
+ }
+
+ public CMNodeList getChildNodes()
+ {
+ return nodeList;
+ }
+
+ public int getOperator()
+ {
+ return operator;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNamedNodeMapImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNamedNodeMapImpl.java
new file mode 100644
index 0000000000..ffaf47e272
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNamedNodeMapImpl.java
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+
+
+
+public class CMNamedNodeMapImpl implements CMNamedNodeMap
+{
+ public static CMNamedNodeMapImpl EMPTY_NAMED_NODE_MAP = new CMNamedNodeMapImpl();
+ protected Hashtable table = new Hashtable();
+
+ /**
+ * CMNamedNodeMapImpl constructor comment.
+ */
+ public CMNamedNodeMapImpl()
+ {
+ super();
+ }
+
+ /**
+ * getLength method
+ * @return int
+ */
+ public int getLength()
+ {
+ return table.size();
+ }
+
+ /**
+ * getNamedItem method
+ * @return CMNode
+ * @param name java.lang.String
+ */
+ public CMNode getNamedItem(String name)
+ {
+ return (CMNode)table.get(name);
+ }
+
+ /**
+ * item method
+ * @return CMNode
+ * @param index int
+ */
+ public CMNode item(int index)
+ {
+ CMNode result = null;
+ int size = table.size();
+ if (index < size)
+ {
+ Enumeration values = table.elements();
+ for(int i = 0; i <= index; i++)
+ {
+ result = (CMNode)values.nextElement();
+ }
+ }
+ return result;
+ }
+
+ public Hashtable getHashtable()
+ {
+ return table;
+ }
+
+ public Iterator iterator()
+ {
+ return table.values().iterator();
+ }
+
+ public void put(CMNode cmNode)
+ {
+ table.put(cmNode.getNodeName(), cmNode);
+ }
+}
+
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNodeImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNodeImpl.java
new file mode 100644
index 0000000000..d8466531a0
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNodeImpl.java
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+
+
+public abstract class CMNodeImpl implements CMNode
+{
+ protected boolean isInferred = false;
+
+ public String getNodeName()
+ {
+ return "";
+ }
+
+ public boolean supports(String propertyName)
+ {
+ return false;
+ }
+
+ public Object getProperty(String propertyName)
+ {
+ Object result = null;
+ if ("isInferred".equals(propertyName))
+ {
+ result = isInferred ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return result;
+ }
+
+ public void setInferred(boolean isInferred)
+ {
+ this.isInferred = isInferred;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNodeListImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNodeListImpl.java
new file mode 100644
index 0000000000..09ce4134d2
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/basic/CMNodeListImpl.java
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.basic;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+
+
+public class CMNodeListImpl implements CMNodeList
+{
+ public static CMNodeListImpl EMPTY_NODE_LIST = new CMNodeListImpl(Collections.EMPTY_LIST);
+ protected List list;
+
+ public CMNodeListImpl()
+ {
+ this(new Vector());
+ }
+
+ public CMNodeListImpl(List list)
+ {
+ this.list = list;
+ }
+
+ /**
+ * getLength method
+ * @return int
+ */
+ public int getLength()
+ {
+ return list.size();
+ }
+ /**
+ * item method
+ * @return CMNode
+ * @param index int
+ */
+ public CMNode item(int index)
+ {
+ return (CMNode)list.get(index);
+ }
+
+ public List getList()
+ {
+ return list;
+ }
+
+ public Iterator iterator()
+ {
+ return list.iterator();
+ }
+
+ public boolean contains(CMNode cmNode)
+ {
+ return list.contains(cmNode);
+ }
+
+ public void add(CMNode cmNode)
+ {
+ list.add(cmNode);
+ }
+}
+
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactory.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactory.java
new file mode 100644
index 0000000000..7f8c72e158
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactory.java
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.factory;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+
+// this interface is used to build a grammar document given a local file name
+//
+public interface CMDocumentFactory
+{
+ public CMDocument createCMDocument(String uri);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryDescriptor.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryDescriptor.java
new file mode 100644
index 0000000000..423631d20f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryDescriptor.java
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.factory;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+
+
+public class CMDocumentFactoryDescriptor
+{
+ private IConfigurationElement fElement;
+ private CMDocumentFactory factory;
+
+ public CMDocumentFactoryDescriptor(IConfigurationElement element)
+ {
+ this.fElement = element;
+ }
+
+ public CMDocumentFactory getFactory()
+ {
+ if (factory == null)
+ {
+ try
+ {
+ factory = (CMDocumentFactory) fElement.createExecutableExtension("class");
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ return factory;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryRegistry.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryRegistry.java
new file mode 100644
index 0000000000..0b3e021da9
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryRegistry.java
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.factory;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+/**
+ *
+ *
+ */
+public class CMDocumentFactoryRegistry //implements CMDocumentFactoryRegistry
+{
+ protected static CMDocumentFactoryRegistry instance;
+
+ private static String DEFAULT_RESOURCE_TYPE = "*";
+
+ protected Map resourceTypeMap = new HashMap();
+
+ protected Vector documentBuilderList = new Vector();
+
+ public CMDocumentFactoryRegistry()
+ {
+ }
+
+ public void putFactory(String resourceType, CMDocumentFactoryDescriptor factoryDescriptor)
+ {
+ resourceTypeMap.put(resourceType, factoryDescriptor);
+ }
+
+/*
+ public CMDocument buildCMDocument(String uri, String resourceType)
+ {
+ CMDocument result = null;
+ CMDocumentFactory factory = getFactory(resourceType);
+ if (factory != null)
+ {
+ result = factory.createCMDocument(uri);
+ }
+ return result;
+ }
+*/
+ public CMDocumentFactory getFactory(String resourceType)
+ {
+ CMDocumentFactoryDescriptor factoryDescriptor = null;
+ if (resourceType != null)
+ {
+ factoryDescriptor = (CMDocumentFactoryDescriptor) resourceTypeMap.get(resourceType);
+ }
+ if (factoryDescriptor == null)
+ {
+ factoryDescriptor = (CMDocumentFactoryDescriptor) resourceTypeMap.get(DEFAULT_RESOURCE_TYPE);
+ }
+ return factoryDescriptor != null ? factoryDescriptor.getFactory() : null;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryRegistryReader.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryRegistryReader.java
new file mode 100644
index 0000000000..03b61b5f40
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/factory/CMDocumentFactoryRegistryReader.java
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.factory;
+
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
+
+
+
+
+public class CMDocumentFactoryRegistryReader
+{
+ protected static final String EXTENSION_POINT_ID = "documentFactories";
+ protected static final String TAG_NAME = "factory";
+ protected static final String ATT_CLASS = "class";
+ protected static final String ATT_TYPE = "type";
+ protected String pluginId, extensionPointId;
+
+ protected CMDocumentFactoryRegistry registry;
+
+ public CMDocumentFactoryRegistryReader(CMDocumentFactoryRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ public void readRegistry()
+ {
+ String bundleid = "org.eclipse.wst.sse.core";
+ IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(bundleid, EXTENSION_POINT_ID);
+ if (point != null)
+ {
+ IConfigurationElement[] elements = point.getConfigurationElements();
+ for (int i = 0; i < elements.length; i++)
+ {
+ readElement(elements[i]);
+ }
+ }
+ }
+
+ protected void readElement(IConfigurationElement element)
+ {
+ if (element.getName().equals(TAG_NAME))
+ {
+ String factoryClass = element.getAttribute(ATT_CLASS);
+ String filenameExtensions = element.getAttribute(ATT_TYPE);
+ if (factoryClass != null && filenameExtensions != null)
+ {
+ try
+ {
+ CMDocumentFactoryDescriptor descriptor = new CMDocumentFactoryDescriptor(element);
+ for (StringTokenizer st = new StringTokenizer(filenameExtensions, ","); st.hasMoreTokens(); )
+ {
+ String token = st.nextToken().trim();
+ registry.putFactory(token, descriptor);
+ }
+ }
+ catch (Exception e)
+ {
+ }
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileParser.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileParser.java
new file mode 100644
index 0000000000..66bcb20d6c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileParser.java
@@ -0,0 +1,218 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.annotation;
+
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.net.URL;
+import java.util.ResourceBundle;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.annotation.Annotation;
+import org.eclipse.wst.sse.core.internal.contentmodel.annotation.AnnotationMap;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+
+/**
+ *
+ */
+public class AnnotationFileParser
+{
+ public static final String TAG_ID_ANNOTATIONS = "abstractGrammarAnnotations";
+ public static final String TAG_ID_ANNOTATION = "annotation";
+ public static final String TAG_ID_PROPERTY = "property";
+
+ /**
+ * This method is called to parse an annotation file and store the contents into an annotationMap
+ */
+ protected void parse(AnnotationMap annotationMap, InputStream input, String baseURI) throws Exception
+ {
+ // move to Xerces-2.... add 'contextClassLoader' stuff
+ ClassLoader prevClassLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ SAXParserFactory factory = SAXParserFactory.newInstance();
+ factory.setNamespaceAware(true);
+ SAXParser parser = factory.newSAXParser();
+ parser.parse(new InputSource(input), new AnnotationMapContentHandler(annotationMap, baseURI));
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(prevClassLoader);
+ }
+ }
+
+ /**
+ * This method is called to parse an annotation file and store the contents into an annotationMap
+ */
+ public void parse(AnnotationMap map, String uri) throws Exception
+ {
+ InputStream inputStream = null;
+ try
+ {
+ URL url = new URL(uri);
+ inputStream = url.openStream();
+ int index = uri.lastIndexOf("/");
+ if (index == -1)
+ {
+ throw new Exception("malformed uri");
+ }
+ String baseURI = uri.substring(0, index);
+ parse(map, inputStream, baseURI);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ throw(e);
+ }
+ finally
+ {
+ try
+ {
+ inputStream.close();
+ }
+ catch (Exception e)
+ {
+ }
+ }
+ }
+
+
+ protected String quote(String string)
+ {
+ return "\"" + string + "\"";
+ }
+
+
+ protected void printlnIndented(PrintStream out, int indent, String string)
+ {
+ for (int i = 0; i < indent; i++)
+ {
+ out.print(" ");
+ }
+ out.println(string);
+ }
+
+
+ protected class AnnotationMapContentHandler extends DefaultHandler
+ {
+ protected AnnotationMap annotationMap;
+ protected Annotation currentAnnotation;
+ protected String currentPropertyName;
+ protected StringBuffer propertyValueBuffer;
+ protected ResourceBundle resourceBundle;
+ protected String baseURI;
+
+ public AnnotationMapContentHandler(AnnotationMap annotationMap, String baseURI)
+ {
+ this.annotationMap = annotationMap;
+ this.baseURI = baseURI;
+ }
+
+ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
+ {
+ propertyValueBuffer = new StringBuffer();
+ if (localName.equals(TAG_ID_ANNOTATIONS))
+ {
+ int attributesLength = attributes.getLength();
+ for (int i = 0; i < attributesLength; i++)
+ {
+ String attributeName = attributes.getLocalName(i);
+ String attributeValue = attributes.getValue(i);
+ if (attributeName.equals("propertiesLocation"))
+ {
+ String resourceURI = baseURI + "/" + attributeValue;
+ try
+ {
+ resourceBundle = ResourceBundleHelper.getResourceBundle(resourceURI);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ else if (attributeName.equals("caseSensitive"))
+ {
+ if (attributeValue.trim().equals("false"))
+ {
+ annotationMap.setCaseSensitive(false);
+ }
+ }
+ }
+ }
+ else if (localName.equals(TAG_ID_ANNOTATION))
+ {
+ currentAnnotation = null;
+ String specValue = attributes.getValue("spec");
+ if (specValue != null)
+ {
+ currentAnnotation = new Annotation();
+ currentAnnotation.setSpec(specValue);
+ }
+ annotationMap.addAnnotation(currentAnnotation);
+ }
+ else if (localName.equals(TAG_ID_PROPERTY))
+ {
+ if (currentAnnotation != null)
+ {
+ currentPropertyName = attributes.getValue("name");
+ }
+ }
+ }
+
+ public void endElement(String uri, String localName, String qName) throws SAXException
+ {
+ if (currentPropertyName != null && currentAnnotation != null)
+ {
+ String propertyValue = propertyValueBuffer.toString();
+ if (propertyValue != null)
+ {
+ if (propertyValue.startsWith("%") && resourceBundle != null)
+ {
+ try
+ {
+ propertyValue = resourceBundle.getString(propertyValue.substring(1));
+ }
+ catch (Exception e)
+ {
+ // ignore any exception that occurs while trying to fetch a resource
+ }
+ }
+ currentAnnotation.setProperty(currentPropertyName, propertyValue);
+ }
+ }
+
+ if (localName.equals(TAG_ID_ANNOTATION))
+ {
+ currentAnnotation = null;
+ }
+ else if (localName.equals(TAG_ID_PROPERTY))
+ {
+ currentPropertyName = null;
+ }
+ }
+
+ public void characters(char[] ch, int start, int length)
+ {
+ if (currentPropertyName != null && currentAnnotation != null)
+ {
+ propertyValueBuffer.append(ch, start, length);
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileRegistry.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileRegistry.java
new file mode 100644
index 0000000000..e067dbaf81
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileRegistry.java
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.annotation;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This class is used to associate one or more annotation files with a grammar file.
+ *
+ */
+public class AnnotationFileRegistry
+{
+ protected Map map = new HashMap();
+
+ public AnnotationFileRegistry()
+ {
+ new AnnotationFileRegistryReader(this).readRegistry();
+ }
+
+ public synchronized List getAnnotationFiles(String publicId)
+ {
+ Map fileTable = (Map) map.get(publicId);
+ return fileTable != null ? new ArrayList(fileTable.values()) : new ArrayList();
+ }
+
+ public synchronized void addAnnotationFile(String publicId, String annotationFileURI)
+ {
+ Map fileTable = (Map) map.get(publicId);
+ if (fileTable == null)
+ {
+ fileTable = new HashMap();
+ map.put(publicId, fileTable);
+ }
+ fileTable.put(annotationFileURI, annotationFileURI);
+ }
+
+ public synchronized void removeAnnotationFile(String publicId, String annotationFileURI)
+ {
+ Map fileTable = (Map) map.get(publicId);
+ if (fileTable != null)
+ {
+ fileTable.remove(annotationFileURI);
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileRegistryReader.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileRegistryReader.java
new file mode 100644
index 0000000000..6536628ee7
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationFileRegistryReader.java
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.annotation;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IPluginRegistry;
+import org.eclipse.core.runtime.Platform;
+
+
+/**
+* This class reads the plugin manifests and adds each specified gramamr annotation file with the AnnotationProvider
+*/
+public class AnnotationFileRegistryReader
+{
+ protected static final String EXTENSION_POINT_ID = "annotationFiles";
+ protected static final String TAG_NAME = "annotationFile";
+ protected static final String ATT_PUBLIC_ID = "publicId";
+ protected static final String ATT_LOCATION = "location";
+
+ private AnnotationFileRegistry annotationFileRegistry;
+
+ public AnnotationFileRegistryReader(AnnotationFileRegistry annotationFileRegistry)
+ {
+ this.annotationFileRegistry = annotationFileRegistry;
+ }
+
+ /**
+ * read from plugin registry and parse it.
+ */
+ public void readRegistry()
+ {
+ IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
+ String pluginId = "org.eclipse.wst.sse.core";
+ IExtensionPoint point = pluginRegistry.getExtensionPoint(pluginId, EXTENSION_POINT_ID);
+ if (point != null)
+ {
+ IConfigurationElement[] elements = point.getConfigurationElements();
+ for (int i = 0; i < elements.length; i++)
+ {
+ readElement(elements[i]);
+ }
+ }
+ }
+
+ /**
+ * readElement() - parse and deal with an extension like:
+ *
+ * <extension point="org.eclipse.wst.sse.core.internal.contentmodel.util_implementation">
+ * <util_implementation class = corg.eclipse.wst.baseutil.CMUtilImplementationImpl />
+ * </extension>
+ */
+ protected void readElement(IConfigurationElement element)
+ {
+ if (element.getName().equals(TAG_NAME))
+ {
+ String publicId = element.getAttribute(ATT_PUBLIC_ID);
+ String location = element.getAttribute(ATT_LOCATION);
+ if (publicId != null && location != null)
+ {
+ try
+ {
+ URL installURL = element.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
+ String qualifiedLocation = resolve(installURL, location);
+ annotationFileRegistry.addAnnotationFile(publicId, qualifiedLocation);
+ }
+ catch (Exception e)
+ {
+ }
+ }
+ }
+ }
+
+ public String resolve(URL platformURL, String relativePath) throws Exception
+ {
+ URL resolvedURL = Platform.resolve(platformURL);
+ return resolvedURL.toString() + relativePath;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationUtility.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationUtility.java
new file mode 100644
index 0000000000..f76c468b1f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/AnnotationUtility.java
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.annotation;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.ContentModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.annotation.AnnotationMap;
+
+
+/**
+ *
+ */
+public class AnnotationUtility
+{
+ public static void loadAnnotationsForGrammar(String publicId, CMDocument cmDocument)
+ {
+ List annotationFiles = ContentModelManager.getInstance().getAnnotationFiles(publicId);
+ AnnotationMap map = (AnnotationMap) cmDocument.getProperty("annotationMap");
+ if (map != null)
+ {
+ for (Iterator i = annotationFiles.iterator(); i.hasNext();)
+ {
+ try
+ {
+ String annotationFileURI = (String) i.next();
+ AnnotationFileParser parser = new AnnotationFileParser();
+ parser.parse(map, annotationFileURI);
+ }
+ catch (Exception e)
+ {
+ }
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/ResourceBundleHelper.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/ResourceBundleHelper.java
new file mode 100644
index 0000000000..ec3811d6eb
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/annotation/ResourceBundleHelper.java
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.annotation;
+
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.eclipse.core.runtime.Platform;
+
+
+public class ResourceBundleHelper
+{
+ public static ResourceBundle getResourceBundle(String resourceURI, Locale targetLocale) throws Exception
+ {
+ // try to load bundle from the location specified in the resourceURI
+ // we make the assumption that the resourceURI points to the local file system
+
+ int index = resourceURI.lastIndexOf("/");
+ if (index == -1)
+ {
+ throw new Exception("Invalid resourceURI");
+ }
+
+ // Below we set 'resourceDirectory' so that it ends with a '/'.
+ // Here's an excerpt from the ClassLoader Javadoc ...
+ // Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed
+ // to refer to a JAR file which will be opened as needed.
+ //
+ String resourceDirectory = resourceURI.substring(0, index + 1);
+ String resourceBundleName = resourceURI.substring(index + 1);
+
+ // create a class loader with a class path that points to the resource bundle's location
+ //
+ URL[] classpath = new URL[1];
+ classpath[0] = Platform.resolve(new URL(resourceDirectory));
+ ClassLoader resourceLoader = new URLClassLoader(classpath, null);
+
+ return ResourceBundle.getBundle(resourceBundleName, targetLocale, resourceLoader);
+ }
+
+ public static ResourceBundle getResourceBundle(String resourceURI) throws Exception
+ {
+ return getResourceBundle(resourceURI, Locale.getDefault());
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/modelqueryimpl/InferredGrammarFactory.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/modelqueryimpl/InferredGrammarFactory.java
new file mode 100644
index 0000000000..ac421d653b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/modelqueryimpl/InferredGrammarFactory.java
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.modelqueryimpl;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMAnyElementImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMAttributeDeclarationImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMDocumentImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMElementDeclarationImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMGroupImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.basic.CMNodeListImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDescriptionBuilder;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+
+
+public class InferredGrammarFactory
+{
+ public InferredGrammarFactory()
+ {
+ }
+
+ public CMDocument createCMDocument(String uri)
+ {
+ CMDocumentImpl cmdocument =new CMDocumentImpl(uri);
+ cmdocument.setInferred(true);
+ return cmdocument;
+ }
+
+ public CMElementDeclaration createCMElementDeclaration(CMDocument cmDocument, Element element, boolean isLocal)
+ {
+ String localName = element.getLocalName();
+ CMDocumentImpl cmDocumentImpl = (CMDocumentImpl)cmDocument;
+
+ CMNamedNodeMapImpl elementMap = isLocal ?
+ (CMNamedNodeMapImpl)cmDocumentImpl.getLocalElementPool() :
+ (CMNamedNodeMapImpl)cmDocumentImpl.getElements();
+
+ CMElementDeclarationImpl ed = (CMElementDeclarationImpl)elementMap.getNamedItem(localName);
+ if (ed == null)
+ {
+ //System.out.println("create ed " + localName);
+ ed = new CMElementDeclarationImpl(cmDocument, localName);
+ ed.setInferred(true);
+ ed.setLocal(isLocal);
+ ed.setMaxOccur(1);
+ CMGroupImpl group = new CMGroupImpl(new CMNodeListImpl(), CMGroup.CHOICE);
+ group.setInferred(true);
+ group.setMinOccur(0);
+ group.setMaxOccur(-1);
+ ed.setContent(group);
+ elementMap.put(ed);
+ }
+
+ // lookup or create the attributes
+ //
+ NamedNodeMap attributeMap = element.getAttributes();
+ int attributeMapLength = attributeMap.getLength();
+ for (int i = 0; i < attributeMapLength; i++)
+ {
+ Attr attr = (Attr)attributeMap.item(i);
+ CMAttributeDeclarationImpl ad = (CMAttributeDeclarationImpl)ed.getAttributeMap().getNamedItem(attr.getNodeName());
+ if (ad == null)
+ {
+ // todo... use an attribute pool to be more efficient?
+ ad = new CMAttributeDeclarationImpl(attr.getNodeName(), CMAttributeDeclaration.OPTIONAL);
+ ad.setInferred(true);
+ ed.getAttributeMap().put(ad);
+ }
+ }
+ return ed;
+ }
+
+ public void createCMContent(CMDocument parentCMDocument, CMElementDeclaration parentEd, CMDocument childCMDocument, CMElementDeclaration childEd, boolean isLocal, String uri)
+ {
+ // add element to the parent's content
+ // consider all content to be of the form (A | B | C)*
+ //
+ CMGroupImpl group = (CMGroupImpl)parentEd.getContent();
+ CMNodeListImpl groupChildNodeList = (CMNodeListImpl)group.getChildNodes();
+
+ if (parentCMDocument == childCMDocument)
+ {
+ if (!groupChildNodeList.contains(childEd))
+ {
+ groupChildNodeList.add(childEd);
+ }
+ if (isLocal)
+ {
+ CMNamedNodeMapImpl localElementMap = (CMNamedNodeMapImpl)parentEd.getLocalElements();
+ localElementMap.put(childEd);
+ }
+ }
+ else
+ {
+ CMAnyElement cmAnyElement = lookupOrCreateCMAnyElement((CMDocumentImpl)parentCMDocument, uri);
+ if (!groupChildNodeList.contains(cmAnyElement))
+ {
+ groupChildNodeList.add(cmAnyElement);
+ }
+ }
+ }
+
+ protected CMAnyElement lookupOrCreateCMAnyElement(CMDocumentImpl parentCMDocument, String uri)
+ {
+ CMNamedNodeMapImpl anyElementMap = parentCMDocument.getAnyElements();
+ CMAnyElementImpl anyElement = (CMAnyElementImpl)anyElementMap.getNamedItem(CMAnyElementImpl.computeNodeName(uri));
+ if (anyElement == null)
+ {
+ //System.out.println("create anyElement " + uri);
+ anyElement = new CMAnyElementImpl(uri);
+ anyElement.setInferred(true);
+ anyElementMap.put(anyElement);
+ }
+ return anyElement;
+ }
+
+
+ public void debugPrint(Collection collection)
+ {
+ for (Iterator iter = collection.iterator(); iter.hasNext(); )
+ {
+ CMDocument cmDocument = (CMDocument)iter.next();
+ System.out.println("-----------------------------------------------");
+ System.out.println("cmDocument (" + cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI") +")");
+ CMNamedNodeMapImpl elementMap = (CMNamedNodeMapImpl)cmDocument.getElements();
+ int size = elementMap.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ CMElementDeclaration ed = (CMElementDeclaration)elementMap.item(i);
+ CMDescriptionBuilder builder = new CMDescriptionBuilder();
+ System.out.println(" ELEMENT " + ed.getNodeName() + " = " + builder.buildDescription(ed));
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/modelqueryimpl/ModelQueryExtensionManagerImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/modelqueryimpl/ModelQueryExtensionManagerImpl.java
new file mode 100644
index 0000000000..3cac7f6ab9
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/modelqueryimpl/ModelQueryExtensionManagerImpl.java
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.modelqueryimpl;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension.DataTypeValueExtension;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension.ElementContentFilterExtension;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension.ModelQueryExtension;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension.ModelQueryExtensionManager;
+import org.w3c.dom.Element;
+
+
+
+public class ModelQueryExtensionManagerImpl implements ModelQueryExtensionManager
+{
+ protected Hashtable dataTypeValueExtensionTable = new Hashtable();
+ protected List elementContentFilterList = new ArrayList();
+
+ public List getDataTypeValues(Element element, CMNode cmNode)
+ {
+ List list = new Vector();
+ for (Iterator i = dataTypeValueExtensionTable.values().iterator(); i.hasNext();)
+ {
+ DataTypeValueExtension extension = (DataTypeValueExtension)i.next();
+ list.addAll(extension.getDataTypeValues(element, cmNode));
+ }
+ return list;
+ }
+
+ public void filterAvailableElementContent(List list, Element element, CMElementDeclaration ed)
+ {
+ for (Iterator i = elementContentFilterList.iterator(); i.hasNext();)
+ {
+ ElementContentFilterExtension extension = (ElementContentFilterExtension)i.next();
+ extension.filterAvailableElementContent(list, element, ed);
+ }
+ }
+
+ public void addExtension(ModelQueryExtension extension)
+ {
+ if (extension.getType() == ModelQueryExtension.DATA_TYPE_VALUE_EXTENSION)
+ {
+ dataTypeValueExtensionTable.put(extension.getId(), extension);
+ }
+ else if (extension.getType() == ModelQueryExtension.ELEMENT_CONTENT_FILTER)
+ {
+ elementContentFilterList.add(extension);
+ }
+ }
+
+ public void removeExtension(ModelQueryExtension extension)
+ {
+ if (extension.getType() == ModelQueryExtension.DATA_TYPE_VALUE_EXTENSION)
+ {
+ dataTypeValueExtensionTable.remove(extension.getId());
+ }
+ else if (extension.getType() == ModelQueryExtension.ELEMENT_CONTENT_FILTER)
+ {
+ elementContentFilterList.remove(extension);
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/CMPrinter.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/CMPrinter.java
new file mode 100644
index 0000000000..340046856c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/CMPrinter.java
@@ -0,0 +1,329 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.test;
+
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMEntityDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMVisitor;
+
+
+public class CMPrinter extends CMVisitor
+{
+ protected StringBuffer sb = new StringBuffer();
+ protected Vector visitedElements = new Vector();
+
+ /****** formatting ******/
+ protected String indent = "";
+
+ protected void incrementIndent()
+ {
+ indent = indent + " ";
+ }
+
+ protected void decrementIndent()
+ {
+ indent = indent.substring(0, indent.length()-2);
+ }
+
+
+ public void printCMNode(String filename, CMNode cmnode)
+ {
+ visitCMNode(cmnode);
+ try
+ {
+ FileOutputStream fileStream = new FileOutputStream(filename);
+ OutputStreamWriter writer = new OutputStreamWriter(fileStream);
+ writer.write(sb.toString());
+ writer.flush();
+ fileStream.close();
+ }
+ catch (Exception e) {}
+ }
+
+ public void visitCMAnyElement(CMAnyElement anyElement)
+ {
+ sb.append(indent + "<CMAnyElement");
+ printAttributes(sb, anyElement);
+ sb.append(">/n");
+ incrementIndent();
+ printProperties(sb, anyElement);
+ decrementIndent();
+ sb.append(indent + "</CMAnyElement>/n");
+ }
+
+ public void visitCMAttributeDeclaration(CMAttributeDeclaration ad)
+ {
+ sb.append(indent + "<CMAttributeDeclaration");
+ printAttributes(sb, ad);
+ sb.append(">\n");
+ incrementIndent();
+ printProperties(sb, ad);
+ decrementIndent();
+ visitCMNode(ad.getAttrType());
+ sb.append(indent + "</CMAttributeDeclaration>\n");
+ }
+
+ public void visitCMDataType(CMDataType dataType)
+ {
+ sb.append(indent + "<CMDataType");
+ printAttributes(sb, dataType);
+ sb.append(">\n");
+ incrementIndent();
+ sb.append(indent + "<ImpliedValue kind=\"" + dataType.getImpliedValueKind() + "\">");
+ sb.append(dataType.getImpliedValue() + "</ImpliedValue>\n");
+ printEnumeration(sb, dataType.getEnumeratedValues());
+ decrementIndent();
+ sb.append(indent + "</CMDataType>\n");
+ }
+
+ public void visitCMDocument(CMDocument document)
+ {
+ sb.append(indent + "<CMDocument");
+ printAttributes(sb, document);
+ sb.append(">\n");
+ incrementIndent();
+
+ // printEntities(sb, document.getEntities());
+ printProperties(sb, document);
+
+ CMNamedNodeMap map = document.getElements();
+ int size = map.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ visitCMNode(map.item(i));
+ }
+
+ decrementIndent();
+ sb.append(indent + "</CMDocument>\n");
+ }
+
+ public void visitCMGroup(CMGroup group)
+ {
+ sb.append(indent + "<CMGroup");
+ printAttributes(sb, group);
+ sb.append(">\n");
+ incrementIndent();
+
+ CMNodeList nodeList = group.getChildNodes();
+ int size = nodeList.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ visitCMNode(nodeList.item(i));
+ }
+
+ decrementIndent();
+ sb.append(indent + "</CMGroup>\n");
+ }
+
+ public void visitCMElementDeclaration(CMElementDeclaration ed)
+ {
+ if (!visitedElements.contains(ed))
+ {
+ visitedElements.add(ed);
+ sb.append(indent + "<CMElementDeclaration");
+ printAttributes(sb, ed);
+ sb.append(">\n");
+ incrementIndent();
+ printProperties(sb, ed);
+
+ CMNamedNodeMap nodeMap = ed.getAttributes();
+ int size = nodeMap.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ visitCMNode(nodeMap.item(i));
+ }
+
+ visitCMNode(ed.getContent());
+
+ CMDataType dataType = ed.getDataType();
+ if (dataType != null)
+ visitCMNode(dataType);
+
+ decrementIndent();
+ sb.append(indent + "</CMElementDeclaration>\n");
+ }
+ }
+
+
+ public void printEnumeration(StringBuffer sb, String[] values)
+ {
+ if ((values != null) && (values.length > 0))
+ {
+ sb.append(indent + "<Enumeration>\n");
+ incrementIndent();
+
+ for (int i=0; i<values.length; i++)
+ {
+ sb.append(indent + "<Value>" + values[i] + "</Values>\n");
+ }
+
+ decrementIndent();
+ sb.append(indent + "</Enumeration>\n");
+ }
+ }
+
+
+ public void printAttributes(StringBuffer sb, CMNode cmnode)
+ {
+ if (cmnode != null)
+ {
+ sb.append(" nodeName=\"" + cmnode.getNodeName() + "\"");
+ sb.append(" nodeType=\"" + cmnode.getNodeType() + "\"");
+
+ if (cmnode instanceof CMContent)
+ {
+ sb.append(" minOccur=\"" + ((CMContent)cmnode).getMinOccur() + "\"");
+ sb.append(" maxOccur=\"" + ((CMContent)cmnode).getMaxOccur() + "\"");
+ }
+ if (cmnode instanceof CMAnyElement)
+ {
+ sb.append(" namespaceURI=\"" + ((CMAnyElement)cmnode).getNamespaceURI() + "\"");
+ }
+ if (cmnode instanceof CMAttributeDeclaration)
+ {
+ sb.append(" uasage=\"" + ((CMAttributeDeclaration)cmnode).getUsage() + "\"");
+ sb.append(" defaultValue=\"" + ((CMAttributeDeclaration)cmnode).getDefaultValue() + "\"");
+ }
+ if (cmnode instanceof CMDataType)
+ {
+ sb.append(" instanceValue=\"" + ((CMDataType)cmnode).generateInstanceValue() + "\"");
+ }
+ if (cmnode instanceof CMEntityDeclaration)
+ {
+ String value = ((CMEntityDeclaration)cmnode).getValue();
+ if (value.indexOf("\"") == -1) sb.append(" value=\"" + value + "\"");
+ else sb.append(" value=\"" + value + "\"");
+ }
+ if (cmnode instanceof CMGroup)
+ {
+ sb.append(" operator=\"" + ((CMGroup)cmnode).getOperator() + "\"");
+ }
+ if (cmnode instanceof CMElementDeclaration)
+ {
+ sb.append(" contentType=\"" + ((CMElementDeclaration)cmnode).getContentType() + "\"");
+ }
+ }
+ }
+
+
+ public void printEntities(StringBuffer sb, CMNamedNodeMap entities)
+ {
+ if ((entities != null) && (entities.getLength()>0))
+ {
+ sb.append(indent + "<Entities>\n");
+ incrementIndent();
+
+ for (Iterator i = entities.iterator(); i.hasNext();)
+ {
+ CMEntityDeclaration entity = (CMEntityDeclaration)i.next();
+ sb.append(indent + "<Entity");
+ printAttributes(sb, entity);
+ sb.append("/>\n");
+ }
+
+ decrementIndent();
+ sb.append(indent + "</Entities>\n");
+ }
+ }
+
+ public void printProperties(StringBuffer sb, CMNode cmnode)
+ {
+ List properties = getProperties(cmnode);
+ sb.append(indent + "<Properties>\n");
+ incrementIndent();
+
+ for (int i=0; i<properties.size(); i++)
+ {
+ String property = (String)properties.get(i);
+ sb.append(indent + "<Property name=\"" + property + "\"");
+
+ if (cmnode.supports(property))
+ {
+ sb.append(" supports=\"true\"");
+ }
+ else
+ {
+ sb.append(" supports=\"false\"");
+ }
+ Object value = cmnode.getProperty(property);
+ if (value instanceof String) sb.append(" value=\"" + (String)value + "\"");
+ else if (value instanceof Boolean) sb.append(" value=\"" + value + "\"");
+ else if (value != null) sb.append(" value=\"" + value.getClass() + "\"");
+ else sb.append(" value=\"null\"");
+ sb.append("/>\n");
+ }
+
+ decrementIndent();
+ sb.append(indent + "</Properties>\n");
+ }
+
+ public List getProperties(CMNode cmnode)
+ {
+ List properties = new Vector();
+
+ if (cmnode != null)
+ {
+ properties.add("CMDocument");
+ properties.add("documentation");
+ properties.add("http://org.eclipse.wst/cm/properties/usesLocalElementDeclarations");
+ properties.add("http://org.eclipse.wst/cm/properties/isNameSpaceAware");
+ properties.add("http://org.eclipse.wst/cm/properties/nsPrefixQualification");
+ properties.add("http://org.eclipse.wst/cm/properties/nillable");
+ properties.add("http://org.eclipse.wst/cm/properties/mofNotifier");
+ properties.add("spec");
+
+ if (cmnode instanceof CMElementDeclaration)
+ {
+ properties.add("http://org.eclipse.wst/cm/properties/definitionInfo");
+ properties.add("http://org.eclipse.wst/cm/properties/definition");
+ properties.add("XSITypes");
+ properties.add("DerivedElementDeclaration");
+ // properties.add("SubstitutionGroup"); Currrently broken for nexted xsd files
+ properties.add("Abstract");
+ }
+ if (cmnode instanceof CMDocument)
+ {
+ properties.add("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ properties.add("http://org.eclipse.wst/cm/properties/importedNamespaceInfo");
+ properties.add("http://org.eclipse.wst/cm/properties/namespaceInfo");
+ properties.add("http://org.eclipse.wst/cm/properties/elementFormDefault");
+ properties.add("annotationMap");
+ properties.add("encodingInfo");
+ }
+ // properties defines but not used
+ // properties.add("documentationSource");
+ // properties.add("documentationLanguage");
+ // properties.add("isValidEmptyValue");
+ // properties.add("http://org.eclipse.wst/cm/properties/defaultRootName");
+ }
+ return properties;
+ }
+
+}
+
+
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/CMUtility.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/CMUtility.java
new file mode 100644
index 0000000000..5cfd8762c8
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/CMUtility.java
@@ -0,0 +1,151 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.test;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMVisitor;
+
+
+public class CMUtility
+{
+ /**
+ * return true if the child or any of its ancestor group nodes are repeatable
+ */
+ public static boolean isNodeOrAncestorGroupRepeatable(CMContent content, CMNode child)
+ {
+ // since we can't walk up the CMNode tree (why you ask? ... its a long story)
+ // we walk down the tree to consider the child's parent node's
+ //
+ boolean result = isRepeatable(child);
+ if (!result)
+ {
+ CanRepeatVisitor visitor = new CanRepeatVisitor(content, child);
+ visitor.visitCMNode(content);
+ result = visitor.getResult();
+ }
+ return result;
+ }
+
+ /**
+ * return true if the child is repeatable
+ */
+ public static boolean isNodeRepeatable(CMContent content, CMNode child)
+ {
+ // since we can't walk up the CMNode tree (why you ask? ... its a long story)
+ // we walk down the tree to consider the child's parent node's
+ //
+ boolean result = isRepeatable(child);
+ if (!result)
+ {
+ IsRepeatableVisitor visitor = new IsRepeatableVisitor(content, child);
+ visitor.visitCMNode(content);
+ result = visitor.getResult();
+ }
+ return result;
+ }
+
+ public static boolean isRepeatable(CMNode child)
+ {
+ boolean result = false;
+ if (child instanceof CMContent)
+ {
+ CMContent content = (CMContent)child;
+ result = content.getMaxOccur() > 1 || content.getMaxOccur() == -1;
+ }
+ return result;
+ }
+
+
+ protected static class CanRepeatVisitor extends CMVisitor
+ {
+ public boolean result;
+ protected boolean isWithinRepeatableGroup;
+
+ protected CMNode root;
+ protected CMNode target;
+
+ public CanRepeatVisitor(CMNode root, CMNode target)
+ {
+ this.root = root;
+ this.target = target;
+ }
+
+ public void visitCMGroup(CMGroup group)
+ {
+ boolean oldIsWithinRepeatableGroup = isWithinRepeatableGroup;
+
+ isWithinRepeatableGroup = isRepeatable(group);
+
+ super.visitCMGroup(group);
+
+ isWithinRepeatableGroup = oldIsWithinRepeatableGroup;
+ }
+
+ public void visitCMElementDeclaration(CMElementDeclaration cmelement)
+ {
+ if (cmelement == target)
+ {
+ result = isWithinRepeatableGroup;
+ }
+ }
+
+ public boolean getResult()
+ {
+ return result;
+ }
+ }
+
+
+ protected static class IsRepeatableVisitor extends CMVisitor
+ {
+ public boolean result = false;;
+ protected CMGroup currentGroup;
+
+ protected CMNode root;
+ protected CMNode target;
+
+ public IsRepeatableVisitor(CMNode root, CMNode target)
+ {
+ this.root = root;
+ this.target = target;
+ }
+
+ public void visitCMGroup(CMGroup group)
+ {
+ CMGroup previousGroup = currentGroup;
+ currentGroup = group;
+ super.visitCMGroup(group);
+ currentGroup = previousGroup;
+ }
+
+ public void visitCMElementDeclaration(CMElementDeclaration cmelement)
+ {
+ if (cmelement == target)
+ {
+ if (currentGroup != null)
+ {
+ result = ((currentGroup.getOperator() == CMGroup.CHOICE) &&
+ (isRepeatable(currentGroup)));
+ }
+ }
+ }
+
+ public boolean getResult()
+ {
+ return result;
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/Test.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/Test.java
new file mode 100644
index 0000000000..3e7dbdd98f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/test/Test.java
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.test;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.eclipse.core.runtime.IPlatformRunnable;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.ModelQueryImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.XMLAssociationProvider;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
+import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+public class Test implements IPlatformRunnable
+{
+ public Object run(Object a)
+ {
+ String args[] = (String[])a;
+ if (args.length > 0)
+ {
+ test(args[0]);
+ }
+ else
+ {
+ System.out.println("xml file name argument required");
+ }
+ return null;
+ }
+
+ protected void test(String fileName)
+ {
+ try
+ {
+ CMDocumentCache cache=new CMDocumentCache();
+ XMLAssociationProvider provider = new XMLAssociationProvider(cache){};
+
+ ModelQuery mq = new ModelQueryImpl(provider);
+
+ Thread.currentThread().setContextClassLoader(Test.class.getClassLoader());
+ DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document document = builder.parse(fileName);
+
+ /*
+ ClassLoader prevClassLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+ Class theClass = Class.forName("org.apache.xerces.parsers.DOMParser");
+ DOMParser parser = (DOMParser)theClass.newInstance();
+ Thread.currentThread().setContextClassLoader(prevClassLoader);
+ parser.parse(new InputSource(fileName));
+ Document document = parser.getDocument();
+ */
+ visitNode(document, mq, 0);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ protected void visitNode(Node node, ModelQuery mq, int indent)
+ {
+ CMNode cmnode = mq.getCMNode(node);
+ printlnIndented(indent, "node :" + node.getNodeName() + " cmnode : " + (cmnode != null ? cmnode.getNodeName() : "null"));
+ NamedNodeMap map = node.getAttributes();
+ if (map != null)
+ {
+ indent += 2;
+ int mapLength = map.getLength();
+ for (int i = 0; i < mapLength; i++)
+ {
+ visitNode(map.item(i), mq, indent);
+ }
+ indent -= 2;
+ }
+ indent += 4;
+ NodeList list = node.getChildNodes();
+ int listLength = list.getLength();
+ for (int i = 0; i < listLength; i++)
+ {
+ visitNode(list.item(i), mq, indent);
+ }
+ indent -= 4;
+ }
+
+ public static void printlnIndented(int indent, String string)
+ {
+ for (int i = 0; i < indent; i++)
+ {
+ System.out.print(" ");
+ }
+ System.out.println(string);
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/CMDataTypeValueHelper.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/CMDataTypeValueHelper.java
new file mode 100644
index 0000000000..624d0a04cf
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/CMDataTypeValueHelper.java
@@ -0,0 +1,161 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.util;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceTable;
+
+
+public class CMDataTypeValueHelper
+{
+ protected int idCount = 0;
+
+
+ public String getValue(CMAttributeDeclaration ad, NamespaceTable namespaceTable)
+ {
+ String value = null;
+
+ if (isXSIType(ad))
+ {
+ List list = getQualifiedXSITypes(ad, namespaceTable);
+ value = list.size() > 0 ? (String)list.get(0) : null;
+ }
+
+ // shameless hack
+ //
+ if (value == null)
+ {
+ if (ad.getAttrName().equals("xml:lang"))
+ {
+ value = "EN";
+ }
+ }
+
+ if (value == null)
+ {
+ CMDataType dataType = ad.getAttrType();
+ if (dataType != null)
+ {
+ value = getValue(dataType);
+ }
+ }
+ return value;
+ }
+
+
+ public String getValue(CMDataType dataType)
+ {
+ String value = null;
+ value = dataType.getImpliedValue();
+
+ if (value == null)
+ {
+ String[] values = dataType.getEnumeratedValues();
+ if (values != null && values.length > 0)
+ {
+ value = values[0];
+ }
+ }
+
+ if (value == null)
+ {
+ value = dataType.generateInstanceValue();
+ }
+
+ // Here is a special case where we handle DTD's ID related datatypes.
+ // These values must be generated/validate by considering the entire xml file
+ // so we can't rely on the 'generateInstanceValue' method.
+ //
+ // todo... find a nicer way to handle this
+ if (value == null)
+ {
+ String dataTypeName = dataType.getDataTypeName();
+ if (dataTypeName != null)
+ {
+ if (dataTypeName.equals("ID"))
+ {
+ value = "idvalue" + idCount++;
+ }
+ else if (dataTypeName.equals("IDREF") || dataTypeName.equals("IDREFS"))
+ {
+ value = "idvalue0";
+ }
+ }
+ }
+ return value;
+ }
+
+
+ public boolean isValidEmptyValue(CMAttributeDeclaration ad)
+ {
+ boolean result = true;
+ CMDataType dataType = ad.getAttrType();
+ if (dataType != null)
+ {
+ String propertyValue = (String)dataType.getProperty("isValidEmptyValue");
+ if (propertyValue != null && propertyValue.equals("false"))
+ {
+ result = false;
+ }
+ }
+ return result;
+ }
+
+
+ public boolean isXSIType(CMAttributeDeclaration ad)
+ {
+ boolean result = false;
+ if (ad.getNodeName().equals("type"))
+ {
+ CMDocument cmDocument = (CMDocument)ad.getProperty("CMDocument");
+ if (cmDocument != null)
+ {
+ String namespaceName = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ if (namespaceName != null && namespaceName.equals("http://www.w3.org/2001/XMLSchema-instance"))
+ {
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+
+ public List getQualifiedXSITypes(CMAttributeDeclaration ad, NamespaceTable table)
+ {
+ List list = new Vector();
+
+ List xsiTypes = (List)ad.getProperty("XSITypes");
+ if (xsiTypes != null && xsiTypes.size() > 0)
+ {
+ for (Iterator i = xsiTypes.iterator(); i.hasNext(); )
+ {
+ String uriQualifiedName = (String)i.next();
+ String[] components = DOMNamespaceHelper.getURIQualifiedNameComponents(uriQualifiedName);
+ String prefix = table.getPrefixForURI(components[0] != null ? components[0] : "");
+ String typeName = (prefix != null && prefix.length() > 0) ?
+ prefix + ":" + components[1] :
+ components[1];
+ list.add(typeName);
+ }
+ }
+ return list;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/CMValidator.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/CMValidator.java
new file mode 100644
index 0000000000..105b3ec6a5
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/CMValidator.java
@@ -0,0 +1,1042 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.util;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.ContentModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMVisitor;
+
+
+
+public class CMValidator
+{
+ protected static StringElementContentComparator stringContentComparitor = new StringElementContentComparator();
+ protected Hashtable graphNodeTable = new Hashtable();
+
+ /**
+ * GraphNode
+ */
+ protected static class GraphNode
+ {
+ public String name;
+ public boolean isTerminal;
+ public Vector arcList = new Vector();
+
+ public GraphNode(String name)
+ {
+ this.name = name;
+ }
+
+ public void addArc(Arc arc)
+ {
+ arcList.addElement(arc);
+ }
+
+ public String toString()
+ {
+ return "[GraphNode " + name + "]";
+ }
+ }
+
+
+ /**
+ * Arc
+ */
+ protected static class Arc
+ {
+ public static final int ELEMENT = 1;
+ public static final int REPEAT = 2;
+ public static final int OPTIONAL = 3;
+ public static final int PREV_IN = 4;
+ public static final int OUT_NEXT = 5;
+ public static final int LINK = 6;
+
+ public int kind;
+ public String name;
+ public GraphNode node;
+ public CMNode cmNode;
+
+ public Arc(int kind, GraphNode node, CMNode cmNode)
+ {
+ this(kind, "", node, cmNode);
+ }
+
+ protected Arc(int kind, String name, GraphNode node, CMNode cmNode)
+ {
+ this.name = name;
+ this.kind = kind;
+ this.node = node;
+ this.cmNode = cmNode;
+ }
+ }
+
+
+ /**
+ * GraphGenerator
+ */
+ protected static class GraphGenerator extends CMVisitor
+ {
+ public int indent;
+ public int count;
+ public GraphNode startGraphNode;
+ public Context context;
+
+ protected static class Context
+ {
+ GraphNode from;
+ GraphNode to;
+
+ Context(GraphNode from, GraphNode to)
+ {
+ this.from = from;
+ this.to = to;
+ }
+
+ GraphNode getLastGraphNode()
+ {
+ return (to != null) ? to : from;
+ }
+ }
+
+
+ protected GraphGenerator()
+ {
+ startGraphNode = new GraphNode(getGraphNodeName());
+ context = new Context(startGraphNode, null);
+ }
+
+
+ protected void generateGraph(CMElementDeclaration ed)
+ {
+ int contentType = ed.getContentType();
+
+ if (contentType == CMElementDeclaration.MIXED ||
+ contentType == CMElementDeclaration.ELEMENT)
+ {
+ visitCMNode(ed.getContent());
+ }
+ // CMElementDeclaration.PCDATA... no graph required
+ // CMElementDeclaration.ANY... no graph required
+ context.getLastGraphNode().isTerminal = true;
+ }
+
+
+ protected String getGraphNodeName()
+ {
+ return "n" + count++;
+ }
+
+
+ protected GraphNode getStartGraphNode()
+ {
+ return startGraphNode;
+ }
+
+
+ /**
+ * repeat
+ * +----#-----+
+ * | |
+ * v |
+ * prev --#-> in --'x'-> out --#-> next
+ * | ^
+ * | |
+ * +----------------#--------------+
+ * optional
+ *
+ */
+ protected void createArcs(GraphNode in, GraphNode out, CMContent cmContent)
+ {
+ createArcs(in, out, cmContent, false);
+ }
+
+ protected void createArcs(GraphNode in, GraphNode out, CMContent cmContent, boolean isAllGroup)
+ {
+ //println("+createArcs() " + ed.getDescription() + " " + ed.getMinOccur());
+ GraphNode prev = context.from;
+ GraphNode next = new GraphNode(getGraphNodeName());
+
+ prev.addArc(new Arc(Arc.PREV_IN, in, cmContent));
+ out.addArc(new Arc(Arc.OUT_NEXT, next, cmContent));
+
+ if (context.to != null)
+ {
+ next.addArc(new Arc(Arc.LINK, context.to, cmContent));
+ }
+ else
+ {
+ context.from = next;
+ }
+
+ if (cmContent.getMinOccur() == 0)
+ {
+ // todo... should we see if an optional arc has already been added?
+ prev.addArc(new Arc(Arc.OPTIONAL, next, cmContent));
+ }
+
+ if (cmContent.getMaxOccur() == -1 || cmContent.getMaxOccur() > 1 || isAllGroup)
+ {
+ out.addArc(new Arc(Arc.REPEAT, in, cmContent));
+ }
+ }
+
+
+ public void visitCMGroup(CMGroup group)
+ {
+ Context prevContext = context;
+ GraphNode in = new GraphNode("(" + getGraphNodeName());
+ GraphNode out = new GraphNode(")" + getGraphNodeName());
+
+ int groupOperator = group.getOperator();
+ if (groupOperator == CMGroup.SEQUENCE)
+ {
+ context = new Context(in, null);
+ super.visitCMGroup(group);
+ context.from.addArc(new Arc(Arc.LINK, out, group));
+ }
+ else if (groupOperator == CMGroup.CHOICE ||
+ groupOperator == CMGroup.ALL)
+ {
+ context = new Context(in, out);
+ super.visitCMGroup(group);
+ }
+
+ context = prevContext;
+ createArcs(in, out, group, groupOperator == CMGroup.ALL);
+ }
+
+
+ public void visitCMElementDeclaration(CMElementDeclaration ed)
+ {
+ GraphNode in = new GraphNode(getGraphNodeName());
+ GraphNode out = new GraphNode(getGraphNodeName());
+ createArcs(in, out, ed);
+ in.addArc(new Arc(Arc.ELEMENT, ed.getElementName(), out, ed));
+ }
+
+
+ public void visitCMAnyElement(CMAnyElement anyElement)
+ {
+ GraphNode in = new GraphNode(getGraphNodeName());
+ GraphNode out = new GraphNode(getGraphNodeName());
+ createArcs(in, out, anyElement);
+ in.addArc(new Arc(Arc.ELEMENT, "any", out, anyElement));
+ }
+ }
+
+ // todo.. implement cache strategy hook, handle name spaces, locals etc.
+ //
+ public GraphNode lookupOrCreateGraph(CMElementDeclaration element)
+ {
+ Object key = element;
+ GraphNode node = (GraphNode)graphNodeTable.get(key);
+ if (node == null)
+ {
+ node = createGraph(element);
+ graphNodeTable.put(key, node);
+ }
+ return node;
+ }
+
+ public GraphNode createGraph(CMElementDeclaration element)
+ {
+ GraphGenerator generator = new GraphGenerator();
+ generator.generateGraph(element);
+ return generator.getStartGraphNode();
+ }
+
+
+ public void printGraph(GraphNode node, Vector namedArcList, Vector unamedArcList, int indent)
+ {
+ String decoration = node.isTerminal ? " *" : "";
+ //printlnIndented(indent, "GraphNode:" + node.name + decoration);
+
+ indent += 2;
+ for (Enumeration e = node.arcList.elements() ; e.hasMoreElements() ;)
+ {
+ Arc arc = (Arc)e.nextElement();
+ boolean visit = false;
+ printlnIndented(indent, "Arc:" + arc.name + " (" + arc.kind + ")");
+ if (arc.kind == Arc.ELEMENT)
+ {
+ //table.add(currentGrammarObject, arc.grammarObject);
+ if (!namedArcList.contains(arc))
+ {
+ namedArcList.add(arc);
+ unamedArcList = new Vector();
+ printGraph(arc.node, namedArcList, unamedArcList, indent + 2);
+ }
+ }
+ else
+ {
+ if (!unamedArcList.contains(arc))
+ {
+ unamedArcList.add(arc);
+ printGraph(arc.node, namedArcList, unamedArcList, indent + 2);
+ }
+ }
+ }
+ }
+
+
+ public void populateFTable(FTable table, GraphNode node, CMElementDeclaration prevED, Vector namedArcList, Vector unamedArcList, int indent)
+ {
+ String decoration = node.isTerminal ? " *" : "";
+ //printlnIndented(indent, "GraphNode:" + node.name + decoration);
+
+ indent += 2;
+ for (Enumeration e = node.arcList.elements() ; e.hasMoreElements() ;)
+ {
+ Arc arc = (Arc)e.nextElement();
+ boolean visit = false;
+ //printlnIndented(indent, "Arc:" + arc.name + " (" + arc.kind + ")");
+ if (arc.kind == Arc.ELEMENT)
+ {
+ CMElementDeclaration newED = (CMElementDeclaration)arc.cmNode;
+ table.add(prevED, newED);
+ if (!namedArcList.contains(arc))
+ {
+ namedArcList.add(arc);
+ unamedArcList = new Vector();
+ populateFTable(table, arc.node, newED, namedArcList, unamedArcList, indent + 2);
+ }
+ }
+ else
+ {
+ if (!unamedArcList.contains(arc))
+ {
+ unamedArcList.add(arc);
+ populateFTable(table, arc.node, prevED, namedArcList, unamedArcList, indent + 2);
+ }
+ }
+ }
+ }
+
+
+ public FTable getFTable(CMElementDeclaration ed)
+ {
+ FTable table = new FTable();
+ GraphNode node = lookupOrCreateGraph(ed);
+ populateFTable(table, node, ed, new Vector(), new Vector(), 0);
+ return table;
+ }
+
+
+ public void printGraph(GraphNode node)
+ {
+ printGraph(node, new Vector(), new Vector(), 0);
+ }
+
+
+ public void validateElementList(ElementList list, GraphNode node, ElementContentComparator comparator, Result result, boolean loopFlag)
+ {
+ //println("+validateElementList " + node + " " + list);
+ if (list == null && node.isTerminal)
+ {
+ result.isValid = true;
+ }
+ else
+ {
+ for (Iterator i = node.arcList.iterator(); i.hasNext();)
+ {
+ Arc arc = (Arc)i.next();
+ boolean traverseArc = false;
+ if (arc.kind == Arc.ELEMENT)
+ {
+ if (list != null && comparator.matches(list.head, arc.cmNode))
+ {
+ loopFlag = false;
+ traverseArc = true;
+ list = list.tail; // increment our position in the list
+ }
+ }
+ else if (arc.kind == Arc.REPEAT)
+ {
+ if (!loopFlag)
+ {
+ traverseArc = true;
+ }
+ loopFlag = true;
+ }
+ else
+ {
+ traverseArc = true;
+ }
+
+ if (traverseArc)
+ {
+ // see if this arc leads to a correct solution
+ result.push(arc);
+ validateElementList(list, arc.node, comparator, result, loopFlag);
+ if (result.isValid)
+ {
+ break;
+ }
+ result.pop(arc);
+ }
+ }
+ }
+ }
+
+
+ /**
+ *
+ */
+ protected static ElementList createElementList(int contentType, List v, ElementContentComparator comparator, Result result)
+ {
+ ElementList first = null;
+ ElementList prev = null;
+
+ int size = v.size();
+ for (int i = 0; i < size; i++)
+ {
+ Object o = v.get(i);
+ if (o != null && !comparator.isIgnorable(o))
+ {
+ if (comparator.isElement(o))
+ {
+ ElementList list = new ElementList();
+ list.head = o;
+
+ if (prev != null)
+ {
+ prev.tail = list;
+ }
+ else
+ {
+ first = list;
+ }
+ prev = list;
+ }
+ else if (contentType == CMElementDeclaration.ELEMENT)
+ {
+ result.isValid = false;
+ result.errorIndex = i;
+ result.errorMessage = "Element can not include PCDATA content";
+ }
+ }
+ }
+ return first;
+ }
+
+ /**
+ *
+ */
+ public void validate(CMElementDeclaration ed, List elementContent, ElementContentComparator comparator, Result result)
+ {
+ int contentType = ed.getContentType();
+
+ if (contentType == CMElementDeclaration.MIXED ||
+ contentType == CMElementDeclaration.ELEMENT)
+ {
+ ElementList elementList = createElementList(contentType, elementContent, comparator, result);
+ if (result.isValid == true)
+ {
+ // defect 226213 ... elements with a large number of children will cause the recursion based validation
+ // algorithm to stack overflow ... as a quick fix assume any element with a large number of children is valid
+ if (elementContent.size() < 500)
+ {
+ boolean isGraphValidationNeeded = !(elementList == null && contentType == CMElementDeclaration.MIXED);
+ if (isGraphValidationNeeded)
+ {
+ // validate the elementList using a graph
+ //
+ result.isValid = false;
+ GraphNode node = lookupOrCreateGraph(ed);
+ validateElementList(elementList, node, comparator, result, false);
+ }
+ }
+ }
+ }
+ else if (contentType == CMElementDeclaration.PCDATA)
+ {
+ int size = elementContent.size();
+ for (int i = 0; i < size; i++)
+ {
+ Object o = elementContent.get(i);
+ if (comparator.isElement(o))
+ {
+ result.isValid = false;
+ result.errorIndex = i;
+ result.errorMessage = "Element may only include PCDATA content";
+ break;
+ }
+ }
+ }
+ else if (contentType == CMElementDeclaration.EMPTY)
+ {
+ int size = elementContent.size();
+ for (int i = 0; i < size; i++)
+ {
+ Object o = elementContent.get(i);
+ if (!comparator.isIgnorable(o))
+ {
+ result.isValid = false;
+ result.errorIndex = i;
+ result.errorMessage = "Element may not contain PCDATA or Element content";
+ break;
+ }
+ }
+ }
+ //else if (contentType == CMElementDeclaration.ANY)
+ // {
+ // assume elementContent will always be valid for this content type
+ // }
+ }
+
+
+ public void getOriginArray(CMElementDeclaration ed, List elementContent, ElementContentComparator comparator, ElementPathRecordingResult result)
+ {
+ CMNode[] cmNodeArray = null;
+ validate(ed, elementContent, comparator, result);
+ if (result.isValid)
+ {
+ CMDataType dataType = ed.getDataType();
+ int size = elementContent.size();
+ cmNodeArray = new CMNode[size];
+ Vector originList = result.getElementOriginList();
+ int originListSize = originList.size();
+ int originListIndex = 0;
+ for (int i = 0; i < size; i++)
+ {
+ Object o = elementContent.get(i);
+ if (comparator.isElement(o))
+ {
+ if (originListIndex < originListSize)
+ {
+ cmNodeArray[i] = (CMNode)originList.get(originListIndex);
+ originListIndex++;
+ }
+ }
+ else if (comparator.isPCData(o))
+ {
+ cmNodeArray[i] = dataType;
+ }
+ // else the CMNode at this index is null
+ }
+ result.setOriginArray(cmNodeArray);
+ }
+ }
+
+ /**
+ *
+ */
+ public static class Result
+ {
+ public boolean isValid = true;
+ public int errorIndex = -1;
+ public String errorMessage;
+ public boolean isRepeatTraversed; // detects if a repeat has been traversed
+
+ public void push(Arc arc)
+ {
+ // overide this method to record traversed nodes
+ }
+ public void pop(Arc arc)
+ {
+ // overide this method to record traversed nodes
+ }
+ public CMNode[] getOriginArray()
+ {
+ return null;
+ }
+ }
+
+ /**
+ *
+ */
+ public static class ElementPathRecordingResult extends Result
+ {
+ protected Vector elementOriginStack = new Vector();
+ protected CMNode[] originArray = null;
+
+ public void push(Arc arc)
+ {
+ if (arc.kind == Arc.ELEMENT)
+ {
+ elementOriginStack.add(arc.cmNode);
+ }
+ }
+
+ public void pop(Arc arc)
+ {
+ if (arc.kind == Arc.ELEMENT)
+ {
+ int size = elementOriginStack.size();
+ elementOriginStack.remove(size - 1);
+ }
+ }
+
+ public Vector getElementOriginList()
+ {
+ return elementOriginStack;
+ }
+
+ public CMNode[] getOriginArray()
+ {
+ return originArray;
+ }
+
+ public void setOriginArray(CMNode[] originArray)
+ {
+ this.originArray = originArray;
+ }
+ }
+
+ /**
+ *
+ */
+ public static class PathRecordingResult extends Result
+ {
+ protected Vector arcList = new Vector();
+
+ public void push(Arc arc)
+ {
+ arcList.add(arc);
+ }
+
+ public void pop(Arc arc)
+ {
+ int size = arcList.size();
+ arcList.remove(size - 1);
+ }
+
+ public List getArcList()
+ {
+ List list = new Vector();
+ for (Iterator iterator = arcList.iterator(); iterator.hasNext(); )
+ {
+ Arc arc = (Arc)iterator.next();
+ if (arc.kind == Arc.ELEMENT)
+ {
+ list.add(arc);
+ }
+ }
+ return list;
+ }
+
+ public MatchModelNode getMatchModel()
+ {
+ MatchModelNodeBuilder builder = new MatchModelNodeBuilder(arcList);
+ builder.buildMatchModel();
+ return builder.getRoot();
+ }
+ }
+
+ /**
+ *
+ */
+ public static class MatchModelNode
+ {
+ public CMNode cmNode;
+ public List children = new Vector();
+ public Object data;
+
+ public MatchModelNode(MatchModelNode parent, CMNode cmNode)
+ {
+ this.cmNode = cmNode;
+ }
+
+ public void printModel(int indent)
+ {
+ String cmNodeName = cmNode != null ? cmNode.getNodeName() : "null";
+ //printlnIndented(indent, "MatchModelNode : " + cmNodeName);
+ for (Iterator iterator = children.iterator(); iterator.hasNext(); )
+ {
+ MatchModelNode child = (MatchModelNode)iterator.next();
+ child.printModel(indent + 2);
+ }
+ }
+ }
+
+ public static class MatchModelNodeBuilder
+ {
+ protected List arcList;
+ protected List stack = new Vector();
+ protected MatchModelNode root;
+ protected MatchModelNode current;
+
+ public MatchModelNodeBuilder(List arcList)
+ {
+ this.arcList = arcList;
+ root = new MatchModelNode(null, null);
+ push(root);
+ }
+
+ protected void push(MatchModelNode node)
+ {
+ current = node;
+ stack.add(node);
+ }
+
+ protected void pop()
+ {
+ int size = stack.size();
+ stack.remove(size - 1);
+ current = (MatchModelNode)stack.get(size - 2);
+ }
+
+ public boolean isCMGroup(CMNode cmNode)
+ {
+ return cmNode != null && cmNode.getNodeType() == CMNode.GROUP;
+ }
+
+ public void buildMatchModel()
+ {
+ for (Iterator iterator = arcList.iterator(); iterator.hasNext(); )
+ {
+ Arc arc = (Arc)iterator.next();
+
+ if (arc.kind == Arc.ELEMENT)
+ {
+ current.children.add(new MatchModelNode(current, arc.cmNode));
+ }
+ else if (arc.kind == Arc.PREV_IN)
+ {
+ if (isCMGroup(arc.cmNode))
+ {
+ MatchModelNode newModelNode = new MatchModelNode(current, arc.cmNode);
+ current.children.add(newModelNode);
+ push(newModelNode);
+ }
+ }
+ else if (arc.kind == Arc.OUT_NEXT)
+ {
+ if (isCMGroup(arc.cmNode))
+ {
+ pop();
+ }
+ }
+ else if (arc.kind == Arc.REPEAT)
+ {
+ if (isCMGroup(arc.cmNode))
+ {
+ pop();
+ MatchModelNode newModelNode = new MatchModelNode(current, arc.cmNode);
+ current.children.add(newModelNode);
+ push(newModelNode);
+ }
+ }
+ }
+ }
+
+ public MatchModelNode getRoot()
+ {
+ return root;
+ }
+ }
+
+
+ /**
+ *
+ */
+ public interface ElementContentComparator
+ {
+ public boolean isIgnorable(Object o);
+ public boolean isPCData(Object o);
+ public boolean isElement(Object o);
+ public boolean matches(Object o, CMNode cmNode);
+ }
+
+ /**
+ * A linked list
+ */
+ public static class ElementList
+ {
+ protected Object head;
+ protected ElementList tail;
+
+ public static ElementList create(List v)
+ {
+ ElementList first = null;
+ ElementList prev = null;
+
+ for (Iterator iterator = v.iterator(); iterator.hasNext(); )
+ {
+ Object o = iterator.next();
+ if (o != null)
+ {
+ ElementList list = new ElementList();
+ list.head = o;
+
+ if (prev != null)
+ {
+ prev.tail = list;
+ }
+ else
+ {
+ first = list;
+ }
+ prev = list;
+ }
+ }
+ return first;
+ }
+
+
+ public String toString()
+ {
+ String string = "[" + head + "],";
+
+ if (tail != null)
+ {
+ string += tail.toString();
+ }
+
+ return string;
+ }
+ }
+
+ /**
+ * StringElementContentComparator
+ */
+ public static class StringElementContentComparator implements ElementContentComparator
+ {
+ public boolean isIgnorable(Object o)
+ {
+ String string = o.toString();
+ return string.startsWith("!") || string.startsWith("?");
+ }
+
+ public boolean isPCData(Object o)
+ {
+ String string = o.toString();
+ return string.startsWith("'") || string.startsWith("\"");
+ }
+
+ public boolean isElement(Object o)
+ {
+ return !isIgnorable(o) && !isPCData(o);
+ }
+
+ public boolean matches(Object o, CMNode cmNode)
+ {
+ boolean result = false;
+ if (cmNode.getNodeType() == CMNode.ELEMENT_DECLARATION)
+ {
+ CMElementDeclaration element = (CMElementDeclaration)cmNode;
+ String name = o.toString();
+ int index = name.indexOf("]");
+ if (index != -1)
+ {
+ name = name.substring(index + 1);
+ }
+ result = name.equalsIgnoreCase(element.getElementName());
+
+ // TODO... here's we consider substitution groups... revisit to see if this should be moved into validator code
+ if (!result)
+ {
+ CMNodeList cmNodeList = (CMNodeList)element.getProperty("SubstitutionGroup");
+ if (cmNodeList != null)
+ {
+ int cmNodeListLength = cmNodeList.getLength();
+ if (cmNodeListLength > 1)
+ {
+ for (int i = 0; i < cmNodeListLength; i++)
+ {
+ CMElementDeclaration alternativeCMElementDeclaration = (CMElementDeclaration)cmNodeList.item(i);
+ String altName = alternativeCMElementDeclaration.getElementName();
+ result = name.equalsIgnoreCase(altName);
+ if (result)
+ {
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ else if (cmNode.getNodeType() == CMNode.ANY_ELEMENT)
+ {
+ String string = o.toString();
+ if (string.equals("*"))
+ {
+ result = true;
+ }
+ else
+ {
+ CMAnyElement anyElement = (CMAnyElement)cmNode;
+ String anyElementURI = anyElement.getNamespaceURI();
+ if (anyElementURI != null)
+ {
+ if (anyElementURI.equals("##any"))
+ {
+ result = true;
+ }
+ else if (anyElementURI.equals("##other"))
+ {
+ result = true;
+ CMDocument cmDocument = (CMDocument)anyElement.getProperty("CMDocument");
+ if (cmDocument != null)
+ {
+ String excludedURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ if (excludedURI != null)
+ {
+ String specifiedURI = getURIForContentSpecification(string);
+ if (specifiedURI != null && excludedURI.equals(specifiedURI))
+ {
+ result = false;
+ }
+ }
+ }
+ }
+ else if (anyElementURI.equals("##targetNamespace"))
+ {
+ result = true;
+ CMDocument cmDocument = (CMDocument)anyElement.getProperty("CMDocument");
+ if (cmDocument != null)
+ {
+ String targetNamespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ String specifiedURI = getURIForContentSpecification(string);
+ if (specifiedURI != null && !targetNamespaceURI.equals(specifiedURI))
+ {
+ result = false;
+ }
+ }
+ }
+ else
+ {
+ result = true;
+ String specifiedURI = getURIForContentSpecification(string);
+ if (specifiedURI != null && !anyElementURI.equals(specifiedURI))
+ {
+ result = false;
+ }
+ }
+ }
+ else
+ {
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+
+ protected String getURIForContentSpecification(String specification)
+ {
+ String result = null;
+ int index = specification.indexOf("]");
+ if (index != -1)
+ {
+ result = specification.substring(1, index);
+ }
+ return result;
+ }
+ }
+
+ public static List createStringList(String arg[], int startIndex)
+ {
+ Vector v = new Vector();
+ for (int i = startIndex; i < arg.length; i++)
+ {
+ v.add(arg[i]);
+ }
+ return v;
+ }
+
+
+ public static void main(String arg[])
+ {
+ if (arg.length > 1)
+ {
+ try
+ {
+ //CMDocumentFactoryRegistry.getInstance().registerCMDocumentBuilderWithClassName("org.eclipse.wst.sse.core.internal.contentmodel.mofimpl.CMDocumentBuilderImpl");
+
+ String grammarFileName = arg[0];
+ String elementName = arg[1];
+
+ CMDocument cmDocument = ContentModelManager.getInstance().createCMDocument(grammarFileName, null);
+
+ CMNamedNodeMap elementMap = cmDocument.getElements();
+ CMElementDeclaration element = (CMElementDeclaration)elementMap.getNamedItem(elementName);
+ if (element != null)
+ { /*
+ println("found element [" + elementName + "] contentType = " + element.getContentType());
+ GraphNode graphNode = createGraph(element);
+ printGraph(graphNode);
+ */
+ println("-------------- begin validate ---------------");
+
+ StringElementContentComparator comparator = new StringElementContentComparator();
+ CMValidator validator = new CMValidator();
+ ElementPathRecordingResult result = new ElementPathRecordingResult();
+ validator.getOriginArray(element, createStringList(arg, 2), comparator, result);
+ if (result.isValid)
+ {
+ CMNode[] nodeMapping = result.getOriginArray();
+ println("Validation Success!");
+ print(" ");
+ for (int i = 0; i < nodeMapping.length; i++)
+ {
+ String name = nodeMapping[i] != null ? nodeMapping[i].getNodeName() : "null";
+ print("[" + name + "]");
+ }
+ println("");
+ }
+ else
+ {
+ println("Validation Failed! ");
+ if (result.errorMessage != null)
+ {
+ println(" " + result.errorMessage);
+ }
+ }
+ println("-------------- end validate ---------------");
+ }
+ else
+ {
+ println("element [" + elementName + "] can not be found");
+ }
+ }
+ catch (Exception e)
+ {
+ println("CMValidator error");
+ e.printStackTrace();
+ }
+ }
+ else
+ {
+ println("2 args required... only " + arg.length + " provided");
+ println("usage java org.eclipse.wst.newxml.util.XMLUtil grammarFileName rootElementName pattern");
+ }
+ }
+
+ public static void print(String string)
+ {
+ }
+
+ public static void println(String string)
+ {
+ }
+
+ public static void printlnIndented(int indent, String string)
+ {
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/DOMValidator.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/DOMValidator.java
new file mode 100644
index 0000000000..fed61fe074
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/DOMValidator.java
@@ -0,0 +1,402 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.util;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMVisitor;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
+
+
+/**
+ * A special CMValidator that knows about DOMs
+ */
+public class DOMValidator extends CMValidator
+{
+ protected String getNamespaceURI(Node node)
+ {
+ return DOMNamespaceHelper.getNamespaceURI(node);
+ //return node.getNamespaceURI();
+ }
+
+
+ //
+ // This is a temporary hack!!
+ //
+ protected String getFallbackNamepaceURI(CMElementDeclaration ed)
+ {
+ String fallbackNamepaceURI = null;
+ CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument");
+ if (cmDocument != null)
+ {
+ fallbackNamepaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ }
+ return fallbackNamepaceURI;
+ }
+
+ /**
+ * Encode the Element's NodeList as a List of strings that the validator recognizes
+ */
+ public List createContentSpecificationList(Element element, CMElementDeclaration ed)
+ {
+ boolean isNamespaceAware = isNamespaceAware(ed);
+ Vector v = new Vector();
+ for (Node childNode = element.getFirstChild(); childNode != null; childNode = childNode.getNextSibling())
+ {
+ v.add(createContentSpecification(childNode, isNamespaceAware, isNamespaceAware ? getFallbackNamepaceURI(ed) : null));
+ }
+ return v;
+ }
+
+
+ public List createContentSpecificationList(List nodeList, CMElementDeclaration ed)
+ {
+ boolean isNamespaceAware = isNamespaceAware(ed);
+ Vector v = new Vector();
+
+ for (Iterator i = nodeList.iterator(); i.hasNext(); )
+ {
+ Node node = (Node)i.next();
+ v.add(createContentSpecification(node, isNamespaceAware, getFallbackNamepaceURI(ed)));
+ }
+ return v;
+ }
+
+
+ /**
+ * Encode the Node as a string that the validator recognizes
+ */
+ public String createContentSpecification(Node node, boolean isNamespaceAware, String fallbackNamepaceURI)
+ {
+ String result = "!";
+ switch (node.getNodeType())
+ {
+ case Node.ELEMENT_NODE :
+ {
+ String nodeName = node.getNodeName();
+ if (nodeName.startsWith("jsp:"))
+ {
+ result = "!"; // treat it as a comment so that it's ignored by the validator
+ }
+ else
+ {
+ if (isNamespaceAware)
+ {
+ result = DOMNamespaceHelper.getUnprefixedName(nodeName);
+ String uri = getNamespaceURI(node);
+ if (uri != null)
+ {
+ result = "[" + uri + "]" + result;
+ }
+ else if (fallbackNamepaceURI != null)
+ {
+ result = "[" + fallbackNamepaceURI + "]" + result;
+ }
+ }
+ else
+ {
+ result = nodeName;
+ }
+ }
+ //ContentModelManager.println("result " + result);
+ break;
+ }
+ case Node.PROCESSING_INSTRUCTION_NODE :
+ {
+ result = "?";
+ break;
+ }
+ case Node.COMMENT_NODE :
+ {
+ result = "!";
+ break;
+ }
+ case Node.CDATA_SECTION_NODE :
+ {
+ result = "\"" + node.getNodeName() + "\"";
+ break;
+ }
+ case Node.TEXT_NODE :
+ {
+ String data = ((Text)node).getData();
+ // here we test to see if the test node is 'ignorable'
+ if (data != null && data.trim().length() > 0)
+ {
+ result = "\"" + node.getNodeName() + "\"";
+ }
+ else
+ {
+ result = "!"; // todo... use another symbol?
+ }
+ break;
+ }
+ }
+ return result;
+ }
+
+
+ /**
+ *
+ */
+ public List createContentSpecificationList(CMNode cmNode)
+ {
+ List list = new Vector();
+ switch (cmNode.getNodeType())
+ {
+ case CMNode.ELEMENT_DECLARATION :
+ {
+ list.add(createContentSpecificationForCMElementDeclaration((CMElementDeclaration)cmNode));
+ break;
+ }
+ case CMNode.DATA_TYPE :
+ {
+ list.add("\"" + cmNode.getNodeName() + "\"");
+ break;
+ }
+ case CMNode.GROUP :
+ {
+ createContentSpecificationListForCMGroup((CMGroup)cmNode, list);
+ break;
+ }
+ case CMNode.ANY_ELEMENT :
+ {
+ list.add("*");
+ break;
+ }
+ default :
+ {
+ list.add("!");
+ }
+ }
+ return list;
+ }
+
+
+ /**
+ *
+ */
+ protected String createContentSpecificationForCMElementDeclaration(CMElementDeclaration ed)
+ {
+ CMDocument document = (CMDocument)ed.getProperty("CMDocument");
+ String uri = document != null ? (String)document.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI") : null;
+ String string = ed.getNodeName();
+ if (uri != null)
+ {
+ string = "[" + uri + "]" + string;
+ }
+ return string;
+ }
+
+ /**
+ *
+ */
+ protected void createContentSpecificationListForCMGroup(CMGroup group, List list)
+ {
+ CMGroupContentVisitor visitor = new CMGroupContentVisitor(group, list);
+ visitor.visitCMNode(group);
+ }
+
+ protected class CMGroupContentVisitor extends CMVisitor
+ {
+ protected CMGroup root;
+ protected List list;
+
+ public CMGroupContentVisitor(CMGroup root, List list)
+ {
+ this.root = root;
+ this.list = list;
+ }
+
+ public void visitCMElementDeclaration(CMElementDeclaration ed)
+ {
+ if (ed.getMinOccur() > 0)
+ {
+ list.add(createContentSpecificationForCMElementDeclaration(ed));
+ }
+ }
+
+ public void visitCMAnyElement(CMAnyElement anyElement)
+ {
+ list.add("*");
+ }
+
+ public void visitCMGroup(CMGroup group)
+ {
+ if (group == root || group.getMinOccur() > 0)
+ {
+ int op = group.getOperator();
+ if (op == CMGroup.SEQUENCE)
+ {
+ super.visitCMGroup(group);
+ }
+ else if (op == CMGroup.CHOICE)
+ {
+ CMNodeList nodeList = group.getChildNodes();
+ if (nodeList.getLength() > 0)
+ {
+ visitCMNode(nodeList.item(0));
+ }
+ }
+ }
+ }
+ }
+
+ public boolean isNamespaceAware(CMElementDeclaration ed)
+ {
+ return ed != null ? ed.getProperty("http://org.eclipse.wst/cm/properties/isNameSpaceAware") != null : false;
+ }
+
+ /**
+ *
+ */
+ public CMNode[] getOriginArray(CMElementDeclaration ed, Element element)
+ {
+ ElementPathRecordingResult result = new ElementPathRecordingResult();
+ getOriginArray(ed, createContentSpecificationList(element, ed), stringContentComparitor, result);
+ return result.getOriginArray();
+ }
+
+ /**
+ *
+ */
+ public MatchModelNode getMatchModel(CMElementDeclaration ed, Element element)
+ {
+ MatchModelNode matchModelNode = null;
+ PathRecordingResult result = new PathRecordingResult();
+ validate(ed, createContentSpecificationList(element, ed), stringContentComparitor, result);
+ if (result.isValid)
+ {
+ matchModelNode = result.getMatchModel();
+ }
+ return matchModelNode;
+ }
+
+
+ public List clone(List list)
+ {
+ List result = new Vector(list.size());
+ result.addAll(list);
+ return result;
+ }
+
+ /**
+ *
+ */
+ public boolean canInsert(CMElementDeclaration ed, List contentSpecificationList, int insertIndex, CMNode cmNode)
+ {
+ List clonedList = clone(contentSpecificationList);
+ insert(clonedList, insertIndex, cmNode);
+ return isValid(ed, clonedList);
+ }
+
+ /**
+ *
+ */
+ public boolean canInsert(CMElementDeclaration ed, List contentSpecificationList, int insertIndex, List cmNodeList)
+ {
+ List clonedList = clone(contentSpecificationList);
+ insert(clonedList, insertIndex, cmNodeList);
+ return isValid(ed, clonedList);
+ }
+
+ /**
+ *
+ */
+ public boolean canRemove(CMElementDeclaration ed, List contentSpecificationList, int startRemoveIndex)
+ {
+ return canRemove(ed, contentSpecificationList, startRemoveIndex, startRemoveIndex);
+ }
+
+ /**
+ *
+ */
+ public boolean canRemove(CMElementDeclaration ed, List contentSpecificationList, int startRemoveIndex, int endRemoveIndex)
+ {
+ List clonedList = clone(contentSpecificationList);
+ remove(clonedList, startRemoveIndex, endRemoveIndex);
+ return isValid(ed, clonedList);
+ }
+
+ /**
+ *
+ */
+ public boolean canReplace(CMElementDeclaration ed, List contentSpecificationList, int startRemoveIndex, int endRemoveIndex, CMNode cmNode)
+ {
+ List clonedList = clone(contentSpecificationList);
+ remove(clonedList, startRemoveIndex, endRemoveIndex);
+ insert(clonedList, startRemoveIndex, cmNode);
+ return isValid(ed, clonedList);
+ }
+
+ /**
+ *
+ */
+ public boolean isValid(CMElementDeclaration ed, List contentSpecificationList)
+ {
+ Result result = new Result();
+ validate(ed, contentSpecificationList, stringContentComparitor, result);
+ return result.isValid;
+ }
+
+
+ protected Result validate(CMElementDeclaration ed, Element element)
+ {
+ Result result = new Result();
+ validate(ed, createContentSpecificationList(element, ed), stringContentComparitor, result);
+ return result;
+ }
+
+
+ protected void remove(List stringList, int startRemoveIndex, int endRemoveIndex)
+ {
+ if (startRemoveIndex != -1)
+ {
+ for (int i = startRemoveIndex; i <= endRemoveIndex; i++)
+ {
+ stringList.remove(i);
+ }
+ }
+ }
+
+ protected void insert(List stringList, int insertIndex, CMNode cmNode)
+ {
+ if (insertIndex != -1)
+ {
+ stringList.addAll(insertIndex, createContentSpecificationList(cmNode));
+ }
+ }
+
+ protected void insert(List stringList, int insertIndex, List cmNodeList)
+ {
+ if (insertIndex != -1)
+ {
+ int insertListSize = cmNodeList.size();
+ for (int i = insertListSize - 1; i >= 0; i--)
+ {
+ CMNode cmNode = (CMNode)cmNodeList.get(i);
+ stringList.addAll(insertIndex, createContentSpecificationList(cmNode));
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/FTable.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/FTable.java
new file mode 100644
index 0000000000..bec38298ad
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/internal/util/FTable.java
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.internal.util;
+
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+
+
+
+public class FTable
+{
+ public final static String START = "START";
+
+ protected Hashtable hashtable = new Hashtable();
+
+ public void add(CMElementDeclaration ed1, CMElementDeclaration ed2)
+ {
+ String name = ed1 != null ? ed1.getElementName() : START;
+ Vector v = (Vector)hashtable.get(name);
+ if (v == null)
+ {
+ v = new Vector();
+ hashtable.put(name, v);
+ }
+ v.add(ed2);
+ }
+
+
+ public boolean follows(String name1, String name2)
+ {
+ boolean result = false;
+ Vector v = (Vector)hashtable.get(name1);
+ if (v != null)
+ {
+ int size = v.size();
+ for (int i = 0; i < size; i++)
+ {
+ CMElementDeclaration ed = (CMElementDeclaration)v.get(i);
+ if (ed.getElementName().equals(name2))
+ {
+ result = true;
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+ public List getFollows(String name)
+ {
+ Vector v = (Vector)hashtable.get(name);
+ return v != null ? v : Collections.EMPTY_LIST;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentManager.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentManager.java
new file mode 100644
index 0000000000..39fae4d128
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentManager.java
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
+
+
+/**
+ * The CMDocumentManager can be visualized as a table of CMDocument references, each with a corresponding entry
+ * in a CMDocument cache. The CMDocumentManager also performs the task of loading CMDocuments providing support
+ * for synchronous and asynchronous loading.
+ *
+ * publicIdTable CMDocumentCache
+ * --------------------------- ---------------------------------------
+ * | publicId | resolvedURI | -> | resolvedURI | status | CMDocument |
+ * --------------------------- ---------------------------------------
+ * | (null) | file:/x.dtd | | file:/x.dtd | loading | (null) |
+ * --------------------------- ---------------------------------------
+ * | http:/... | file:/y.xsd | | file:/y.xsd | loaded | |
+ * --------------------------- ---------------------------------------
+ *
+ */
+public interface CMDocumentManager
+{
+ /**
+ * This property specifies WHEN CMDocuments are loaded. Setting this property to true allows the CMDocumentManager to
+ * load CMDocuments on demand. Settings this property a false puts the onus on the client to call addCMDocumentReference()
+ * to explicity trigger a load. This allows the client to control exactly when loading should take place. )
+ */
+ public static final String PROPERTY_AUTO_LOAD = "autoLoad";
+
+ /**
+ * This property specifies HOW CMDocuments are loaded. When set to false, the getCMDocument() method will load
+ * the CMDocument synchronously and return a CMDocument object when loading is successful. When set to true,
+ * the getCMDocument() will load the CMDocument asynchronously and will immediately return null. When loading
+ * is complete, the CMDocumentManager will inform its listeners that the CMDocument has been loaded.
+ */
+ public static final String PROPERTY_ASYNC_LOAD = "asyncLoad";
+
+ /**
+ *
+ */
+ public static final String PROPERTY_USE_CACHED_RESOLVED_URI = "useCachedResovledURI";
+
+ /**
+ * Set the enabled state of a property.
+ */
+ public void setPropertyEnabled(String propertyName, boolean enabled);
+
+ /**
+ * Get the enabled state of the property.
+ */
+ public boolean getPropertyEnabled(String propertyName);
+
+ /**
+ * Adds a listener. Listeners should expect to receive call backs on a secondary thread when asynchronously loading is used.
+ */
+ public void addListener(CMDocumentManagerListener listener);
+
+ /**
+ * Removes a listener.
+ */
+ public void removeListener(CMDocumentManagerListener listener);
+
+ /**
+ * @deprecated
+ * use getCMDocument(String publicId, String systemId, String type) instead
+ */
+ public CMDocument getCMDocument(String publicId, String resolvedGrammarURI);
+
+ /**
+ * Lookup or create a CMDocument (depending on PROPERTY_AUTO_LOAD).
+ */
+ public CMDocument getCMDocument(String publicId, String systemId, String type);
+
+ /**
+ * Lookup a CMDocument.
+ */
+ public CMDocument getCMDocument(String publicId);
+
+ /**
+ * Get the status of a CMDocument.
+ */
+ public int getCMDocumentStatus(String publicId);
+
+ /**
+ * Creates a CMDocument and adds the associated CMDocument reference information to the table.
+ * Calling this method always triggers a CMDocument load.
+ */
+ public void addCMDocumentReference(String publicId, String systemId, String type);
+
+ /**
+ * Add an existingCMDocument and the reference information to the table.
+ */
+ public void addCMDocument(String publicId, String systemId, String resolvedURI, String type, CMDocument cmDocument);
+
+ /**
+ * Remove all entries from the table.
+ */
+ public void removeAllReferences();
+
+ /**
+ * Get the CMDocumentCache that is used to store loaded CMDocuments and associated status.
+ */
+ public CMDocumentCache getCMDocumentCache();
+
+ /**
+ * Builds a CMDocument given a resoulvedURI. Note that no entries are added to the table.
+ */
+ public CMDocument buildCMDocument(String publicId, String resolvedURI, String type);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentManagerListener.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentManagerListener.java
new file mode 100644
index 0000000000..9c333dd6ec
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentManagerListener.java
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCacheListener;
+
+/**
+ *
+ */
+public interface CMDocumentManagerListener extends CMDocumentCacheListener
+{
+ public void propertyChanged(CMDocumentManager cmDocumentManager, String propertyName);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentReference.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentReference.java
new file mode 100644
index 0000000000..8e9add1b9a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentReference.java
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery;
+
+
+public interface CMDocumentReference
+{
+ public String getPublicId();
+ public String getSystemId();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentReferenceProvider.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentReferenceProvider.java
new file mode 100644
index 0000000000..c0c3339b5f
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/CMDocumentReferenceProvider.java
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery;
+
+import java.util.List;
+
+import org.w3c.dom.Node;
+
+/**
+ * The interface is used to abstract the task of computing the document references associated with a DOM
+ * or a particular node within the DOM.
+ */
+public interface CMDocumentReferenceProvider
+{
+ List getCMDocumentReferences(Node node, boolean deep);
+ String resolveGrammarURI(String publicId, String systemId);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQuery.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQuery.java
new file mode 100644
index 0000000000..8f1bb4e50d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQuery.java
@@ -0,0 +1,195 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery;
+
+import java.util.List;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension.*;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+/**
+ * This class provides an interface for performing higher level queries based on
+ * a xml model (DOM) and one or more associated content models (CMDocument).
+ *
+ * The queries provided can be organized into three groups:
+ *
+ * 1) DOM Node to CMNode mapping
+ * Given a grammatically valid DOM Node the corresponding CMNode can be determined.
+ * (i.e. Element -> CMElementDeclaration, Attr -> CMAttributeDeclaration, CharacterData -> CMDataType)
+ *
+ * 2) DOM editing tests ("Can I do this?")
+ * Questions such as canInsert, canRemove, canReplace can assist in the editing of a DOM.
+ *
+ * The validityChecking argument determines the strictness of the validity testing that occurs.
+ *
+ * - VALIDITY_NONE : The current content of the Element is ignored.
+ * Only the content model is considered.
+ * This is most useful for codeassist related queries.
+ *
+ * - VALIDITY_STRICT : The current content of the Element is considered.
+ * Returns true only if the operation preserves content validity.
+ * This is useful when DOM editing needs to be constrained to maintain validity.
+ *
+ * - VALIDITY_PARTIAL : Some optimized compromise between the two options above.
+ *
+ * 3) DOM editing actions ("What can I do here?")
+ * These methods return ModelQueryActions that are relevant at some specified DOM Node.
+ * The actions indicate what kinds of DOM Node can be inserted where (at what index).
+ */
+public interface ModelQuery
+{
+ public static final int VALIDITY_NONE = 0;
+ public static final int VALIDITY_PARTIAL = 1;
+ public static final int VALIDITY_STRICT = 2;
+
+ public static final int INCLUDE_ALL = 0xFF;
+ public static final int INCLUDE_ATTRIBUTES = 0x01;
+ public static final int INCLUDE_CHILD_NODES = 0x02;
+ public static final int INCLUDE_SEQUENCE_GROUPS = 0x04;
+ public static final int INCLUDE_TEXT_NODES = 0x08;
+ public static final int INCLUDE_ENCLOSING_REPLACE_ACTIONS = 0x10;
+
+ public static final int EDIT_MODE_UNCONSTRAINED = 0;
+ public static final int EDIT_MODE_CONSTRAINED_LENIENT= 1;
+ public static final int EDIT_MODE_CONSTRAINED_STRICT = 2;
+
+
+ void setEditMode(int editMode);
+
+ int getEditMode();
+
+ /**
+ * Returns the CMDocument that corresponds to the DOM Node.
+ * or null if no CMDocument is appropriate for the DOM Node.
+ */
+ CMDocument getCorrespondingCMDocument(Node node);
+
+ /**
+ * Returns the corresponding CMNode for the DOM Node
+ * or null if no CMNode is appropriate for the DOM Node.
+ */
+ CMNode getCMNode(Node node);
+
+ /**
+ * Returns the corresponding CMAttribute for the DOM Node
+ * or null if no CMNode is appropriate for the DOM Node.
+ */
+ CMAttributeDeclaration getCMAttributeDeclaration(Attr attr);
+
+ /**
+ * Returns the corresponding CMAttribute for the DOM Node
+ * or null if no CMNode is appropriate for the DOM Node.
+ */
+ CMElementDeclaration getCMElementDeclaration(Element element);
+
+ /**
+ * Returns true if the content of the element is valid
+ */
+ boolean isContentValid(Element element);
+
+ /**
+ * Returns the CMNode of the parent element's content model
+ * that corresponds to the node
+ */
+ CMNode getOrigin(Node node);
+
+ /**
+ * Returns an array of CMNodes of the parent element's content model
+ * that corresponds to the node
+ */
+ CMNode[] getOriginArray(Element element);
+
+ /**
+ * Returns a list of all CMNode 'meta data' that may be potentially added to the element.
+ */
+ List getAvailableContent(Element element, CMElementDeclaration ed, int includeOptions);
+
+ /**
+ * Can a DOM Node corresponding to the CMNode 'meta data' be added to the parent
+ */
+ boolean canInsert(Element parent, CMNode cmNode, int index, int validityChecking);
+
+ /**
+ * Can multiple DOM Nodes corresponding to the list of CMNode 'meta data' be added to the parent
+ */
+ boolean canInsert(Element parent, List cmNodeList, int index, int validityChecking);
+
+ /**
+ * Can the DOM Node be removed
+ */
+ boolean canRemove(Node node, int validityChecking);
+
+ /**
+ * Can the list of DOM Nodes be removed
+ */
+ boolean canRemove(List nodeList, int validityChecking);
+
+ /**
+ * Can the children within the indicated indices be replaced with a DOM Node corresponding to the CMNode 'meta data'
+ */
+ boolean canReplace(Element parent, int startIndex, int endIndex, CMNode cmNode, int validityChecking);
+
+ /**
+ * Can the children within the indicated indices be replaced with multiple DOM Nodes corresponding to the list of CMNode 'meta data'
+ */
+ boolean canReplace(Element parent, int startIndex, int endIndex, List cmNodeList, int validityChecking);
+
+ /**
+ *
+ */
+ void getInsertActions(Element parent, CMElementDeclaration ed, int index, int includeOptions, int validityChecking, List actionList);
+
+ /**
+ *
+ */
+ void getInsertActions(Document parent, CMDocument cmDocument, int index, int includeOptions, int validityChecking, List actionList);
+
+ /**
+ * Return a list of replace actions that can be performed on the parent's content
+ */
+ void getReplaceActions(Element parent, CMElementDeclaration ed, int includeOptions, int validityChecking, List actionList);
+
+ /**
+ * Return a list of replace actions that can be performed on the selected children of that parent
+ */
+ void getReplaceActions(Element parent, CMElementDeclaration ed, List selectedChildren, int includeOptions, int validityChecking, List actionList);
+
+
+ /**
+ * @deprecated - use getPossibleDataTypeValues()
+ */
+ List getDataTypeValues(Element element, CMNode cmNode);
+
+ /**
+ * This methods return an array of possible values corresponding to the datatype of the CMNode (either an CMAttributeDeclaration or a CMElementDeclaration)
+ */
+ String[] getPossibleDataTypeValues(Element element, CMNode cmNode);
+
+ /**
+ * This method may return null if a CMDocumentManager is not used by the ModelQuery
+ */
+ CMDocumentManager getCMDocumentManager();
+
+ /**
+ * This method may return null the ModelQuery doesn't support the use of extensions
+ */
+ ModelQueryExtensionManager getExtensionManager();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryAction.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryAction.java
new file mode 100644
index 0000000000..6050f8ff5e
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryAction.java
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.w3c.dom.Node;
+
+
+public interface ModelQueryAction
+{
+ public static final int INSERT = 1;
+ public static final int REMOVE = 2;
+ public static final int REPLACE = 4;
+
+ public int getKind();
+ /**
+ * if start index == -1 then no insert is possible
+ * if start index != -1 and endIndex == -1 then an insert at any position is possible
+ */
+ public int getStartIndex();
+ public int getEndIndex();
+ public Node getParent();
+ public CMNode getCMNode();
+ public Object getUserData();
+ public void setUserData(Object object);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryAssociationProvider.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryAssociationProvider.java
new file mode 100644
index 0000000000..eba70241ef
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryAssociationProvider.java
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
+
+
+/**
+ *
+ *
+ */
+public interface ModelQueryAssociationProvider extends ModelQueryCMProvider
+{
+ public CMNode getCMNode(Node node);
+ public CMDataType getCMDataType(Text text);
+ public CMAttributeDeclaration getCMAttributeDeclaration(Attr attr);
+ public CMElementDeclaration getCMElementDeclaration(Element element);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryCMProvider.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryCMProvider.java
new file mode 100644
index 0000000000..d8ec849e4b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/ModelQueryCMProvider.java
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.w3c.dom.Node;
+
+
+
+/**
+ *
+ */
+public interface ModelQueryCMProvider
+{
+ /**
+ * Returns the CMDocument that corresponds to the DOM Node.
+ * or null if no CMDocument is appropriate for the DOM Node.
+ */
+ CMDocument getCorrespondingCMDocument(Node node);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/DataTypeValueExtension.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/DataTypeValueExtension.java
new file mode 100644
index 0000000000..1bc4bc4bfb
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/DataTypeValueExtension.java
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension;
+
+import java.util.List;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.w3c.dom.Element;
+
+
+public interface DataTypeValueExtension extends ModelQueryExtension
+{
+ public List getDataTypeValues(Element element, CMNode cmNode);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ElementContentFilterExtension.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ElementContentFilterExtension.java
new file mode 100644
index 0000000000..5b8cea420b
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ElementContentFilterExtension.java
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension;
+
+import java.util.List;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.w3c.dom.Element;
+
+
+public interface ElementContentFilterExtension extends ModelQueryExtension
+{
+ public void filterAvailableElementContent(List list, Element element, CMElementDeclaration ed);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ModelQueryExtension.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ModelQueryExtension.java
new file mode 100644
index 0000000000..c739d528f4
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ModelQueryExtension.java
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension;
+
+
+public interface ModelQueryExtension
+{
+ public final static int DATA_TYPE_VALUE_EXTENSION = 1;
+ public final static int ELEMENT_CONTENT_FILTER = 2;
+ public int getType();
+ public String getId();
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ModelQueryExtensionManager.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ModelQueryExtensionManager.java
new file mode 100644
index 0000000000..8e353cccab
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelquery/extension/ModelQueryExtensionManager.java
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension;
+
+import java.util.List;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.w3c.dom.Element;
+
+
+
+public interface ModelQueryExtensionManager
+{
+ List getDataTypeValues(Element element, CMNode cmNode);
+
+ void filterAvailableElementContent(List availableContent, Element element, CMElementDeclaration ed);
+
+ void addExtension(ModelQueryExtension extension);
+
+ void removeExtension(ModelQueryExtension extension);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/BaseAssociationProvider.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/BaseAssociationProvider.java
new file mode 100644
index 0000000000..aac4555212
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/BaseAssociationProvider.java
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryAssociationProvider;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
+
+
+/**
+ *
+ */
+public abstract class BaseAssociationProvider implements ModelQueryAssociationProvider
+{
+ public BaseAssociationProvider()
+ {
+ }
+
+ public CMNode getCMNode(Node node)
+ {
+ CMNode result = null;
+ switch (node.getNodeType())
+ {
+ case Node.ATTRIBUTE_NODE :
+ {
+ result = getCMAttributeDeclaration((Attr)node);
+ break;
+ }
+ case Node.ELEMENT_NODE :
+ {
+ result = getCMElementDeclaration((Element)node);
+ break;
+ }
+ case Node.CDATA_SECTION_NODE :
+ case Node.TEXT_NODE :
+ {
+ result = getCMDataType((Text)node);
+ break;
+ }
+ }
+ return result;
+ }
+
+
+ public CMDataType getCMDataType(Text text)
+ {
+ CMDataType result = null;
+ Node parentNode = text.getParentNode();
+ if (parentNode != null && parentNode.getNodeType() == Node.ELEMENT_NODE)
+ {
+ CMElementDeclaration ed = getCMElementDeclaration((Element)parentNode);
+ result = ed.getDataType();
+ }
+ return result;
+ }
+
+
+ public CMAttributeDeclaration getCMAttributeDeclaration(Attr attr)
+ {
+ CMAttributeDeclaration result = null;
+ Element element = attr.getOwnerElement();
+ if (element != null)
+ {
+ CMElementDeclaration ed = getCMElementDeclaration(element);
+ if (ed != null)
+ {
+ result = (CMAttributeDeclaration)ed.getAttributes().getNamedItem(attr.getName());
+ }
+ }
+ return result;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentLoader.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentLoader.java
new file mode 100644
index 0000000000..99e1c0e432
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentLoader.java
@@ -0,0 +1,214 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceTable;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ *
+ */
+public class CMDocumentLoader
+{
+ protected Document document;
+ protected ModelQuery modelQuery;
+ protected CMDocumentManager cmDocumentManager;
+ protected boolean isInferredGrammarEnabled = true;
+ protected CMDocumentLoadingNamespaceTable namespaceTable;
+ protected int count = 0;
+
+ public CMDocumentLoader(Document document, ModelQuery modelQuery)
+ {
+ this(document, modelQuery.getCMDocumentManager());
+ }
+
+ public CMDocumentLoader(Document document, CMDocumentManager cmDocumentManager)
+ {
+ this.document = document;
+ this.cmDocumentManager = cmDocumentManager;
+ }
+
+ public void loadCMDocuments()
+ {
+ //System.out.println("----------loadCMDocuments ------------");
+ long time = System.currentTimeMillis();
+
+ boolean walkDocument = false;
+
+ cmDocumentManager.removeAllReferences();
+
+ String[] doctypeInfo = XMLAssociationProvider.getDoctypeInfo(document);
+ if (doctypeInfo != null)
+ {
+ // load the doctype if required
+ walkDocument = handleGrammar(doctypeInfo[0], doctypeInfo[1], "DTD");
+ }
+ else
+ {
+ Element element = getRootElement(document);
+ if (element != null)
+ {
+ namespaceTable = new CMDocumentLoadingNamespaceTable(document);
+ namespaceTable.addElement(element);
+ if (namespaceTable.isNamespaceEncountered())
+ {
+ walkDocument = true;
+ //System.out.println("isNamespaceAware");
+ }
+ else
+ {
+ namespaceTable = null;
+ walkDocument = isInferredGrammarEnabled;
+ //System.out.println("is NOT namespaceAware");
+ }
+ }
+ }
+
+ if (walkDocument)
+ {
+ visitNode(document);
+ }
+
+ //System.out.println("--- elapsed time (" + count + ") = " + (System.currentTimeMillis() - time));
+ }
+
+
+ public boolean handleGrammar(String publicId, String systemId, String type)
+ {
+ boolean result = false;
+
+ int status = cmDocumentManager.getCMDocumentStatus(publicId);
+ if (status == CMDocumentCache.STATUS_NOT_LOADED)
+ {
+ cmDocumentManager.addCMDocumentReference(publicId, systemId, type);
+ }
+ else if (status == CMDocumentCache.STATUS_ERROR)
+ {
+ result = true;
+ }
+ return result;
+ }
+
+
+ public void handleElement(Element element)
+ {
+ visitChildNodes(element);
+ }
+
+
+ public void handleElementNS(Element element)
+ {
+ namespaceTable.addElement(element);
+ visitChildNodes(element);
+ }
+
+
+ public void visitNode(Node node)
+ {
+ int nodeType = node.getNodeType();
+ if (nodeType == Node.ELEMENT_NODE)
+ {
+ count++;
+
+ Element element = (Element)node;
+ if (namespaceTable == null)
+ {
+ handleElement(element);
+ }
+ else
+ {
+ handleElementNS(element);
+ }
+ }
+ else if (nodeType == Node.DOCUMENT_NODE)
+ {
+ visitChildNodes(node);
+ }
+ }
+
+
+ protected void visitChildNodes(Node node)
+ {
+ for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling())
+ {
+ visitNode(child);
+ }
+ }
+
+
+ protected class CMDocumentLoadingNamespaceTable extends NamespaceTable
+ {
+ protected List newNamespaceList;
+
+ public CMDocumentLoadingNamespaceTable(Document document)
+ {
+ super(document);
+ }
+
+
+ public void addElement(Element element)
+ {
+ newNamespaceList = null;
+ super.addElement(element);
+ if (newNamespaceList != null)
+ {
+ for (Iterator i = newNamespaceList.iterator(); i.hasNext(); )
+ {
+ NamespaceInfo info = (NamespaceInfo)i.next();
+ handleGrammar(info.uri, info.locationHint, "XSD");
+ }
+ }
+ }
+
+
+ protected void internalAddNamespaceInfo(String key, NamespaceInfo info)
+ {
+ super.internalAddNamespaceInfo(key, info);
+ if (newNamespaceList == null)
+ {
+ newNamespaceList = new ArrayList();
+ }
+ newNamespaceList.add(info);
+ }
+ }
+
+
+ protected Element getRootElement(Document document)
+ {
+ Element result = null;
+ NodeList nodeList = document.getChildNodes();
+ int nodeListLength = nodeList.getLength();
+ for (int i = 0 ; i < nodeListLength; i++)
+ {
+ Node node = nodeList.item(i);
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ result = (Element)node;
+ break;
+ }
+ }
+ return result;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java
new file mode 100644
index 0000000000..30dc411a30
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java
@@ -0,0 +1,321 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.ContentModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.annotation.AnnotationUtility;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManagerListener;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentReferenceProvider;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
+
+
+/**
+ *
+ */
+public class CMDocumentManagerImpl implements CMDocumentManager
+{
+ protected CMDocumentCache cmDocumentCache;
+ protected CMDocumentReferenceProvider cmDocumentReferenceProvider;
+ protected List listenerList = new Vector();
+ protected Hashtable propertyTable = new Hashtable();
+ protected Hashtable publicIdTable = new Hashtable();
+
+
+ public CMDocumentManagerImpl(CMDocumentCache cmDocumentCache, CMDocumentReferenceProvider cmDocumentReferenceProvider)
+ {
+ this.cmDocumentCache = cmDocumentCache;
+ this.cmDocumentReferenceProvider = cmDocumentReferenceProvider;
+ setPropertyEnabled(PROPERTY_AUTO_LOAD, true);
+ setPropertyEnabled(PROPERTY_USE_CACHED_RESOLVED_URI, false);
+ }
+
+
+ public CMDocumentCache getCMDocumentCache()
+ {
+ return cmDocumentCache;
+ }
+
+
+ public void setPropertyEnabled(String propertyName, boolean value)
+ {
+ propertyTable.put(propertyName, value ? "true" : "false");
+ for (Iterator i = listenerList.iterator(); i.hasNext(); )
+ {
+ CMDocumentManagerListener listener = (CMDocumentManagerListener)i.next();
+ listener.propertyChanged(this, propertyName);
+ }
+ }
+
+
+ public boolean getPropertyEnabled(String propertyName)
+ {
+ Object object = propertyTable.get(propertyName);
+ return object != null && object.equals("true");
+ }
+
+
+ public void addListener(CMDocumentManagerListener listener)
+ {
+ listenerList.add(listener);
+ cmDocumentCache.addListener(listener);
+ }
+
+
+ public void removeListener(CMDocumentManagerListener listener)
+ {
+ listenerList.remove(listener);
+ cmDocumentCache.removeListener(listener);
+ }
+
+
+ protected String lookupResolvedURI(String publicId)
+ {
+ String key = publicId != null ? publicId : "";
+ return (String)publicIdTable.get(key);
+ }
+
+
+ protected String lookupOrCreateResolvedURI(String publicId, String systemId)
+ {
+ String resolvedURI = null;
+
+ String key = publicId != null ? publicId : "";
+
+ if (getPropertyEnabled(PROPERTY_USE_CACHED_RESOLVED_URI))
+ {
+ resolvedURI = (String)publicIdTable.get(key);
+ }
+
+ if (resolvedURI == null)
+ {
+ resolvedURI = cmDocumentReferenceProvider.resolveGrammarURI(publicId, systemId);
+ if (resolvedURI == null)
+ {
+ resolvedURI = "";
+ }
+ publicIdTable.put(key, resolvedURI);
+ }
+
+ return resolvedURI;
+ }
+
+
+ public int getCMDocumentStatus(String publicId)
+ {
+ int status = CMDocumentCache.STATUS_NOT_LOADED;
+ String resolvedURI = lookupResolvedURI(publicId);
+ if (resolvedURI != null)
+ {
+ status = cmDocumentCache.getStatus(resolvedURI);
+ }
+ return status;
+ }
+
+
+ public CMDocument getCMDocument(String publicId)
+ {
+ CMDocument result = null;
+ String resolvedURI = lookupResolvedURI(publicId);
+ if (resolvedURI != null)
+ {
+ result = cmDocumentCache.getCMDocument(resolvedURI);
+ }
+ return result;
+ }
+
+
+ public CMDocument getCMDocument(String publicId, String systemId, String type)
+ {
+ CMDocument cmDocument = null;
+ String resolvedURI = null;
+
+ if (getPropertyEnabled(PROPERTY_AUTO_LOAD))
+ {
+ resolvedURI = lookupOrCreateResolvedURI(publicId, systemId);
+ }
+ else
+ {
+ resolvedURI = lookupResolvedURI(publicId);
+ }
+
+ if (resolvedURI != null)
+ {
+ int status = cmDocumentCache.getStatus(resolvedURI);
+ if (status == CMDocumentCache.STATUS_LOADED)
+ {
+ cmDocument = cmDocumentCache.getCMDocument(resolvedURI);
+ }
+ else if (status == CMDocumentCache.STATUS_NOT_LOADED)
+ {
+ if (getPropertyEnabled(PROPERTY_AUTO_LOAD))
+ {
+ cmDocument = loadCMDocument(publicId, resolvedURI, type, getPropertyEnabled(PROPERTY_ASYNC_LOAD));
+ }
+ }
+ }
+ return cmDocument;
+ }
+
+ /**
+ * @deprecated
+ */
+ public CMDocument getCMDocument(String publicId, String resolvedURI)
+ {
+ CMDocument cmDocument = null;
+
+ if (resolvedURI != null)
+ {
+ int status = cmDocumentCache.getStatus(resolvedURI);
+ if (status == CMDocumentCache.STATUS_LOADED)
+ {
+ cmDocument = cmDocumentCache.getCMDocument(resolvedURI);
+ }
+ else if (status == CMDocumentCache.STATUS_NOT_LOADED)
+ {
+ if (getPropertyEnabled(PROPERTY_AUTO_LOAD))
+ {
+ cmDocument = loadCMDocument(publicId, resolvedURI, "", getPropertyEnabled(PROPERTY_ASYNC_LOAD));
+ }
+ }
+ }
+ return cmDocument;
+ }
+
+ public void addCMDocumentReference(String publicId, String systemId, String type)
+ {
+ String resolvedURI = lookupOrCreateResolvedURI(publicId, systemId);
+ if (resolvedURI != null && resolvedURI.length() > 0)
+ {
+ int status = cmDocumentCache.getStatus(resolvedURI);
+ if (status == CMDocumentCache.STATUS_NOT_LOADED)
+ {
+ loadCMDocument(publicId, resolvedURI, type, getPropertyEnabled(PROPERTY_ASYNC_LOAD));
+ }
+ }
+ }
+
+
+ public void addCMDocument(String publicId, String systemId, String resolvedURI, String type, CMDocument cmDocument)
+ {
+ String key = publicId != null ? publicId : "";
+ publicIdTable.put(key, resolvedURI);
+ cmDocumentCache.putCMDocument(resolvedURI, cmDocument);
+ }
+
+
+ protected CMDocument loadCMDocument(final String publicId, final String resolvedURI, final String type, boolean async)
+ {
+ CMDocument result = null;
+
+ //System.out.println("about to build CMDocument(" + publicId + ", " + unresolvedURI + " = " + resolvedURI + ")");
+ if (async)
+ {
+ cmDocumentCache.setStatus(resolvedURI, CMDocumentCache.STATUS_LOADING);
+ //Thread thread = new Thread(new AsyncBuildOperation(publicId, resolvedURI, type));
+ //thread.start();
+ Job job = new Job("loading " + resolvedURI)
+ {
+ public boolean belongsTo(Object family)
+ {
+ boolean result = (family == CMDocumentManager.class);
+ return result;
+ }
+
+ protected IStatus run(IProgressMonitor monitor)
+ {
+ try
+ {
+ new AsyncBuildOperation(publicId, resolvedURI, type).run();
+ }
+ catch (Exception e)
+ {
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.schedule();
+ }
+ else
+ {
+ result = buildCMDocument(publicId, resolvedURI, type);
+ }
+ return result;
+ }
+
+
+
+ protected class AsyncBuildOperation implements Runnable
+ {
+ protected String publicId;
+ protected String resolvedURI;
+ protected String type;
+
+ public AsyncBuildOperation(String publicId, String resolvedURI, String type)
+ {
+ this.publicId = publicId;
+ this.resolvedURI = resolvedURI;
+ this.type = type;
+ }
+
+ public void run()
+ {
+ buildCMDocument(publicId, resolvedURI, type);
+ }
+ }
+
+
+ public synchronized CMDocument buildCMDocument(String publicId, String resolvedURI, String type)
+ {
+ cmDocumentCache.setStatus(resolvedURI, CMDocumentCache.STATUS_LOADING);
+
+ CMDocument result = null;
+ int x = 1;
+ x++;
+ if (resolvedURI != null && resolvedURI.length() > 0)
+ {
+ // TODO... pass the TYPE thru to the CMDocumentBuilder
+ result = ContentModelManager.getInstance().createCMDocument(resolvedURI, type);
+ }
+ if (result != null)
+ {
+ // load the annotation files for the document
+ if (publicId != null)
+ {
+ AnnotationUtility.loadAnnotationsForGrammar(publicId, result);
+ }
+ cmDocumentCache.putCMDocument(resolvedURI, result);
+ }
+ else
+ {
+ cmDocumentCache.setStatus(resolvedURI, CMDocumentCache.STATUS_ERROR);
+ }
+ return result;
+ }
+
+ public void removeAllReferences()
+ {
+ // TODO... initiate a timed release of the entries in the CMDocumentCache
+ publicIdTable = new Hashtable();
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentReferenceImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentReferenceImpl.java
new file mode 100644
index 0000000000..52be1bede2
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/CMDocumentReferenceImpl.java
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentReference;
+
+public class CMDocumentReferenceImpl implements CMDocumentReference
+{
+ protected String systemId;
+ protected String publicId;
+
+ public CMDocumentReferenceImpl(String publicId, String systemId)
+ {
+ this.publicId = publicId;
+ this.systemId = systemId;
+ }
+
+ public String getPublicId()
+ {
+ return publicId;
+ }
+
+ public String getSystemId()
+ {
+ return systemId;
+ }
+
+ public String toString()
+ {
+ return "[" + publicId + ", " + systemId + "]";
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/InferredGrammarBuildingCMDocumentLoader.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/InferredGrammarBuildingCMDocumentLoader.java
new file mode 100644
index 0000000000..18200c8719
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/InferredGrammarBuildingCMDocumentLoader.java
@@ -0,0 +1,189 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl;
+
+import java.util.Hashtable;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.modelqueryimpl.InferredGrammarFactory;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+
+/**
+ *
+ */
+public class InferredGrammarBuildingCMDocumentLoader extends CMDocumentLoader
+{
+ protected CMElementDeclaration inferredCMElementDeclaration;
+ protected CMDocument inferredCMDocument;
+ protected InferredGrammarFactory inferredGrammarFactory;
+ protected Hashtable createdCMDocumentTable;
+
+ public InferredGrammarBuildingCMDocumentLoader(Document document, ModelQuery modelQuery)
+ {
+ this(document, modelQuery.getCMDocumentManager());
+ }
+
+ public InferredGrammarBuildingCMDocumentLoader(Document document, CMDocumentManager cmDocumentManager)
+ {
+ super(document, cmDocumentManager);
+ createdCMDocumentTable = new Hashtable();
+ inferredGrammarFactory = new InferredGrammarFactory();
+ }
+
+
+ public void loadCMDocuments()
+ {
+ //System.out.println("----------loadCMDocuments ------------");
+ if (inferredGrammarFactory != null)
+ {
+ long time = System.currentTimeMillis();
+ super.loadCMDocuments();
+ //System.out.println("--- elapsed time (" + count + ") = " + (System.currentTimeMillis() - time));
+ //inferredGrammarFactory.debugPrint(createdCMDocumentTable.values());
+ }
+
+ }
+
+ public void handleElement(Element element)
+ {
+ CMElementDeclaration parentInferredCMElementDeclaration = inferredCMElementDeclaration;
+
+ if (inferredCMDocument == null)
+ {
+ String cacheKey = "inferred-document";
+ inferredCMDocument = inferredGrammarFactory.createCMDocument("");
+ cmDocumentManager.addCMDocument("", "", cacheKey, "DTD", inferredCMDocument);
+ createdCMDocumentTable.put(cacheKey, inferredCMDocument);
+ }
+
+ inferredCMElementDeclaration = inferredGrammarFactory.createCMElementDeclaration(inferredCMDocument, element, false);
+
+ if (parentInferredCMElementDeclaration != null)
+ {
+ inferredGrammarFactory.createCMContent(inferredCMDocument, parentInferredCMElementDeclaration, inferredCMDocument, inferredCMElementDeclaration, false, null);
+ }
+
+
+ visitChildNodes(element);
+
+ // reset the 'current' state to inital values
+ inferredCMElementDeclaration = parentInferredCMElementDeclaration;
+ }
+
+
+ public void handleElementNS(Element element)
+ {
+ CMDocument parentInferredCMDocument = inferredCMDocument;
+ CMElementDeclaration parentInferredCMElementDeclaration = inferredCMElementDeclaration;
+
+ inferredCMDocument = null;
+ inferredCMElementDeclaration = null;
+
+ // by adding the element to the namespaceTable, handleGrammar() will get called for any schema references
+ if (element.getParentNode() != document)
+ {
+ namespaceTable.addElement(element);
+ }
+
+ String prefix = element.getPrefix();
+ String uri = namespaceTable.getURIForPrefix(prefix);
+
+ if (uri == null && element.getParentNode() == document)
+ {
+ // when this is the root element
+ // we need to add an implied "no namespace schema location"
+ uri = "ommitted-namespace";
+ namespaceTable.addNamespaceInfo(prefix, uri, "");
+ }
+
+ // here's where we update the inferred grammar if required
+ //
+ boolean createCMElementDeclaration = true;
+
+ boolean isLocal = (uri == null && prefix == null);
+ if (isLocal)
+ {
+ if (parentInferredCMDocument == null)
+ {
+ // this is a local element... and the parent is not inferred (e.g) it has a known grammar
+ // so we don't need to create an element declaration for this element
+ createCMElementDeclaration = false;
+ }
+ else
+ {
+ if (uri == null)
+ {
+ uri = "ommitted-namespace";
+ }
+ }
+ }
+
+ if (createCMElementDeclaration)
+ {
+ if (isLocal)
+ {
+ inferredCMDocument = parentInferredCMDocument;
+ inferredCMElementDeclaration = inferredGrammarFactory.createCMElementDeclaration(inferredCMDocument, element, true);
+ }
+ else
+ {
+ boolean createCMDocument = false;
+
+ String cacheKey = "inferred-document" + uri;
+ inferredCMDocument = (CMDocument)createdCMDocumentTable.get(cacheKey);
+
+ if (inferredCMDocument == null)
+ {
+ // we don't have an inferred document for this uri yet... let's see of we need one
+ int status = cmDocumentManager.getCMDocumentStatus(uri);
+ if (status == CMDocumentCache.STATUS_NOT_LOADED || status == CMDocumentCache.STATUS_ERROR)
+ {
+ // the cache does not contain a 'proper' CMDocument for this uri
+ // so we need to create an inferred one
+ createCMDocument = true;
+ }
+ }
+
+ if (createCMDocument)
+ {
+ //System.out.println("encountered element {" + element.getNodeName() + "} ... creating inferred CMDocument for " + uri);
+ inferredCMDocument = inferredGrammarFactory.createCMDocument(uri);
+ cmDocumentManager.addCMDocument(uri, "", cacheKey, "XSD", inferredCMDocument);
+ createdCMDocumentTable.put(cacheKey, inferredCMDocument);
+ }
+
+ if (inferredCMDocument != null)
+ {
+ inferredCMElementDeclaration = inferredGrammarFactory.createCMElementDeclaration(inferredCMDocument, element, false);
+ }
+ }
+
+ if (parentInferredCMElementDeclaration != null)
+ {
+ inferredGrammarFactory.createCMContent(parentInferredCMDocument, parentInferredCMElementDeclaration, inferredCMDocument, inferredCMElementDeclaration, isLocal, uri);
+ }
+ }
+
+ visitChildNodes(element);
+
+ // reset the 'current' state to inital values
+ inferredCMElementDeclaration = parentInferredCMElementDeclaration;
+ inferredCMDocument = parentInferredCMDocument;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/ModelQueryActionHelper.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/ModelQueryActionHelper.java
new file mode 100644
index 0000000000..2f687a81de
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/ModelQueryActionHelper.java
@@ -0,0 +1,570 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.util.CMValidator;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryAction;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ *
+ */
+public class ModelQueryActionHelper
+{
+ protected ModelQueryImpl modelQuery;
+
+ protected static class Action implements ModelQueryAction
+ {
+ public int kind;
+ public int startIndex;
+ public int endIndex;
+ public Node parent;
+ public CMNode cmNode;
+ public Object userData;
+
+ public Action(int kind, Node parent, CMNode cmNode)
+ {
+ this.kind = kind;
+ this.parent = parent;
+ this.cmNode = cmNode;
+ }
+
+ public Action(int kind, Node parent, CMNode cmNode, int startIndex, int endIndex)
+ {
+ this.kind = kind;
+ this.parent = parent;
+ this.cmNode = cmNode;
+ this.startIndex = startIndex;
+ this.endIndex = endIndex;
+ }
+
+ public int getKind()
+ {
+ return kind;
+ }
+
+ public int getStartIndex()
+ {
+ return startIndex;
+ }
+
+ public int getEndIndex()
+ {
+ return endIndex;
+ }
+
+ public Node getParent()
+ {
+ return parent;
+ }
+
+ public CMNode getCMNode()
+ {
+ return cmNode;
+ }
+
+ public Object getUserData()
+ {
+ return userData;
+ }
+
+ public void setUserData(Object object)
+ {
+ userData = object;
+ }
+
+ public void performAction()
+ {
+ }
+ }
+
+
+ public ModelQueryActionHelper(ModelQueryImpl modelQuery)
+ {
+ this.modelQuery = modelQuery;
+ }
+
+
+ public void getAllActions(Element parent, CMElementDeclaration ed, int validityChecking, List actionList)
+ {
+ }
+
+
+ // insert actions
+ //
+ public void getInsertActions(Element parent, CMElementDeclaration ed, int index, int includeOptions, int validityChecking, List actionList)
+ {
+ if ((includeOptions & ModelQuery.INCLUDE_ATTRIBUTES) != 0)
+ {
+ getInsertAttributeActions(parent, ed, validityChecking, actionList);
+ }
+ includeOptions &= ~ModelQuery.INCLUDE_ATTRIBUTES;
+ if ((includeOptions & ModelQuery.INCLUDE_CHILD_NODES) != 0)
+ {
+ if (index != -1)
+ {
+ getInsertChildNodeActionsAtIndex(parent, ed, index, includeOptions, validityChecking, actionList);
+ }
+ else
+ {
+ getInsertChildNodeActions(parent, ed, includeOptions, validityChecking, actionList);
+ }
+ }
+ }
+
+
+
+ protected void getInsertAttributeActions(Element parent, CMElementDeclaration ed, int validityChecking, List actionList)
+ {
+ // get actions for each insertable attribute
+ //
+ List availableAttributeList = modelQuery.getAvailableContent(parent, ed, ModelQuery.INCLUDE_ATTRIBUTES);
+
+ for (Iterator i = availableAttributeList.iterator(); i.hasNext(); )
+ {
+ CMAttributeDeclaration ad = (CMAttributeDeclaration)i.next();
+ if (modelQuery.canInsert(parent, ed, ad, 0, validityChecking))
+ {
+ Action action = new Action(ModelQueryAction.INSERT, parent, ad);
+ actionList.add(action);
+ }
+ }
+ }
+
+
+ protected void getInsertChildNodeActionsAtIndex(Element parent, CMElementDeclaration ed, int index, int includeOptions, int validityChecking, List actionList)
+ {
+ // get actions for each insertable attribute
+ //
+ int size = parent.getChildNodes().getLength();
+ if (index <= size)
+ {
+ List contentSpecificationList = modelQuery.getValidator().createContentSpecificationList(parent, ed);
+ List availableChildNodeList = modelQuery.getAvailableContent(parent, ed, includeOptions);
+
+ boolean isSimpleChoice = isSimpleChoiceGroupContentModel(ed);
+
+ for (Iterator i = availableChildNodeList.iterator(); i.hasNext(); )
+ {
+ CMNode cmNode = (CMNode)i.next();
+ if (isSimpleChoice || modelQuery.canInsert(parent, ed, cmNode, index, validityChecking, contentSpecificationList))
+ {
+ Action action = new Action(ModelQueryAction.INSERT, parent, cmNode, index, index);
+ actionList.add(action);
+ }
+ }
+ }
+ }
+
+
+ protected boolean isSimpleChoiceGroupContentModel(CMElementDeclaration ed)
+ {
+ boolean result = false;
+ CMNode cmNode = ed.getContent();
+ if (cmNode != null && cmNode.getNodeType() == CMNode.GROUP)
+ {
+ CMGroup cmGroup = (CMGroup)cmNode;
+ if (cmGroup.getOperator() == CMGroup.CHOICE && cmGroup.getMaxOccur() == -1)
+ {
+ result = true;
+ CMNodeList list = cmGroup.getChildNodes();
+ for (int i = list.getLength() - 1; i >= 0; i--)
+ {
+ if (list.item(i).getNodeType() != CMNode.ELEMENT_DECLARATION)
+ {
+ result = false;
+ break;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+
+ protected void getInsertChildNodeActions(Element parent, CMElementDeclaration ed, int includeOptions, int validityChecking, List actionList)
+ {
+ int size = parent.getChildNodes().getLength();
+ List contentSpecificationList = modelQuery.getValidator().createContentSpecificationList(parent, ed);
+ List availableChildNodeList = modelQuery.getAvailableContent(parent, ed, includeOptions);
+
+ boolean isSimpleChoice = isSimpleChoiceGroupContentModel(ed);
+
+ for (Iterator iterator = availableChildNodeList.iterator(); iterator.hasNext(); )
+ {
+ CMNode cmNode = (CMNode)iterator.next();
+ for (int i = size; i >= 0; i--)
+ {
+ if (isSimpleChoice || modelQuery.canInsert(parent, ed, cmNode, i, validityChecking, contentSpecificationList))
+ {
+ Action action = new Action(ModelQueryAction.INSERT, parent, cmNode, i, i);
+ actionList.add(action);
+ break;
+ }
+ }
+ }
+ }
+
+ public void getInsertActions(Document parent, CMDocument cmDocument, int index, int includeOptions, int validityChecking, List actionList)
+ {
+ // get the root element and doctype index (if any)
+ //
+ int doctypeIndex = -1;
+ DocumentType doctype = null;
+ Element rootElement = null;
+ NodeList nodeList = parent.getChildNodes();
+ int nodeListLength = nodeList.getLength();
+ for (int i = 0; i < nodeListLength; i++)
+ {
+ Node childNode = nodeList.item(i);
+ if (childNode.getNodeType() == Node.ELEMENT_NODE)
+ {
+ rootElement = (Element)childNode;
+ break;
+ }
+ else if (childNode.getNodeType() == Node.DOCUMENT_TYPE_NODE)
+ {
+ doctype = (DocumentType)childNode;
+ doctypeIndex = i;
+ }
+ }
+
+ // make sure that root elements are only added after the doctype (if any)
+ if (rootElement == null && index > doctypeIndex)
+ {
+ CMNamedNodeMap map = cmDocument.getElements();
+ int mapLength = map.getLength();
+ for (int i = 0; i < mapLength; i++)
+ {
+ CMNode cmNode = map.item(i);
+
+ boolean canAdd = true;
+ if (validityChecking == ModelQuery.VALIDITY_STRICT)
+ {
+ canAdd = doctype == null || doctype.getName().equals(cmNode.getNodeName());
+ }
+
+ if (canAdd)
+ {
+ Action action = new Action(ModelQueryAction.INSERT, parent, cmNode, index, index);
+ actionList.add(action);
+ }
+ }
+ }
+ }
+
+
+
+ public void getInsertChildNodeActionTable(Element parent, CMElementDeclaration ed, int validityChecking, Hashtable actionTable)
+ {
+ }
+
+
+ public void getReplaceActions(Element parent, CMElementDeclaration ed, int includeOptions, int validityChecking, List actionList)
+ {
+ CMValidator.MatchModelNode matchModelNode = modelQuery.getValidator().getMatchModel(ed, parent);
+ if (matchModelNode != null)
+ {
+ MatchModelVisitor visitor = new MatchModelVisitor(parent, actionList);
+ visitor.visitMatchModelNode(matchModelNode);
+ }
+ }
+
+ public void getReplaceActions(Element parent, CMElementDeclaration ed, List selectedChildren, int includeOptions, int validityChecking, List actionList)
+ {
+ int[] range = getRange(parent, selectedChildren);
+ if (range != null)
+ {
+ if (isContiguous(parent, range, selectedChildren))
+ {
+ List tempList = new Vector();
+ getReplaceActions(parent, ed, includeOptions, validityChecking, tempList);
+ if ((includeOptions & ModelQuery.INCLUDE_ENCLOSING_REPLACE_ACTIONS) != 0)
+ {
+ removeActionsNotContainingRange(tempList, range[0], range[1]);
+ }
+ else
+ {
+ removeActionsNotMatchingRange(tempList, range[0], range[1]);
+ }
+ actionList.addAll(tempList);
+ }
+ }
+
+ if (selectedChildren.size() == 1)
+ {
+ Node node = (Node)selectedChildren.get(0);
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ Element childElement = (Element)node;
+ CMNode childEd = modelQuery.getCMElementDeclaration(childElement);
+ if (childEd != null)
+ {
+
+ CMNode childOrigin= modelQuery.getOrigin(childElement);
+
+ CMNodeList cmNodeList = childOrigin != null ?
+ (CMNodeList)childOrigin.getProperty("SubstitutionGroup") :
+ (CMNodeList)childEd.getProperty("SubstitutionGroup");
+
+ if (cmNodeList != null && cmNodeList.getLength() > 1)
+ {
+ int replaceIndex = getIndex(parent, childElement);
+ String childEdName = childEd.getNodeName();
+ for (int i = 0; i < cmNodeList.getLength(); i++)
+ {
+ CMNode substitution = cmNodeList.item(i);
+ if (!substitution.getNodeName().equals(childEdName) && !Boolean.TRUE.equals(substitution.getProperty("Abstract")))
+ {
+ Action action = new Action(ModelQueryAction.REPLACE, parent, cmNodeList.item(i), replaceIndex, replaceIndex);
+ actionList.add(action);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ // returns true if the selected nodes are contiguous
+ //
+ protected boolean isContiguous(Element parent, int[] range, List selectedNodeList)
+ {
+ boolean result = true;
+ NodeList nodeList = parent.getChildNodes();
+ int nodeListLength = nodeList.getLength();
+ for (int i = range[0]; i < range[1]; i++)
+ {
+ Node node = nodeList.item(i);
+ if (!isWhitespaceNode(node) && !selectedNodeList.contains(node))
+ {
+ result = false;
+ break;
+ }
+ }
+ return result;
+ }
+
+
+ protected int[] getRange(Element parent, List list)
+ {
+ int[] result = null;
+ int first = -1;
+ int last = -1;
+
+ NodeList nodeList = parent.getChildNodes();
+ int nodeListLength = nodeList.getLength();
+ for (int i = 0; i < nodeListLength; i++)
+ {
+ Node node = nodeList.item(i);
+ if (list.contains(node))
+ {
+ first = (first == -1) ? i : Math.min(first, i);
+ last = Math.max(last, i);
+ }
+ }
+
+ if (first != -1 && last!= -1)
+ {
+ result = new int[2];
+ result[0] = first;
+ result[1] = last;
+ }
+ return result;
+ }
+
+
+ protected boolean isWhitespaceNode(Node node)
+ {
+ return node.getNodeType() == Node.TEXT_NODE &&
+ node.getNodeValue().trim().length() == 0;
+ }
+
+
+ protected int getIndex(Node parentNode, Node child)
+ {
+ NodeList nodeList = parentNode.getChildNodes();
+ int index = -1;
+ int size = nodeList.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ if (nodeList.item(i) == child)
+ {
+ index = i;
+ break;
+ }
+ }
+ return index;
+ }
+
+
+ protected boolean isActionContainingRange(ModelQueryAction action, int startIndex, int endIndex)
+ {
+ int actionStartIndex = action.getStartIndex();
+ int actionEndIndex = action.getEndIndex();
+
+ return (actionStartIndex <= startIndex &&
+ actionEndIndex >= endIndex);
+ }
+
+
+ protected boolean isActionMatchingRange(ModelQueryAction action, int startIndex, int endIndex)
+ {
+ int actionStartIndex = action.getStartIndex();
+ int actionEndIndex = action.getEndIndex();
+ return (actionStartIndex == startIndex &&
+ actionEndIndex == endIndex);
+ }
+
+
+ protected void removeActionsNotContainingRange(List actionList, int startIndex, int endIndex)
+ {
+ for (int i = actionList.size() - 1; i >= 0; i--)
+ {
+ ModelQueryAction action = (ModelQueryAction)actionList.get(i);
+ if (!isActionContainingRange(action, startIndex, endIndex))
+ {
+ actionList.remove(i);
+ }
+ }
+ }
+
+
+ protected void removeActionsNotMatchingRange(List actionList, int startIndex, int endIndex)
+ {
+ for (int i = actionList.size() - 1; i >= 0; i--)
+ {
+ ModelQueryAction action = (ModelQueryAction)actionList.get(i);
+ if (!isActionMatchingRange(action, startIndex, endIndex))
+ {
+ actionList.remove(i);
+ }
+ }
+ }
+
+
+ public static class MatchModelVisitor
+ {
+ int indent;
+ int elementIndex;
+ Node parent;
+ List actionList;
+
+ public MatchModelVisitor(Node parent, List actionList)
+ {
+ this.parent = parent;
+ this.actionList = actionList;
+ }
+
+ public int indexOfNextElement(int start)
+ {
+ NodeList nodeList = parent.getChildNodes();
+ int length = nodeList.getLength();
+ int result = length;
+ for (int i = start; i < length; i++)
+ {
+ Node node = nodeList.item(i);
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ result = i;
+ break;
+ }
+ }
+ return result;
+ }
+
+ public void visitMatchModelNode(CMValidator.MatchModelNode matchModelNode)
+ {
+ int startIndex = indexOfNextElement(elementIndex);
+
+ String cmNodeName = matchModelNode.cmNode != null ? matchModelNode.cmNode.getNodeName() : "null";
+ //printIndented(indent, "+MatchModelNode : " + cmNodeName + " " + startIndex);
+
+ indent += 2;
+ for (Iterator iterator = matchModelNode.children.iterator(); iterator.hasNext(); )
+ {
+ CMValidator.MatchModelNode child = (CMValidator.MatchModelNode)iterator.next();
+ visitMatchModelNode(child);
+ }
+ indent -= 2;
+
+ if (matchModelNode.cmNode != null)
+ {
+ int nodeType = matchModelNode.cmNode.getNodeType();
+ if (nodeType == CMNode.GROUP)
+ {
+ CMGroup group = (CMGroup)matchModelNode.cmNode;
+ if (group.getOperator() == CMGroup.CHOICE)
+ {
+ addReplaceActions(matchModelNode, group, startIndex, elementIndex - 1);
+ }
+ }
+ else if (nodeType == CMNode.ELEMENT_DECLARATION)
+ {
+ elementIndex = startIndex + 1;
+ }
+ //printIndented(indent, "-MatchModelNode : " + cmNodeName + " " + (elementIndex - 1));
+ }
+ }
+
+ public void addReplaceActions(CMValidator.MatchModelNode matchModelNode, CMGroup group, int startIndex, int endIndex)
+ {
+ CMNode excludeCMNode = null;
+ if (matchModelNode.children.size() > 0)
+ {
+ CMValidator.MatchModelNode child = (CMValidator.MatchModelNode)matchModelNode.children.get(0);
+ excludeCMNode = child.cmNode;
+ }
+
+ CMNodeList nodeList = group.getChildNodes();
+ int size = nodeList.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ CMNode alternative = nodeList.item(i);
+ if (alternative != excludeCMNode)
+ {
+ Action action = new Action(ModelQueryAction.REPLACE, parent, alternative, startIndex, endIndex);
+ actionList.add(action);
+ }
+ }
+ }
+ }
+
+ //public static void printIndented(int indent, String string)
+ //{
+ // for (int i = 0; i < indent; i++)
+ // {
+ // System.out.print(" ");
+ // }
+ // System.out.println(string);
+ //}
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/ModelQueryImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/ModelQueryImpl.java
new file mode 100644
index 0000000000..befc4043de
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/ModelQueryImpl.java
@@ -0,0 +1,848 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.modelqueryimpl.*;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.util.CMDataTypeValueHelper;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.util.DOMValidator;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryAssociationProvider;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension.ModelQueryExtensionManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMVisitor;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceTable;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+
+/**
+ * This class implements a large portion of the ModelQuery interfaces.
+ * Some work is delegated to the DOMHelper, CMDocumentManager, and DOMValidator.
+ */
+public class ModelQueryImpl implements ModelQuery
+{
+ protected ModelQueryAssociationProvider modelQueryAssociationProvider;
+ protected ModelQueryActionHelper modelQueryActionHelper;
+ protected DOMValidator validator;
+ protected ModelQueryExtensionManagerImpl extensionManager;
+ protected CMDataTypeValueHelper valueHelper;
+ protected int editMode = EDIT_MODE_CONSTRAINED_STRICT;
+
+ public ModelQueryImpl(ModelQueryAssociationProvider modelQueryAssociationProvider)
+ {
+ this.modelQueryAssociationProvider = modelQueryAssociationProvider;
+ modelQueryActionHelper = createModelQueryActionHelper();
+ validator = new DOMValidator();
+ extensionManager = new ModelQueryExtensionManagerImpl();
+ valueHelper = new CMDataTypeValueHelper();
+ }
+
+ public int getEditMode()
+ {
+ return editMode;
+ }
+
+ public void setEditMode(int editMode)
+ {
+ this.editMode =editMode;
+ }
+
+
+ // factory methods
+ public ModelQueryActionHelper createModelQueryActionHelper()
+ {
+ return new ModelQueryActionHelper(this);
+ }
+
+ public DOMValidator getValidator()
+ {
+ return validator;
+ }
+
+ public CMDocument getCorrespondingCMDocument(Node node)
+ {
+ return modelQueryAssociationProvider.getCorrespondingCMDocument(node);
+ }
+
+ public CMNode getCMNode(Node node)
+ {
+ return modelQueryAssociationProvider.getCMNode(node);
+ }
+
+ public CMDataType getCMDataType(Text text)
+ {
+ return modelQueryAssociationProvider.getCMDataType(text);
+ }
+
+ public CMAttributeDeclaration getCMAttributeDeclaration(Attr attr)
+ {
+ return modelQueryAssociationProvider.getCMAttributeDeclaration(attr);
+ }
+
+ public CMElementDeclaration getCMElementDeclaration(Element element)
+ {
+ return modelQueryAssociationProvider.getCMElementDeclaration(element);
+ }
+
+ public CMDocumentManager getCMDocumentManager()
+ {
+ CMDocumentManager result = null;
+ if (modelQueryAssociationProvider instanceof XMLAssociationProvider)
+ {
+ XMLAssociationProvider xmlAssociationProvider = (XMLAssociationProvider)modelQueryAssociationProvider;
+ result = xmlAssociationProvider.getCMDocumentManager();
+ }
+ return result;
+ }
+
+
+ /**
+ * @deprected - use 3 arg version below
+ */
+ public List getCMDocumentList(Element element, String uri)
+ {
+ return Collections.EMPTY_LIST;
+ }
+
+ public List getCMDocumentList(Element element, CMElementDeclaration ed, String uri)
+ {
+ List result = new Vector();
+ if (modelQueryAssociationProvider instanceof XMLAssociationProvider)
+ {
+ XMLAssociationProvider xmlAssociationProvider = (XMLAssociationProvider)modelQueryAssociationProvider;
+
+ // todo... revist... handle each ##thing explicitly
+ //
+ if (uri == null)
+ {
+ uri = "##any";
+ }
+
+ if (uri.equals("##targetNamespace"))
+ {
+ CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument");
+ if (cmDocument != null)
+ {
+ result.add(cmDocument);
+ }
+ }
+ else if (uri.equals("##any") || uri.equals("##other"))
+ {
+ String excludedURI = null;
+ if (uri.equals("##other"))
+ {
+ CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument");
+ if (cmDocument != null)
+ {
+ excludedURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ }
+ }
+
+ // in this case we should consider all of the schema related to this document
+ //
+ NamespaceTable namespaceTable = new NamespaceTable(element.getOwnerDocument());
+ namespaceTable.addElementLineage(element);
+ List list = namespaceTable.getNamespaceInfoList();
+ for (Iterator i = list.iterator(); i.hasNext();)
+ {
+ NamespaceInfo info = (NamespaceInfo)i.next();
+ if (info.uri != null && !info.uri.equals(excludedURI))
+ {
+ CMDocument document = xmlAssociationProvider.getCMDocument(info.uri, info.locationHint, "XSD");
+ if (document != null)
+ {
+ result.add(document);
+ }
+ }
+ }
+ }
+ else
+ {
+ CMDocument document = xmlAssociationProvider.getCMDocument(element, uri);
+ if (document != null)
+ {
+ result.add(document);
+ }
+ }
+ }
+ return result;
+ }
+
+
+ public CMDocument getCMDocument(Element element, String uri)
+ {
+
+ CMDocument result = null;
+ if (modelQueryAssociationProvider instanceof XMLAssociationProvider)
+ {
+ XMLAssociationProvider xmlAssociationProvider = (XMLAssociationProvider)modelQueryAssociationProvider;
+ result = xmlAssociationProvider.getCMDocument(element, uri);
+ }
+ //ContentModelManager.println("ModelQueryImpl.getCMDocument(" + element.getNodeName() + ", " + uri + ") = " + result);
+ return result;
+ }
+
+ public boolean isContentValid(Element element)
+ {
+ CMElementDeclaration ed = getCMElementDeclaration(element);
+ return isContentValid(ed, element);
+ }
+
+ public boolean isContentValid(CMElementDeclaration ed, Element element)
+ {
+ boolean result = true;
+ if (ed != null)
+ {
+ // first check to see if all the required attributes are present
+ //
+ CMNamedNodeMap map = ed.getAttributes();
+ int mapLength = map.getLength();
+ for (int i = 0; i < mapLength; i++)
+ {
+ CMAttributeDeclaration ad = (CMAttributeDeclaration)map.item(i);
+ String attributeName = DOMNamespaceHelper.computeName(ad, element, null);
+ if (ad.getUsage() == CMAttributeDeclaration.REQUIRED)
+ {
+ Attr attr = element.getAttributeNode(attributeName);
+ if (attr == null)
+ {
+ result = false;
+ break;
+ }
+ }
+ }
+
+ // now check to see of the children validate properly
+ //
+ if (result)
+ {
+ CMNode[] originArray = getOriginArray(element);
+ result = originArray != null && originArray.length == element.getChildNodes().getLength();
+ }
+ }
+ return result;
+ }
+
+
+ public CMNode getOrigin(Node node)
+ {
+ CMNode result = null;
+ // todo... make sure parent is right
+ //
+ Node parentNode = getParentOrOwnerNode(node);
+ if (parentNode != null && parentNode.getNodeType() == Node.ELEMENT_NODE)
+ {
+ Element parentElement = (Element)parentNode;
+ CMNode[] array = getOriginArray(parentElement);
+ if (array != null)
+ {
+ int index = getIndexOfNode(parentElement.getChildNodes(), node);
+ if (index < array.length)
+ {
+ result = array[index];
+ }
+ }
+ }
+ return result;
+ }
+
+ public CMNode[] getOriginArray(Element element)
+ {
+ CMElementDeclaration ed = getCMElementDeclaration(element);
+ return (ed != null) ? getValidator().getOriginArray(ed, element) : null;
+ }
+
+ public int getIndexOfNode(NodeList nodeList, Node node)
+ {
+ int result = -1;
+ int size = nodeList.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ if (nodeList.item(i) == node)
+ {
+ result = i;
+ break;
+ }
+ }
+ return result;
+ }
+
+
+ /**
+ * Returns a list of all CMNode 'meta data' that may be potentially added to the element.
+ */
+ public List getAvailableContent(Element element, CMElementDeclaration ed, int includeOptions)
+ {
+ AvailableContentCMVisitor visitor = new AvailableContentCMVisitor(element, ed);
+ List list = visitor.computeAvailableContent(includeOptions);
+ if (extensionManager != null)
+ {
+ extensionManager.filterAvailableElementContent(list, element, ed);
+ }
+ return list;
+ }
+
+
+ public boolean canInsert(Element parent, CMNode cmNode, int index, int validityChecking)
+ {
+ boolean result = true;
+ CMElementDeclaration ed = getCMElementDeclaration(parent);
+ if (ed != null)
+ {
+ result = canInsert(parent, ed, cmNode, index, validityChecking);
+ }
+ return result;
+ }
+
+
+ public boolean canInsert(Element parent, CMElementDeclaration ed, CMNode cmNode, int index, int validityChecking)
+ {
+ return canInsert(parent, ed, cmNode, index, validityChecking, null);
+ }
+
+ protected boolean canInsert(Element parent, CMElementDeclaration ed, CMNode cmNode, int index, int validityChecking, Object reuseableData)
+ {
+ boolean result = true;
+ switch (cmNode.getNodeType())
+ {
+ case CMNode.ATTRIBUTE_DECLARATION :
+ {
+ String attributeName = DOMNamespaceHelper.computeName(cmNode, parent, null);
+ result = parent.getAttributeNode(attributeName) == null;
+ break;
+ }
+ case CMNode.ELEMENT_DECLARATION :
+ case CMNode.GROUP :
+ {
+ if (validityChecking == VALIDITY_STRICT)
+ {
+ // create list
+ List contentSpecificationList = null;
+ if (reuseableData != null)
+ {
+ contentSpecificationList = (List)reuseableData;
+ }
+ else
+ {
+ contentSpecificationList = getValidator().createContentSpecificationList(parent, ed);
+ }
+ result = getValidator().canInsert(ed, contentSpecificationList, index, cmNode);
+ }
+ break;
+ }
+ case CMNode.DATA_TYPE :
+ {
+ int contentType = ed.getContentType();
+ result = (contentType == CMElementDeclaration.MIXED ||
+ contentType == CMElementDeclaration.PCDATA ||
+ contentType == CMElementDeclaration.ANY);
+ break;
+ }
+ default :
+ {
+ result = false;
+ break;
+ }
+ }
+ return result;
+ }
+
+ public boolean canInsert(Element parent, List cmNodeList, int index, int validityChecking)
+ {
+ // todo
+ return true;
+ }
+
+
+ public boolean canRemove(Node node, int validityChecking)
+ {
+ boolean result = true;
+ if (validityChecking == VALIDITY_STRICT)
+ {
+ int nodeType = node.getNodeType();
+ switch (nodeType)
+ {
+ case Node.ATTRIBUTE_NODE:
+ {
+ CMAttributeDeclaration ad = getCMAttributeDeclaration((Attr)node);
+ if (ad != null)
+ {
+ result = (ad.getUsage() == CMAttributeDeclaration.OPTIONAL);
+ }
+ break;
+ }
+ case Node.ELEMENT_NODE:
+ {
+ Node parentNode = node.getParentNode();
+ if (parentNode.getNodeType() == Node.ELEMENT_NODE)
+ {
+ Element parentElement = (Element)parentNode;
+ CMElementDeclaration ed = getCMElementDeclaration(parentElement);
+ if (ed != null)
+ {
+ List contentSpecificationList = getValidator().createContentSpecificationList(parentElement, ed);
+ int index = getIndexOfNode(parentElement.getChildNodes(), node);
+ result = getValidator().canRemove(ed, contentSpecificationList, index);
+ }
+ }
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+
+ public boolean canRemove(List nodeList, int validityChecking)
+ {
+ boolean result = true;
+
+ if (validityChecking == VALIDITY_STRICT)
+ {
+ Element parentElement = null;
+ List childList = null;
+
+ for (Iterator i = nodeList.iterator(); i.hasNext(); )
+ {
+ Node node = (Node)i.next();
+
+ if (parentElement == null)
+ {
+ parentElement = getParentOrOwnerElement(node);
+ }
+ else if (parentElement != getParentOrOwnerElement(node))
+ {
+ // make sure the parent are the same
+ result = false;
+ break;
+ }
+
+ if (parentElement == null)
+ {
+ result = true;
+ break;
+ }
+
+ int nodeType = node.getNodeType();
+ if (nodeType == Node.ATTRIBUTE_NODE)
+ {
+ if (!canRemove(node, validityChecking))
+ {
+ result = false;
+ break;
+ }
+ }
+ else
+ {
+ if (childList == null)
+ {
+ childList = nodeListToList(parentElement.getChildNodes());
+ }
+ childList.remove(node);
+ }
+ }
+
+ if (result && childList != null)
+ {
+ CMElementDeclaration ed = getCMElementDeclaration(parentElement);
+ if (ed != null)
+ {
+ List contentSpecificationList = getValidator().createContentSpecificationList(childList, ed);
+ result = getValidator().isValid(ed, contentSpecificationList);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public boolean canReplace(Element parent, int startIndex, int endIndex, CMNode cmNode, int validityChecking)
+ {
+ return true;
+ }
+
+ public boolean canReplace(Element parent, int startIndex, int endIndex, List cmNodeList, int validityChecking)
+ {
+ return true;
+ }
+
+ /**
+ * This method is experimental... use at your own risk
+ */
+ public boolean canWrap(Element childElement, CMElementDeclaration wrapElement, int validityChecking)
+ {
+ boolean result = true;
+ Node parentNode = childElement.getParentNode();
+ if (parentNode.getNodeType() == Node.ELEMENT_NODE)
+ {
+ Element parentElement = (Element)parentNode;
+ CMElementDeclaration parentEd = getCMElementDeclaration(parentElement);
+ if (parentEd != null)
+ {
+ if (validityChecking == VALIDITY_STRICT)
+ {
+ int index = getIndexOfNode(parentElement.getChildNodes(), childElement);
+
+ List contentSpecificationList = getValidator().createContentSpecificationList(parentElement, parentEd);
+ List subList = contentSpecificationList.subList(index, index + 1);
+ result = getValidator().canReplace(parentEd, contentSpecificationList, index, index, wrapElement);
+ if (result)
+ {
+ result = getValidator().isValid(wrapElement, subList);
+ }
+ }
+ }
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ public void getInsertActions(Element parent, CMElementDeclaration ed, int index, int includeOptions, int validityChecking, List actionList)
+ {
+ modelQueryActionHelper.getInsertActions(parent, ed, index, includeOptions, validityChecking, actionList);
+ }
+
+ public void getInsertActions(Document parent, CMDocument cmDocument, int index, int includeOptions, int validityChecking, List actionList)
+ {
+ modelQueryActionHelper.getInsertActions(parent, cmDocument, index, includeOptions, validityChecking, actionList);
+ }
+
+ public void getReplaceActions(Element parent, CMElementDeclaration ed, int includeOptions, int validityChecking, List actionList)
+ {
+ modelQueryActionHelper.getReplaceActions(parent, ed, includeOptions, validityChecking, actionList);
+ }
+
+ public void getReplaceActions(Element parent, CMElementDeclaration ed, List selectedChildren, int includeOptions, int validityChecking, List actionList)
+ {
+ modelQueryActionHelper.getReplaceActions(parent, ed, selectedChildren, includeOptions, validityChecking, actionList);
+ }
+
+ public void getInsertChildNodeActionTable(Element parent, CMElementDeclaration ed, int validityChecking, Hashtable actionTable)
+ {
+ modelQueryActionHelper.getInsertChildNodeActionTable(parent, ed, validityChecking, actionTable);
+ }
+
+ public void getActionTable(Element parent, CMElementDeclaration ed, int index, int validityChecking, Hashtable actionTable)
+ {
+ //modelQueryActionHelper.getAllActions(parent, ed, validityChecking, actionList);
+ }
+
+
+ // some helper methods
+ //
+ protected Node getParentOrOwnerNode(Node node)
+ {
+ return (node.getNodeType() == Node.ATTRIBUTE_NODE) ?
+ ((Attr)node).getOwnerElement() :
+ node.getParentNode();
+ }
+
+ protected Element getParentOrOwnerElement(Node node)
+ {
+ Node parent = getParentOrOwnerNode(node);
+ return (parent.getNodeType() == Node.ELEMENT_NODE) ? (Element)parent : null;
+ }
+
+
+ protected List nodeListToList(NodeList nodeList)
+ {
+ int size = nodeList.getLength();
+ Vector v = new Vector(size);
+ for (int i = 0; i < size; i++)
+ {
+ v.add(nodeList.item(i));
+ }
+ return v;
+ }
+
+ /**
+ protected List getCMNodeList(NodeList nodeList)
+ {
+ int size = nodeList.getLength();
+ Vector v = new Vector(size);
+ for (int i = 0; i < size; i++)
+ {
+ v.add(getCMNode(nodeList.item(i));
+ }
+ return v;
+ }
+ */
+
+ public class AvailableContentCMVisitor extends CMVisitor
+ {
+ public Hashtable childNodeTable = new Hashtable();
+ public Hashtable attributeTable = new Hashtable();
+ public Element rootElement;
+ public CMElementDeclaration rootElementDeclaration;
+ public boolean isRootVisited;
+ protected boolean includeSequenceGroups;
+
+ public AvailableContentCMVisitor(Element rootElement, CMElementDeclaration rootElementDeclaration)
+ {
+ this.rootElement = rootElement;
+ this.rootElementDeclaration = rootElementDeclaration;
+ }
+
+ protected String getKey(CMNode cmNode)
+ {
+ String key = cmNode.getNodeName();
+ CMDocument cmDocument = (CMDocument)cmNode.getProperty("CMDocument");
+ if (cmDocument != null)
+ {
+ String namespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ if (namespaceURI != null)
+ {
+ key = "[" + namespaceURI + "]" + key;
+ }
+ }
+ return key;
+ }
+
+ public List computeAvailableContent(int includeOptions)
+ {
+ Vector v = new Vector();
+
+ int contentType = rootElementDeclaration.getContentType();
+ includeSequenceGroups = ((includeOptions & INCLUDE_SEQUENCE_GROUPS) != 0);
+ visitCMNode(rootElementDeclaration);
+
+ if ((includeOptions & INCLUDE_ATTRIBUTES) != 0)
+ {
+ v.addAll(attributeTable.values());
+ CMAttributeDeclaration nillableAttribute = (CMAttributeDeclaration)rootElementDeclaration.getProperty("http://org.eclipse.wst/cm/properties/nillable");
+ if (nillableAttribute != null)
+ {
+ v.add(nillableAttribute);
+ }
+ }
+
+ if ((includeOptions & INCLUDE_CHILD_NODES) != 0)
+ {
+ if (contentType == CMElementDeclaration.MIXED ||
+ contentType == CMElementDeclaration.ELEMENT)
+ {
+ v.addAll(childNodeTable.values());
+ }
+ else if (contentType == CMElementDeclaration.ANY)
+ {
+ CMDocument cmDocument = (CMDocument)rootElementDeclaration.getProperty("CMDocument");
+ if (cmDocument != null)
+ {
+ CMNamedNodeMap elements = cmDocument.getElements();
+ for (Iterator i = elements.iterator(); i.hasNext(); )
+ {
+ v.add(i.next());
+ }
+ }
+ }
+
+ if (contentType == CMElementDeclaration.MIXED ||
+ contentType == CMElementDeclaration.PCDATA ||
+ contentType == CMElementDeclaration.ANY)
+ {
+ CMDataType dataType = rootElementDeclaration.getDataType();
+ if (dataType != null)
+ {
+ v.add(dataType);
+ }
+ }
+ }
+ return v;
+ }
+
+ public void visitCMAnyElement(CMAnyElement anyElement)
+ {
+ String uri = anyElement.getNamespaceURI();
+ List list = getCMDocumentList(rootElement, rootElementDeclaration, uri);
+ for (Iterator iterator = list.iterator(); iterator.hasNext(); )
+ {
+ CMDocument cmdocument = (CMDocument)iterator.next();
+ if (cmdocument != null)
+ {
+ CMNamedNodeMap map = cmdocument.getElements();
+ int size = map.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ CMNode ed = map.item(i);
+
+ childNodeTable.put(getKey(ed), ed);
+ }
+ }
+ }
+ }
+
+ public void visitCMAttributeDeclaration(CMAttributeDeclaration ad)
+ {
+ super.visitCMAttributeDeclaration(ad);
+ attributeTable.put(ad.getNodeName(), ad);
+ }
+
+ public void visitCMElementDeclaration(CMElementDeclaration ed)
+ {
+ if (ed == rootElementDeclaration && !isRootVisited)
+ {
+ isRootVisited = true;
+ super.visitCMElementDeclaration(ed);
+ }
+ else
+ {
+ if (!Boolean.TRUE.equals(ed.getProperty("Abstract")))
+ {
+ childNodeTable.put(getKey(ed), ed);
+ }
+
+ CMNodeList substitutionGroup = (CMNodeList)ed.getProperty("SubstitutionGroup");
+ if (substitutionGroup != null)
+ {
+ handleSubstitutionGroup(substitutionGroup);
+ }
+ }
+ }
+
+ protected void handleSubstitutionGroup(CMNodeList substitutionGroup)
+ {
+ int substitutionGroupLength = substitutionGroup.getLength();
+ if (substitutionGroupLength > 1)
+ {
+ for (int i = 0; i < substitutionGroupLength; i++)
+ {
+ CMNode ed = substitutionGroup.item(i);
+ if (!Boolean.TRUE.equals(ed.getProperty("Abstract")))
+ {
+ childNodeTable.put(getKey(ed), ed);
+ }
+ }
+ }
+ }
+
+ public void visitCMGroup(CMGroup group)
+ {
+ if (includeSequenceGroups)
+ {
+ if (group.getOperator() == CMGroup.SEQUENCE &&
+ group.getChildNodes().getLength() > 1 &&
+ includesRequiredContent(group))
+ {
+ childNodeTable.put(group, group);
+ }
+ }
+ super.visitCMGroup(group);
+ }
+
+ public boolean includesRequiredContent(CMGroup group)
+ {
+ List list = getValidator().createContentSpecificationList(group);
+ return list.size() > 1;
+ }
+ }
+
+
+ /**
+ * @deprected - use getPossibleDataTypeValues()
+ */
+ public List getDataTypeValues(Element element, CMNode cmNode)
+ {
+ return Arrays.asList(getPossibleDataTypeValues(element, cmNode));
+ }
+
+ /**
+ * This methods return an array of possible values corresponding to the datatype of the CMNode (either an CMAttributeDeclaration or a CMElementDeclaration)
+ */
+ public String[] getPossibleDataTypeValues(Element element, CMNode cmNode)
+ {
+ List list = new Vector();
+
+ if (cmNode != null)
+ {
+ CMDataType dataType = null;
+ if (cmNode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION)
+ {
+ dataType = ((CMAttributeDeclaration)cmNode).getAttrType();
+ }
+ else if (cmNode.getNodeType() == CMNode.ELEMENT_DECLARATION)
+ {
+ dataType = ((CMElementDeclaration)cmNode).getDataType();
+ }
+
+ String[] enumeratedValues = dataType != null ? dataType.getEnumeratedValues() : null;
+ if (enumeratedValues != null)
+ {
+ for (int i = 0; i < enumeratedValues.length; i++)
+ {
+ list.add(enumeratedValues[i]);
+ }
+ }
+ }
+
+ addValuesForXSIType(element, cmNode, list);
+
+ if (extensionManager != null)
+ {
+ list.addAll(extensionManager.getDataTypeValues(element, cmNode));
+ }
+
+ int listSize = list.size();
+ String[] result = new String[listSize];
+ for (int i = 0; i < listSize; i++)
+ {
+ result[i] = (String)list.get(i);
+ }
+ return result;
+ }
+
+
+ protected void addValuesForXSIType(Element element, CMNode cmNode, List list)
+ {
+ if (cmNode != null && cmNode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION)
+ {
+ CMAttributeDeclaration ad = (CMAttributeDeclaration)cmNode;
+ if (valueHelper.isXSIType(ad))
+ {
+ NamespaceTable table = new NamespaceTable(element.getOwnerDocument());
+ table.addElementLineage(element);
+ list.addAll(valueHelper.getQualifiedXSITypes(ad, table));
+ }
+ }
+ }
+
+
+ public ModelQueryExtensionManager getExtensionManager()
+ {
+ return extensionManager;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/SimpleAssociationProvider.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/SimpleAssociationProvider.java
new file mode 100644
index 0000000000..b8b653cc92
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/SimpleAssociationProvider.java
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryCMProvider;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+/**
+ *
+ */
+public class SimpleAssociationProvider extends BaseAssociationProvider
+{
+ protected ModelQueryCMProvider modelQueryCMProvider;
+
+ public SimpleAssociationProvider(ModelQueryCMProvider modelQueryCMProvider)
+ {
+ this.modelQueryCMProvider = modelQueryCMProvider;
+ }
+
+ public CMDocument getCorrespondingCMDocument(Node node)
+ {
+ return modelQueryCMProvider.getCorrespondingCMDocument(node);
+ }
+
+ public CMElementDeclaration getCMElementDeclaration(Element element)
+ {
+ CMElementDeclaration result = null;
+ CMDocument cmDocument = getCorrespondingCMDocument(element);
+ if (cmDocument != null)
+ {
+ result = (CMElementDeclaration)cmDocument.getElements().getNamedItem(element.getNodeName());
+ }
+ return result;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/XMLAssociationProvider.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/XMLAssociationProvider.java
new file mode 100644
index 0000000000..3313dfaa7d
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/modelqueryimpl/XMLAssociationProvider.java
@@ -0,0 +1,402 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentReferenceProvider;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceTable;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ *
+ */
+public abstract class XMLAssociationProvider extends BaseAssociationProvider implements CMDocumentReferenceProvider
+{
+ protected CMDocumentCache cmDocumentCache;
+ protected CMDocumentManagerImpl documentManager;
+
+ public XMLAssociationProvider(CMDocumentCache cmDocumentCache)
+ {
+ this.cmDocumentCache = cmDocumentCache;
+ documentManager = new CMDocumentManagerImpl(cmDocumentCache, this);
+ }
+
+ public CMDocumentManager getCMDocumentManager()
+ {
+ return documentManager;
+ }
+
+
+ public static String[] getDoctypeInfo(Document document)
+ {
+ String[] result = null;
+ DocumentType doctype = document.getDoctype();
+
+ // defect 206833 ... here we test for DTDs that are declared inline
+ // since we currently have no way of making use of inline DTDs we ingore them
+ // so that the implict DTD (if any) can be used
+ if (doctype != null && (doctype.getPublicId() != null || doctype.getSystemId() != null))
+ {
+ result = new String[2];
+ result[0] = doctype.getPublicId();
+ result[1] = doctype.getSystemId();
+ }
+ else if (getImplictDoctype(document) != null)
+ {
+ result = getImplictDoctype(document);
+ }
+ return result;
+ }
+
+
+ protected static String[] getImplictDoctype(Document document)
+ {
+ String[] result = null;
+ /*
+ DOMExtension domExtension = DOMExtensionProviderRegistry.getInstance().getDOMExtension(document);
+ if (domExtension != null)
+ {
+ result = domExtension.getImplicitDoctype();
+ }*/
+ return result;
+ }
+
+ public CMDocument getCorrespondingCMDocument(Node node)
+ {
+ return getCorrespondingCMDocument(node, true);
+ }
+
+ protected CMDocument getCorrespondingCMDocument(Node node, boolean getDocumentFromCMNode)
+ {
+ CMDocument result = null;
+ try
+ {
+ Document document = node.getNodeType() == Node.DOCUMENT_NODE ? (Document)node : node.getOwnerDocument();
+
+ String[] doctypeInfo = getDoctypeInfo(document);
+
+ if (doctypeInfo != null)
+ {
+ result = getCMDocument(doctypeInfo[0], doctypeInfo[1], "DTD");
+ }
+ // defect 211236 ... in some cases calling this method can result in a cycle
+ // we use the getDocumentFromCMNode as a flag to avoid this
+ // TODO... see if there is a way to re-organize to avoid the need for this flag
+ else if (getDocumentFromCMNode)
+ {
+ CMNode cmNode = getCMNode(node);
+ if (cmNode != null)
+ {
+ // todo... add a getCMDocument() methods to CMNode
+ // for now use the getProperty interface
+ result = (CMDocument)cmNode.getProperty("CMDocument");
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return result;
+ }
+
+
+ public CMDocument getCMDocument(Element element, String uri)
+ {
+ CMDocument result = null;
+ NamespaceTable namespaceTable = new NamespaceTable(element.getOwnerDocument());
+ namespaceTable.addElementLineage(element);
+ NamespaceInfo namespaceInfo = namespaceTable.getNamespaceInfoForURI(uri);
+ if (namespaceInfo != null)
+ {
+ result = getCMDocument(namespaceInfo.uri, namespaceInfo.locationHint, "XSD");
+ }
+ return result;
+ }
+
+
+ public CMDocument getCMDocument(String publicId, String systemId, String type)
+ {
+ //String resolvedGrammarURI = resolveGrammarURI(document, publicId, systemId);
+ return documentManager.getCMDocument(publicId, systemId, type);
+ }
+
+ //public CMDocument getCMDocument(Document document, String publicId, String systemId)
+ //{
+ // //String resolvedGrammarURI = resolveGrammarURI(document, publicId, systemId);
+ // return documentManager.getCMDocument(publicId, systemId);
+ //}
+
+ public String resolveGrammarURI(String publicId, String systemId)
+ {
+ return resolveGrammarURI(null, publicId, systemId);
+ }
+
+
+ /**
+ * This method should be specialized in order to implement specialized uri resolution
+ */
+ protected String resolveGrammarURI(Document document, String publicId, String systemId)
+ {
+ return systemId;
+ }
+
+
+ public CMElementDeclaration getCMElementDeclaration(Element element)
+ {
+ CMElementDeclaration result = null;
+ Document document = element.getOwnerDocument();
+ String[] doctypeInfo = getDoctypeInfo(document);
+ if (doctypeInfo != null)
+ {
+ // we have detected doctype information so we assume that we can locate the CMElementDeclaration
+ // in the CMDocument's table of global elements
+ CMDocument cmDocument = getCorrespondingCMDocument(element, false);
+
+ // TODO... consider replacing above with
+ // CMDocument cmDocument = getCMDocument(document, doctypeInfo[0], doctypeInfo[1]);
+
+ if (cmDocument != null)
+ {
+ result = (CMElementDeclaration)cmDocument.getElements().getNamedItem(element.getNodeName());
+
+ // this is a hack to get our xsl code assist working... we might want to handle similar
+ // grammar behaviour via some established model query setting
+ if (result == null && getImplictDoctype(document) != null)
+ {
+ Node parent = element.getParentNode();
+ if (parent != null && parent.getNodeType() == Node.ELEMENT_NODE)
+ {
+ result = getCMElementDeclaration((Element)parent);
+ }
+ }
+ }
+ }
+ else
+ {
+ // here we use a namespaceTable to consider if the root element has any namespace information
+ //
+ NamespaceTable namespaceTable = new NamespaceTable(element.getOwnerDocument());
+ List list = NamespaceTable.getElementLineage(element);
+ Element rootElement = (Element)list.get(0);
+ namespaceTable.addElement(rootElement);
+
+ if (namespaceTable.isNamespaceEncountered())
+ {
+ // we assume that this is an XMLSchema style namespace aware document
+ result = getCMElementDeclaration(element, list, namespaceTable);
+ }
+ else
+ {
+ // we assume that this is an inferred CMDocument for a DTD style 'namespaceless' document
+ CMDocument cmDocument = getCMDocument("", "", "DTD");
+ if (cmDocument != null)
+ {
+ result = (CMElementDeclaration)cmDocument.getElements().getNamedItem(element.getNodeName());
+ }
+ }
+ }
+ return result;
+ }
+
+
+ protected CMElementDeclaration getCMElementDeclaration(Element targetElement, List list, NamespaceTable namespaceTable)
+ {
+ CMElementDeclaration currentED = null;
+ try
+ {
+ int listSize = list.size();
+ for (int i = 0; i < listSize; i++)
+ {
+ Element element = (Element)list.get(i);
+
+ if (i != 0)
+ {
+ namespaceTable.addElement(element);
+ }
+
+ String nodeName = element.getNodeName();
+ String unprefixedName = DOMNamespaceHelper.getUnprefixedName(nodeName);
+ String prefix = DOMNamespaceHelper.getPrefix(nodeName);
+
+ CMElementDeclaration ed = null;
+
+ // see if the element is a local of the currentED
+ //
+ if (currentED != null)
+ {
+ ed = (CMElementDeclaration)currentED.getLocalElements().getNamedItem(unprefixedName);
+ }
+
+ if (ed == null)
+ {
+ NamespaceInfo namespaceInfo = namespaceTable.getNamespaceInfoForPrefix(prefix);
+ if (namespaceInfo != null)
+ {
+ CMDocument cmDocument = getCMDocument(namespaceInfo.uri, namespaceInfo.locationHint, "XSD");
+ if (cmDocument != null)
+ {
+ ed = (CMElementDeclaration)cmDocument.getElements().getNamedItem(unprefixedName);
+ }
+ }
+ }
+ currentED = ed;
+
+ // handle XSIType
+ if (currentED != null)
+ {
+ CMElementDeclaration derivedED = getDerivedCMElementDeclaration(element, currentED, namespaceTable);
+ if (derivedED != null)
+ {
+ currentED = derivedED;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ return currentED;
+ }
+
+
+ protected CMElementDeclaration getDerivedCMElementDeclaration(Element element, CMElementDeclaration ed, NamespaceTable namespaceTable)
+ {
+ CMElementDeclaration result = null;
+ String xsiPrefix = namespaceTable.getPrefixForURI("http://www.w3.org/2001/XMLSchema-instance");
+ if (xsiPrefix != null)
+ {
+ String xsiTypeValue = element.getAttribute(xsiPrefix + ":type");
+ if (xsiTypeValue != null)
+ {
+ String typePrefix = DOMNamespaceHelper.getPrefix(xsiTypeValue);
+ String typeName = DOMNamespaceHelper.getUnprefixedName(xsiTypeValue);
+ String typeURI = namespaceTable.getURIForPrefix(typePrefix);
+ String uriQualifiedTypeName = typeName;
+ if (typeURI != null && typeURI.length() > 0)
+ {
+ uriQualifiedTypeName = "[" + typeURI + "]" + typeName;
+ }
+ result = (CMElementDeclaration)ed.getProperty("DerivedElementDeclaration=" + uriQualifiedTypeName);
+ }
+ }
+ return result;
+ }
+
+
+ public CMAttributeDeclaration getCMAttributeDeclaration(Attr attr)
+ {
+ CMAttributeDeclaration result = null;
+ Element element = attr.getOwnerElement();
+ if (element != null)
+ {
+ CMElementDeclaration ed = getCMElementDeclaration(element);
+ if (ed != null)
+ {
+ result = (CMAttributeDeclaration)ed.getAttributes().getNamedItem(attr.getName());
+ if (result == null)
+ {
+ // try to get the unprefixed name
+ String name = DOMNamespaceHelper.getUnprefixedName(attr.getName());
+ result = (CMAttributeDeclaration)ed.getAttributes().getNamedItem(name);
+ }
+ if (result == null)
+ {
+ // todo... perhaps this is a globally defined attribute...
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * This method returns a list of CMDocumentReferences associated with a particular node or subtree
+ */
+ public List getCMDocumentReferences(Node node, boolean deep)
+ {
+ List result = new ArrayList();
+ Document document = (node.getNodeType() == Node.DOCUMENT_NODE) ? (Document)node : node.getOwnerDocument();
+ DocumentType doctype = document.getDoctype();
+ // defect 206833 ... here we test for DTDs that are declared inline
+ // since we currently have no way of making use of inline DTDs we ingore them
+ // so that the implict DTD (if any) can be used
+ if (doctype != null && (doctype.getPublicId() != null || doctype.getSystemId() != null))
+ {
+ String uri = resolveGrammarURI(document, doctype.getPublicId(), doctype.getSystemId());
+ result.add(new CMDocumentReferenceImpl(doctype.getPublicId(), uri));
+ }
+ else if (getImplictDoctype(document) != null)
+ {
+ String[] implicitDoctype = getImplictDoctype(document);
+ String uri = resolveGrammarURI(document, implicitDoctype[0], implicitDoctype[1]);
+ result.add(new CMDocumentReferenceImpl(implicitDoctype[0], uri));
+ }
+ else
+ {
+ NamespaceTable namespaceTable = new NamespaceTable(document);
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ namespaceTable.addElement((Element)node);
+ }
+ if (deep)
+ {
+ addChildElementsToNamespaceTable(node, namespaceTable);
+ }
+ List list = namespaceTable.getNamespaceInfoList();
+ for (Iterator i = list.iterator(); i.hasNext();)
+ {
+ NamespaceInfo info = (NamespaceInfo) i.next();
+ String uri = resolveGrammarURI(document, info.uri, info.locationHint);
+ result.add(new CMDocumentReferenceImpl(info.uri, uri));
+ }
+ }
+ return result;
+ }
+
+ protected void addChildElementsToNamespaceTable(Node node, NamespaceTable namespaceTable)
+ {
+ NodeList nodeList = node.getChildNodes();
+ if (nodeList != null)
+ {
+ int nodeListLength = nodeList.getLength();
+ for (int i = 0; i < nodeListLength; i++)
+ {
+ Node childNode = nodeList.item(i);
+ if (childNode.getNodeType() == Node.ELEMENT_NODE)
+ {
+ namespaceTable.addElement((Element)childNode);
+ addChildElementsToNamespaceTable(childNode, namespaceTable);
+ }
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDescriptionBuilder.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDescriptionBuilder.java
new file mode 100644
index 0000000000..1d10c31c78
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDescriptionBuilder.java
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+
+public class CMDescriptionBuilder extends CMVisitor
+{
+ protected StringBuffer sb;
+ protected CMNode root;
+ protected boolean isRootVisited;
+
+ public String buildDescription(CMNode node)
+ {
+ sb = new StringBuffer();
+ root = node;
+ isRootVisited = false;
+ visitCMNode(node);
+ return sb.toString();
+ }
+
+ public void visitCMAnyElement(CMAnyElement anyElement)
+ {
+ sb.append("namespace:uri=\"" + anyElement.getNamespaceURI() + "\"");
+ }
+
+ public void visitCMDataType(CMDataType dataType)
+ {
+ sb.append("#PCDATA");
+ }
+
+ public void visitCMDocument(CMDocument document)
+ {
+ CMNamedNodeMap map = document.getElements();
+ int size = map.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ visitCMNode(map.item(i));
+ }
+ }
+
+ public void visitCMGroup(CMGroup group)
+ {
+ int op = group.getOperator();
+ if (op == CMGroup.ALL)
+ {
+ sb.append("all");
+ }
+
+ sb.append("(");
+
+ String separator = ", ";
+
+ if (op == CMGroup.CHOICE)
+ {
+ separator = " | ";
+ }
+
+ CMNodeList nodeList = group.getChildNodes();
+ int size = nodeList.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ visitCMNode(nodeList.item(i));
+ if (i < size - 1)
+ {
+ sb.append(separator);
+ }
+ }
+ sb.append(")");
+ addOccurenceSymbol(group);
+ }
+
+ public void visitCMElementDeclaration(CMElementDeclaration ed)
+ {
+ if (ed == root && !isRootVisited)
+ {
+ isRootVisited = true;
+ CMContent content = ed.getContent();
+ if (content != null)
+ {
+ if (content.getNodeType() != CMNode.GROUP)
+ {
+ sb.append("(");
+ visitCMNode(content);
+ sb.append(")");
+ }
+ else
+ {
+ visitCMNode(content);
+ }
+ }
+ }
+ else
+ {
+ sb.append(ed.getElementName());
+ addOccurenceSymbol(ed);
+ }
+ }
+
+ public void addOccurenceSymbol(CMContent content)
+ {
+ int min = content.getMinOccur();
+ int max = content.getMaxOccur();
+ if (min == 0)
+ {
+ if (max > 1 || max == -1)
+ {
+ sb.append("*");
+ }
+ else
+ {
+ sb.append("?");
+ }
+ }
+ else if (max > 1 || max == -1)
+ {
+ sb.append("+");
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDocumentCache.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDocumentCache.java
new file mode 100644
index 0000000000..0fa20eb530
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDocumentCache.java
@@ -0,0 +1,203 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+
+
+
+/**
+ *
+ */
+public class CMDocumentCache
+{
+ public static final int STATUS_NOT_LOADED = 0;
+ public static final int STATUS_LOADING = 2;
+ public static final int STATUS_LOADED = 3;
+ public static final int STATUS_ERROR = 4;
+
+ protected class Entry
+ {
+ public String uri;
+ public int status = STATUS_NOT_LOADED;
+ public float progress;
+ public CMDocument cmDocument;
+
+ public Entry(String uri)
+ {
+ this.uri = uri;
+ }
+
+ public Entry(String uri, int status, CMDocument cmDocument)
+ {
+ this.uri = uri;
+ this.status = status;
+ this.cmDocument = cmDocument;
+ }
+ }
+
+ protected Hashtable hashtable;
+ protected List listenerList = new Vector();
+
+
+ /**
+ * temporarily public until caching problem is solved
+ */
+ public CMDocumentCache()
+ {
+ hashtable = new Hashtable();
+ }
+
+ public void addListener(CMDocumentCacheListener listener)
+ {
+ listenerList.add(listener);
+ }
+
+ public void removeListener(CMDocumentCacheListener listener)
+ {
+ listenerList.remove(listener);
+ }
+
+ /**
+ *
+ */
+ public CMDocument getCMDocument(String grammarURI)
+ {
+ CMDocument result = null;
+ if (grammarURI != null)
+ {
+ Entry entry = (Entry)hashtable.get(grammarURI);
+ if (entry != null)
+ {
+ result = entry.cmDocument;
+ }
+ }
+ return result;
+ }
+
+ /**
+ *
+ */
+ public int getStatus(String grammarURI)
+ {
+ int result = STATUS_NOT_LOADED;
+ if (grammarURI != null)
+ {
+ Entry entry = (Entry)hashtable.get(grammarURI);
+ if (entry != null)
+ {
+ result = entry.status;
+ }
+
+ }
+ return result;
+ }
+
+ /**
+ *
+ */
+ protected Entry lookupOrCreate(String grammarURI)
+ {
+ Entry entry = (Entry)hashtable.get(grammarURI);
+ if (entry == null)
+ {
+ entry = new Entry(grammarURI);
+ hashtable.put(grammarURI, entry);
+ }
+ return entry;
+ }
+
+
+ /**
+ *
+ */
+ public void putCMDocument(String grammarURI, CMDocument cmDocument)
+ {
+ if (grammarURI != null && cmDocument != null)
+ {
+ Entry entry = lookupOrCreate(grammarURI);
+ int oldStatus = entry.status;
+ entry.status = STATUS_LOADED;
+ entry.cmDocument = cmDocument;
+ notifyCacheUpdated(grammarURI, oldStatus, entry.status, entry.cmDocument);
+ }
+ }
+
+ /**
+ *
+ */
+ public void setStatus(String grammarURI, int status)
+ {
+ if (grammarURI != null)
+ {
+ Entry entry = lookupOrCreate(grammarURI);
+ int oldStatus = entry.status;
+ entry.status = status;
+ notifyCacheUpdated(grammarURI, oldStatus, entry.status, entry.cmDocument);
+ }
+ }
+
+ /**
+ *
+ */
+ public void clear()
+ {
+ hashtable.clear();
+ notifyCacheCleared();
+ }
+
+ /**
+ *
+ */
+ protected void notifyCacheUpdated(String uri, int oldStatus, int newStatus, CMDocument cmDocument)
+ {
+ List list = new Vector();
+ list.addAll(listenerList);
+ for (Iterator i = list.iterator(); i.hasNext(); )
+ {
+ CMDocumentCacheListener listener = (CMDocumentCacheListener)i.next();
+ listener.cacheUpdated(this, uri, oldStatus, newStatus, cmDocument);
+ }
+ }
+
+ /**
+ *
+ */
+ protected void notifyCacheCleared()
+ {
+ List list = new Vector();
+ list.addAll(listenerList);
+ for (Iterator i = list.iterator(); i.hasNext(); )
+ {
+ CMDocumentCacheListener listener = (CMDocumentCacheListener)i.next();
+ listener.cacheCleared(this);
+ }
+ }
+
+ public List getCMDocuments()
+ {
+ List list = new ArrayList();
+ for (Iterator i = hashtable.values().iterator(); i.hasNext(); )
+ {
+ Entry entry = (Entry)i.next();
+ list.add(entry.cmDocument);
+ }
+ return list;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDocumentCacheListener.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDocumentCacheListener.java
new file mode 100644
index 0000000000..23adffaddc
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMDocumentCacheListener.java
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+
+
+/**
+ * todo... add more interface methods
+ */
+public interface CMDocumentCacheListener
+{
+ /** Tells the client that the cache has been cleared.
+ * This gives clients an opportunity to flush any state that depends on the CMDocument
+ * since this CMDocument will be recomputed on a subsequent 'lookup' request
+ */
+ public void cacheCleared(CMDocumentCache cache);
+
+ /**
+ * Tells the client that the cache has been updated.
+ */
+ public void cacheUpdated(CMDocumentCache cache, String uri, int oldStatus, int newStatus, CMDocument cmDocument);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMVisitor.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMVisitor.java
new file mode 100644
index 0000000000..e9b10f9502
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/CMVisitor.java
@@ -0,0 +1,118 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+
+public class CMVisitor
+{
+ protected int indent = 0;
+
+ public void visitCMNode(CMNode node)
+ {
+ if (node != null)
+ {
+ //ContentModelManager.printlnIndented("visitCMNode : " + node.getNodeName() + " " + node);
+ indent += 2;
+ int nodeType = node.getNodeType();
+ switch (nodeType)
+ {
+ case CMNode.ANY_ELEMENT :
+ {
+ visitCMAnyElement((CMAnyElement)node);
+ break;
+ }
+ case CMNode.ATTRIBUTE_DECLARATION :
+ {
+ visitCMAttributeDeclaration((CMAttributeDeclaration)node);
+ break;
+ }
+ case CMNode.DATA_TYPE :
+ {
+ visitCMDataType((CMDataType)node);
+ break;
+ }
+ case CMNode.DOCUMENT :
+ {
+ visitCMDocument((CMDocument)node);
+ break;
+ }
+ case CMNode.ELEMENT_DECLARATION :
+ {
+ visitCMElementDeclaration((CMElementDeclaration)node);
+ break;
+ }
+ case CMNode.GROUP :
+ {
+ visitCMGroup((CMGroup)node);
+ break;
+ }
+ }
+ indent -= 2;
+ }
+ }
+
+ public void visitCMAnyElement(CMAnyElement anyElement)
+ {
+ }
+
+ public void visitCMAttributeDeclaration(CMAttributeDeclaration ad)
+ {
+ }
+
+ public void visitCMDataType(CMDataType dataType)
+ {
+ }
+
+ public void visitCMDocument(CMDocument document)
+ {
+ CMNamedNodeMap map = document.getElements();
+ int size = map.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ visitCMNode(map.item(i));
+ }
+ }
+
+ public void visitCMGroup(CMGroup group)
+ {
+ CMNodeList nodeList = group.getChildNodes();
+ int size = nodeList.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ visitCMNode(nodeList.item(i));
+ }
+ }
+
+ public void visitCMElementDeclaration(CMElementDeclaration ed)
+ {
+ CMNamedNodeMap nodeMap = ed.getAttributes();
+ int size = nodeMap.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ visitCMNode(nodeMap.item(i));
+ }
+
+ visitCMNode(ed.getContent());
+
+ visitCMDataType(ed.getDataType());
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/ContentBuilder.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/ContentBuilder.java
new file mode 100644
index 0000000000..f6fccf89fa
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/ContentBuilder.java
@@ -0,0 +1,171 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+
+
+/**
+ * This class lets you traverse a 'CM' model providing callbacks to build content.
+ */
+public class ContentBuilder extends CMVisitor
+{
+ public static final int BUILD_ALL_CONTENT = 1;
+ public static final int BUILD_ONLY_REQUIRED_CONTENT = 2;
+ protected int buildPolicy = BUILD_ALL_CONTENT;
+
+ protected boolean alwaysVisit;
+ protected Vector visitedCMElementDeclarationList = new Vector();
+
+ public ContentBuilder()
+ {
+ }
+
+ public void setBuildPolicy(int buildPolicy)
+ {
+ this.buildPolicy = buildPolicy;
+ }
+
+ public int getBuildPolicy()
+ {
+ return buildPolicy;
+ }
+
+ protected void createAnyElementNode(CMAnyElement anyElement)
+ {
+ }
+
+ protected void createElementNodeStart(CMElementDeclaration ed)
+ {
+ }
+
+ protected void createElementNodeEnd(CMElementDeclaration ed)
+ {
+ }
+
+ protected void createTextNode(CMDataType dataType)
+ {
+ }
+
+ protected void createAttributeNode(CMAttributeDeclaration attribute)
+ {
+ }
+
+ public void visitCMElementDeclaration(CMElementDeclaration ed)
+ {
+ int forcedMin = (buildPolicy == BUILD_ALL_CONTENT || alwaysVisit) ? 1 : 0;
+ int min = Math.max(ed.getMinOccur(), forcedMin);
+ alwaysVisit = false;
+
+ if (min > 0 && !visitedCMElementDeclarationList.contains(ed))
+ {
+ visitedCMElementDeclarationList.add(ed);
+ for (int i = 1; i <= min; i++)
+ {
+ createElementNodeStart(ed);
+
+ // instead of calling super.visitCMElementDeclaration()
+ // we duplicate the code with some minor modifications
+ CMNamedNodeMap nodeMap = ed.getAttributes();
+ int size = nodeMap.getLength();
+ for (int j = 0; j < size; j++)
+ {
+ visitCMNode(nodeMap.item(j));
+ }
+
+ CMContent content = ed.getContent();
+ if (content != null)
+ {
+ visitCMNode(content);
+ }
+
+ if (ed.getContentType() == CMElementDeclaration.PCDATA)
+ {
+ CMDataType dataType = ed.getDataType();
+ if (dataType != null)
+ {
+ visitCMDataType(dataType);
+ }
+ }
+ // end duplication
+ createElementNodeEnd(ed);
+ }
+ int size = visitedCMElementDeclarationList.size();
+ visitedCMElementDeclarationList.remove(size - 1);
+ }
+ }
+
+
+ public void visitCMDataType(CMDataType dataType)
+ {
+ createTextNode(dataType);
+ }
+
+
+ public void visitCMGroup(CMGroup e)
+ {
+ int forcedMin = (buildPolicy == BUILD_ALL_CONTENT || alwaysVisit) ? 1 : 0;
+ int min = Math.max(e.getMinOccur(), forcedMin);
+ alwaysVisit = false;
+
+ for (int i = 1; i <= min; i++)
+ {
+ if (e.getOperator() == CMGroup.CHOICE)
+ {
+ // add only 1 element from the group
+ // todo... perhaps add something other than the first one
+ CMNodeList nodeList = e.getChildNodes();
+ if (nodeList.getLength() > 0)
+ {
+ visitCMNode(nodeList.item(0));
+ }
+ }
+ else // SEQUENCE, ALL
+ {
+ // visit all of the content
+ super.visitCMGroup(e);
+ }
+ }
+ }
+
+ public void visitCMAttributeDeclaration(CMAttributeDeclaration ad)
+ {
+ if (alwaysVisit ||
+ buildPolicy == BUILD_ALL_CONTENT ||
+ ad.getUsage() == CMAttributeDeclaration.REQUIRED)
+ {
+ createAttributeNode(ad);
+ }
+ }
+
+
+ public void visitCMAnyElement(CMAnyElement anyElement)
+ {
+ int forcedMin = (buildPolicy == BUILD_ALL_CONTENT || alwaysVisit) ? 1 : 0;
+ alwaysVisit = false;
+ int min = Math.max(anyElement.getMinOccur(), forcedMin);
+ for (int i = 1; i <= min; i++)
+ {
+ createAnyElementNode(anyElement);
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMContentBuilder.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMContentBuilder.java
new file mode 100644
index 0000000000..fe4295faf1
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMContentBuilder.java
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import java.util.List;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.w3c.dom.Node;
+
+
+public interface DOMContentBuilder
+{
+ public static final int BUILD_OPTIONAL_ATTRIBUTES = 1;
+ public static final int BUILD_OPTIONAL_ELEMENTS = 1<<1;
+ public static final int BUILD_FIRST_CHOICE = 1<<2;
+ public static final int BUILD_TEXT_NODES = 1<<3;
+ public static final int BUILD_FIRST_SUBSTITUTION = 1<<4;
+
+ public static final int
+ BUILD_ONLY_REQUIRED_CONTENT =
+ BUILD_FIRST_CHOICE
+ | BUILD_TEXT_NODES;
+ public static final int
+ BUILD_ALL_CONTENT =
+ BUILD_OPTIONAL_ATTRIBUTES
+ | BUILD_OPTIONAL_ELEMENTS
+ | BUILD_FIRST_CHOICE
+ | BUILD_TEXT_NODES;
+
+ public static final String PROPERTY_BUILD_BLANK_TEXT_NODES = "buildBlankTextNodes";
+
+ public void setBuildPolicy(int buildPolicy);
+ public int getBuildPolicy();
+ public void setProperty(String propertyName, Object value);
+ public Object getProperty(String propertyName);
+ public List getResult();
+ public void build(Node parent, CMNode child);
+ public void createDefaultRootContent(CMDocument cmDocument, CMElementDeclaration rootCMElementDeclaration) throws Exception;
+ public void createDefaultRootContent(CMDocument cmDocument, CMElementDeclaration rootCMElementDeclaration, List namespaceInfoList) throws Exception;
+ public void createDefaultContent(Node parent, CMElementDeclaration ed) throws Exception;
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMContentBuilderImpl.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMContentBuilderImpl.java
new file mode 100644
index 0000000000..d9f94fca4c
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMContentBuilderImpl.java
@@ -0,0 +1,693 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Stack;
+import java.util.Vector;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.ContentModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.internal.util.CMDataTypeValueHelper;
+import org.w3c.dom.Attr;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.ProcessingInstruction;
+import org.w3c.dom.Text;
+
+
+/**
+ * todo... common up this code with 'ContentBuilder'
+ */
+public class DOMContentBuilderImpl extends CMVisitor implements DOMContentBuilder
+{
+ protected int buildPolicy = BUILD_ALL_CONTENT;
+ protected Hashtable propertyTable = new Hashtable();
+
+ protected boolean alwaysVisit = false;
+ protected List resultList;
+ protected Document document;
+ protected Node currentParent;
+ protected Node topParent;
+ protected Vector visitedCMElementDeclarationList = new Vector();
+ protected boolean attachNodesToParent = true;
+ protected NamespaceTable namespaceTable;
+
+ protected List namespaceInfoList;
+ protected Element rootElement; // this is used only teporarily via createDefaultRootContent
+ protected ExternalCMDocumentSupport externalCMDocumentSupport;
+
+ public boolean uglyTempHack;
+
+ protected CMDataTypeValueHelper valueHelper = new CMDataTypeValueHelper();
+
+ protected int numOfRepeatableElements = 1;
+ protected Stack cmGroupStack = new Stack();
+
+ public interface ExternalCMDocumentSupport
+ {
+ public CMDocument getCMDocument(Element element, String uri);
+ }
+
+ public void setExternalCMDocumentSupport(ExternalCMDocumentSupport externalCMDocumentSupport)
+ {
+ this.externalCMDocumentSupport = externalCMDocumentSupport;
+ }
+
+ public DOMContentBuilderImpl(Document document)
+ {
+ this.document = document;
+ namespaceTable = new NamespaceTable(document);
+ }
+
+ public void setBuildPolicy(int buildPolicy)
+ {
+ this.buildPolicy = buildPolicy;
+ }
+
+ public int getBuildPolicy()
+ {
+ return buildPolicy;
+ }
+
+ protected boolean buildAllContent(int policy)
+ {
+ return (policy & BUILD_ALL_CONTENT) == BUILD_ALL_CONTENT;
+ }
+
+ protected boolean buildOptionalElements(int policy)
+ {
+ return (policy & BUILD_OPTIONAL_ELEMENTS) == BUILD_OPTIONAL_ELEMENTS;
+ }
+
+ protected boolean buildOptionalAttributes(int policy)
+ {
+ return (policy & BUILD_OPTIONAL_ATTRIBUTES) == BUILD_OPTIONAL_ATTRIBUTES;
+ }
+
+ protected boolean buildFirstChoice(int policy)
+ {
+ return (policy & BUILD_FIRST_CHOICE) == BUILD_FIRST_CHOICE;
+ }
+
+ protected boolean buildTextNodes(int policy)
+ {
+ return (policy & BUILD_TEXT_NODES) == BUILD_TEXT_NODES;
+ }
+
+ protected boolean buildFirstSubstitution(int policy)
+ {
+ return (policy & BUILD_FIRST_SUBSTITUTION) == BUILD_FIRST_SUBSTITUTION;
+ }
+
+ public List getResult()
+ {
+ return resultList;
+ }
+
+ public void setProperty(String propertyName, Object value)
+ {
+ propertyTable.put(propertyName, value);
+ }
+
+ public Object getProperty(String propertyName)
+ {
+ return propertyTable.get(propertyName);
+ }
+
+ public void build(Node parent, CMNode child)
+ {
+ resultList = new Vector();
+ topParent = parent;
+ currentParent = parent;
+ if (parent instanceof Element)
+ {
+ namespaceTable.addElementLineage((Element)parent);
+ }
+ attachNodesToParent = false;
+ alwaysVisit = true;
+ visitCMNode(child);
+ }
+
+ public void createDefaultRootContent(CMDocument cmDocument, CMElementDeclaration rootCMElementDeclaration, List namespaceInfoList) throws Exception
+ {
+ this.namespaceInfoList = namespaceInfoList;
+ createDefaultRootContent(cmDocument, rootCMElementDeclaration);
+ }
+
+ public void createDefaultRootContent(CMDocument cmDocument, CMElementDeclaration rootCMElementDeclaration) throws Exception
+ {
+ String grammarFileName = cmDocument.getNodeName();
+ if (!uglyTempHack)
+ {
+ String piValue = "version=\"1.0\"";
+ String[] encodingInfo = (String[])cmDocument.getProperty("encodingInfo");
+ String encoding = encodingInfo != null ? encodingInfo[1] : null;
+ if (encoding != null)
+ {
+ piValue += " encoding=\"" + encoding + "\"";
+ }
+ ProcessingInstruction pi = document.createProcessingInstruction("xml", piValue);
+ document.appendChild(pi);
+
+ // if we have a 'dtd' then add a DOCTYPE tag
+ //
+ if (grammarFileName != null && grammarFileName.endsWith("dtd"))
+ {
+ DOMImplementation domImpl = document.getImplementation();
+ DocumentType documentType = domImpl.createDocumentType(rootCMElementDeclaration.getElementName(), grammarFileName, grammarFileName);
+ document.appendChild(documentType);
+ }
+ }
+
+ // if we have a schema add an xsi:schemaLocation attribute
+ //
+ if (grammarFileName != null && grammarFileName.endsWith("xsd") && namespaceInfoList != null)
+ {
+ DOMNamespaceInfoManager manager = new DOMNamespaceInfoManager();
+ String name = rootCMElementDeclaration.getNodeName();
+ if (namespaceInfoList.size() > 0)
+ {
+ NamespaceInfo info = (NamespaceInfo)namespaceInfoList.get(0);
+ if (info.prefix != null && info.prefix.length() > 0)
+ {
+ name = info.prefix + ":" + name;
+ }
+ }
+ rootElement = createElement(rootCMElementDeclaration, name, document);
+ manager.addNamespaceInfo(rootElement, namespaceInfoList, true);
+ }
+ createDefaultContent(document, rootCMElementDeclaration);
+ }
+
+ public void createDefaultContent(Node parent, CMElementDeclaration ed)
+ {
+ currentParent = parent;
+ alwaysVisit = true;
+ visitCMElementDeclaration(ed);
+ }
+
+ public String computeName(CMNode cmNode, Node parent)
+ {
+ String prefix = null;
+ return DOMNamespaceHelper.computeName(cmNode, parent, prefix, namespaceTable);
+ }
+
+ // overide the following 'create' methods to control how nodes are created
+ //
+ protected Element createElement(CMElementDeclaration ed, String name, Node parent)
+ {
+ return document.createElement(name);
+ }
+
+ protected Attr createAttribute(CMAttributeDeclaration ad, String name, Node parent)
+ {
+ return document.createAttribute(name);
+ }
+
+ protected Text createTextNode(CMDataType dataType, String value, Node parent)
+ {
+ return document.createTextNode(value);
+ }
+
+ protected void handlePushParent(Element parent, CMElementDeclaration ed)
+ {
+ }
+
+ protected void handlePopParent(Element element, CMElementDeclaration ed)
+ {
+ }
+
+ // The range must be between 1 and 99.
+ public void setNumOfRepeatableElements(int i)
+ {
+ numOfRepeatableElements = i;
+ }
+
+ protected int getNumOfRepeatableElements()
+ {
+ return numOfRepeatableElements;
+ }
+
+ public void visitCMElementDeclaration(CMElementDeclaration ed)
+ {
+ int forcedMin = (buildOptionalElements(buildPolicy) || alwaysVisit) ? 1 : 0;
+ int min = Math.max(ed.getMinOccur(), forcedMin);
+
+ // Correct the min value if the element is contained in
+ // a group.
+ if (!cmGroupStack.isEmpty())
+ {
+ CMGroup group = (CMGroup)cmGroupStack.peek();
+ int gmin = group.getMinOccur();
+ if (gmin == 0)
+ if (buildOptionalElements(buildPolicy))
+ ; // min = min
+ else
+ min = min * gmin; // min = 0
+ else
+ min = min * gmin;
+ }
+
+ int max = Math.min(ed.getMaxOccur(), getNumOfRepeatableElements());
+ if (max < min)
+ max = min;
+
+ alwaysVisit = false;
+
+ // Note - ed may not be abstract but has substitutionGroups
+ // involved.
+ if (buildFirstSubstitution(buildPolicy)
+ || isAbstract(ed)) // leave this for backward compatibility for now
+ {
+ // Note - To change so that if ed is optional, we do not
+ // generate anything here.
+ ed = getSubstitution(ed);
+
+ // Note - the returned ed may be an abstract element in
+ // which case the xml will be invalid.
+ }
+
+ if (min > 0 && !visitedCMElementDeclarationList.contains(ed))
+ {
+ visitedCMElementDeclarationList.add(ed);
+ for (int i = 1; i <= max; i++)
+ {
+ // create an Element for each
+ Element element = null;
+ if (rootElement != null)
+ {
+ element = rootElement;
+ rootElement = null;
+ }
+ else
+ {
+ element = createElement(ed, computeName(ed, currentParent), currentParent);
+ }
+
+ // visit the children of the GrammarElement
+ Node oldParent = currentParent;
+ currentParent = element;
+ handlePushParent(element, ed);
+
+ namespaceTable.addElement(element);
+
+ boolean oldAttachNodesToParent = attachNodesToParent;
+ attachNodesToParent = true;
+
+ // instead of calling super.visitCMElementDeclaration()
+ // we duplicate the code with some minor modifications
+ CMNamedNodeMap nodeMap = ed.getAttributes();
+ int size = nodeMap.getLength();
+ for (int j = 0; j < size; j++)
+ {
+ visitCMNode(nodeMap.item(j));
+ }
+
+ CMContent content = ed.getContent();
+ if (content != null)
+ {
+ visitCMNode(content);
+ }
+
+ if (ed.getContentType() == CMElementDeclaration.PCDATA)
+ {
+ CMDataType dataType = ed.getDataType();
+ if (dataType != null)
+ {
+ visitCMDataType(dataType);
+ }
+ }
+ // end duplication
+ attachNodesToParent = oldAttachNodesToParent;
+ handlePopParent(element, ed);
+ currentParent = oldParent;
+ linkNode(element);
+ }
+ int size = visitedCMElementDeclarationList.size();
+ visitedCMElementDeclarationList.remove(size - 1);
+ }
+ }
+
+
+ public void visitCMDataType(CMDataType dataType)
+ {
+ Text text = null;
+ String value = null;
+
+ // For backward compatibility:
+ // Previous code uses a property value but new one uses
+ // buildPolicy.
+ if (getProperty(PROPERTY_BUILD_BLANK_TEXT_NODES) != null
+ && getProperty(PROPERTY_BUILD_BLANK_TEXT_NODES).equals("true"))
+ buildPolicy = buildPolicy ^ BUILD_TEXT_NODES;
+
+ if (buildTextNodes(buildPolicy))
+ {
+ value = valueHelper.getValue(dataType);
+ if (value == null)
+ {
+ if (currentParent != null && currentParent.getNodeType() == Node.ELEMENT_NODE)
+ {
+ value = currentParent.getNodeName();
+ }
+ else
+ {
+ value = "pcdata";
+ }
+ }
+ }
+ else
+ {
+ value = "";
+ }
+ text = createTextNode(dataType, value, currentParent);
+ linkNode(text);
+ }
+
+
+ public void visitCMGroup(CMGroup e)
+ {
+ cmGroupStack.push(e);
+
+ int forcedMin = (buildOptionalElements(buildPolicy) || alwaysVisit) ? 1 : 0;
+ int min = Math.max(e.getMinOccur(), forcedMin);
+
+ int max = 0;
+ if (e.getMaxOccur() == -1) // unbounded
+ max = getNumOfRepeatableElements();
+ else
+ max = Math.min(e.getMaxOccur(), getNumOfRepeatableElements());
+
+ if (max < min)
+ max = min;
+
+ alwaysVisit = false;
+
+ for (int i = 1; i <= max; i++)
+ {
+ if (e.getOperator() == CMGroup.CHOICE
+ && buildFirstChoice(buildPolicy))
+ {
+ CMNode hintNode = null;
+
+ // todo... the CMGroup should specify the hint... but it seems as though
+ // the Yamato guys are making the CMElement specify the hint.
+ // I do it that way for now until... we should fix this post GA
+ //
+ int listSize = visitedCMElementDeclarationList.size();
+ if (listSize > 0)
+ {
+ CMElementDeclaration ed = (CMElementDeclaration)visitedCMElementDeclarationList.get(listSize - 1);
+ Object contentHint = ed.getProperty("contentHint");
+ if (contentHint instanceof CMNode)
+ {
+ hintNode = (CMNode)contentHint;
+ }
+ }
+
+ // see if this hint corresponds to a valid choice
+ //
+ CMNode cmNode = null;
+
+ if (hintNode != null)
+ {
+ CMNodeList nodeList = e.getChildNodes();
+ int nodeListLength = nodeList.getLength();
+ for (int j = 0; j < nodeListLength; j++)
+ {
+ if (hintNode == nodeList.item(j))
+ {
+ cmNode = hintNode;
+ }
+ }
+ }
+
+ // if no cmNode has been determined from the hint, just use the first choice
+ //
+ if (cmNode == null)
+ {
+ CMNodeList nodeList = e.getChildNodes();
+ if (nodeList.getLength() > 0)
+ {
+ cmNode = nodeList.item(0);
+ }
+ }
+
+ if (cmNode != null)
+ {
+ visitCMNode(cmNode);
+ }
+ }
+ else if (e.getOperator() == CMGroup.ALL // ALL
+ || e.getOperator() == CMGroup.SEQUENCE) // SEQUENCE
+ {
+ // visit all of the content
+ super.visitCMGroup(e);
+ }
+ }
+
+ cmGroupStack.pop();
+ }
+
+ static int count = 0;
+
+ public void visitCMAttributeDeclaration(CMAttributeDeclaration ad)
+ {
+ if (alwaysVisit ||
+ buildOptionalAttributes(buildPolicy) ||
+ ad.getUsage() == CMAttributeDeclaration.REQUIRED)
+ {
+ alwaysVisit = false;
+ String name = computeName(ad, currentParent);
+ String value = valueHelper.getValue(ad, namespaceTable);
+ Attr attr = createAttribute(ad, name, currentParent);
+ attr.setValue(value != null ? value : "");
+ linkNode(attr);
+ }
+ }
+
+ protected boolean isAbstract(CMNode ed)
+ {
+ boolean result = false;
+ if (ed != null)
+ {
+ Object value = ed.getProperty("Abstract");
+ result = (value == Boolean.TRUE);
+ }
+ return result;
+ }
+
+ protected CMElementDeclaration getSubstitution(CMElementDeclaration ed)
+ {
+ CMElementDeclaration result = ed;
+ CMNodeList l = (CMNodeList)ed.getProperty("SubstitutionGroup");
+ if (l != null)
+ {
+ for (int i=0; i < l.getLength(); i++)
+ {
+ CMNode candidate = l.item(i);
+ if (!isAbstract(candidate) && (candidate instanceof CMElementDeclaration))
+ {
+ result = (CMElementDeclaration)candidate;
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+ protected CMElementDeclaration getParentCMElementDeclaration()
+ {
+ CMElementDeclaration ed = null;
+ int listSize = visitedCMElementDeclarationList.size();
+ if (listSize > 0)
+ {
+ ed = (CMElementDeclaration)visitedCMElementDeclarationList.get(listSize - 1);
+ }
+ return ed;
+ }
+
+ public void visitCMAnyElement(CMAnyElement anyElement)
+ {
+ // ingnore buildPolicy for ANY elements... only create elements if absolutely needed
+ //
+ int forcedMin = alwaysVisit ? 1 : 0;
+ int min = Math.max(anyElement.getMinOccur(), forcedMin);
+ alwaysVisit = false;
+
+ String uri = anyElement.getNamespaceURI();
+ String targetNSProperty = "http://org.eclipse.wst/cm/properties/targetNamespaceURI";
+ CMDocument parentCMDocument = (CMDocument)anyElement.getProperty("CMDocument");
+ CMElementDeclaration ed = null;
+
+ System.out.println("parentCMDocument = " + parentCMDocument);
+ if (parentCMDocument != null)
+ {
+ if (uri == null || uri.startsWith("##") || uri.equals(parentCMDocument.getProperty(targetNSProperty)))
+ {
+ ed = getSuitableElement(getParentCMElementDeclaration(), parentCMDocument);
+ }
+ }
+
+
+ if (ed == null && externalCMDocumentSupport != null && uri != null && !uri.startsWith("##") && currentParent instanceof Element)
+ {
+ CMDocument externalCMDocument = externalCMDocumentSupport.getCMDocument((Element)currentParent, uri);
+ if (externalCMDocument != null)
+ {
+ ed = getSuitableElement(null, externalCMDocument);
+ }
+ }
+
+ for (int i = 1; i <= min; i++)
+ {
+ if (ed != null)
+ {
+ visitCMElementDeclaration(ed);
+ }
+ else
+ {
+ Element element = document.createElement("ANY-ELEMENT");
+ linkNode(element);
+ }
+ }
+ }
+
+ protected CMElementDeclaration getSuitableElement(CMNamedNodeMap nameNodeMap)
+ {
+ CMElementDeclaration result = null;
+ int size = nameNodeMap.getLength();
+ for (int i = 0; i < size; i++)
+ {
+ CMElementDeclaration candidate = (CMElementDeclaration)nameNodeMap.item(i);
+ if (!visitedCMElementDeclarationList.contains(candidate))
+ {
+ result = candidate;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected CMElementDeclaration getSuitableElement(CMElementDeclaration ed, CMDocument cmDocument)
+ {
+ CMElementDeclaration result = null;
+
+ if (ed != null)
+ {
+ result = getSuitableElement(ed.getLocalElements());
+ }
+
+ if (result == null && cmDocument != null)
+ {
+ result = getSuitableElement(cmDocument.getElements());
+ }
+
+ return result;
+ }
+
+
+ public void linkNode(Node node)
+ {
+ if (attachNodesToParent && currentParent != null)
+ {
+ if (node.getNodeType() == Node.ATTRIBUTE_NODE)
+ {
+ ((Element)currentParent).setAttributeNode((Attr)node);
+ }
+ else
+ {
+ currentParent.appendChild(node);
+ }
+ }
+ else if (resultList != null)
+ {
+ resultList.add(node);
+ }
+ }
+
+ public static void testPopulateDocumentFromGrammarFile(Document document, String grammarFileName, String rootElementName, boolean hack)
+ {
+ try
+ {
+ CMDocument cmDocument = ContentModelManager.getInstance().createCMDocument(grammarFileName, null);
+ CMNamedNodeMap elementMap = cmDocument.getElements();
+ CMElementDeclaration element = (CMElementDeclaration)elementMap.getNamedItem(rootElementName);
+
+ DOMContentBuilderImpl contentBuilder = new DOMContentBuilderImpl(document);
+ contentBuilder.uglyTempHack = hack;
+ contentBuilder.createDefaultRootContent(cmDocument, element);
+
+ System.out.println();
+ System.out.println("-----------------------------");
+ DOMWriter writer = new DOMWriter();
+ if (hack)
+ {
+ writer.print(document, grammarFileName);
+ }
+ else
+ {
+ writer.print(document);
+ }
+ System.out.println("-----------------------------");
+ }
+ catch (Exception e)
+ {
+ System.out.println("Error: " + e);
+ e.printStackTrace();
+ }
+ }
+
+ // test
+ //
+ /*
+ public static void main(String arg[])
+ {
+ if (arg.length >= 2)
+ {
+ try
+ {
+ CMDocumentFactoryRegistry.getInstance().registerCMDocumentBuilderWithClassName("org.eclipse.wst.sse.core.internal.contentmodel.mofimpl.CMDocumentBuilderImpl");
+
+ String grammarFileName = arg[0];
+ String rootElementName = arg[1];
+
+ Document document = (Document)Class.forName("org.apache.xerces.dom.DocumentImpl").newInstance();
+ testPopulateDocumentFromGrammarFile(document, grammarFileName, rootElementName, true);
+ }
+ catch (Exception e)
+ {
+ System.out.println("DOMContentBuilderImpl error");
+ e.printStackTrace();
+ }
+ }
+ else
+ {
+ System.out.println("Usage : java org.eclipse.wst.xml.util.DOMContentBuildingCMVisitor grammarFileName rootElementName");
+ }
+ }*/
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMNamespaceHelper.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMNamespaceHelper.java
new file mode 100644
index 0000000000..526f834d3a
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMNamespaceHelper.java
@@ -0,0 +1,198 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+public class DOMNamespaceHelper
+{
+ protected static String getURIForPrefix(Element element, String prefix)
+ {
+ String result = null;
+ String nsAttrName = null;
+ if (prefix != null && prefix.length() > 0)
+ {
+ nsAttrName = "xmlns:" + prefix;
+ }
+ else
+ {
+ nsAttrName = "xmlns";
+ }
+
+ // assume the node is qualified... look up the URI base on the prefix
+ //
+ for (Node node = element; node != null; node = node.getParentNode())
+ {
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ Element theElement = (Element)node;
+ Attr attr = theElement.getAttributeNode(nsAttrName);
+ if (attr != null)
+ {
+ result = attr.getValue();
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ // see if we can find some info from an 'implicit' namespace
+ //
+ if (result == null)
+ {
+ NamespaceTable table = new NamespaceTable(element.getOwnerDocument());
+ result = table.getURIForPrefix(prefix);
+ }
+ return result;
+ }
+
+ public static String getNamespaceURI(Node node)
+ {
+ String result = null;
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ Element element = (Element)node;
+ String prefix = element.getPrefix();
+ result = getURIForPrefix(element, prefix);
+ }
+ else if (node.getNodeType() == Node.ATTRIBUTE_NODE)
+ {
+ Attr attr = (Attr)node;
+ String prefix = attr.getPrefix();
+ result = getURIForPrefix(attr.getOwnerElement(), prefix);
+ }
+ return result;
+ }
+
+ // todo... this is an ugly hack... needs to be fixed
+ //
+ public static String computePrefix(CMNode cmNode, Node parentNode)
+ {
+ String result = null;
+ for (Node node = parentNode; node != null; node = node.getParentNode())
+ {
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ result = getPrefix(node.getNodeName());
+ if (result != null)
+ {
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+
+ public static String getPrefix(String name)
+ {
+ String prefix = null;
+ int index = name.indexOf(":");
+ if (index != -1)
+ {
+ prefix = name.substring(0, index);
+ }
+ return prefix;
+ }
+
+
+ public static String getUnprefixedName(String name)
+ {
+ int index = name.indexOf(":");
+ if (index != -1)
+ {
+ name = name.substring(index + 1);
+ }
+ return name;
+ }
+
+
+ public static String computeName(CMNode cmNode, Node parent, String prefix)
+ {
+ return computeName(cmNode, parent, prefix, null);
+ }
+
+
+ public static String computeName(CMNode cmNode, Node parent, String prefix, NamespaceTable namespaceTable)
+ {
+ String result = cmNode.getNodeName();
+
+ // if the cmNode has a hard coded prefix then we don't need to do anything
+ //
+ if (getPrefix(result) == null)
+ {
+ String qualification = (String)cmNode.getProperty("http://org.eclipse.wst/cm/properties/nsPrefixQualification");
+ // see if we need a namespace prefix
+ //
+ if (qualification != null && qualification.equals("qualified"))
+ {
+ if (prefix == null)
+ {
+ // todo... add getCMDocument() method to CMNode
+ // for now use this getProperty() hack
+ CMDocument cmDocument = (CMDocument)cmNode.getProperty("CMDocument");
+ if (cmDocument != null)
+ {
+ String namespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ if (namespaceURI != null)
+ {
+ // use the NamespaceTable to figure out the correct prefix for this namespace uri
+ //
+ if (namespaceTable == null)
+ {
+ Document document = parent.getNodeType() == Node.DOCUMENT_NODE ? (Document)parent : parent.getOwnerDocument();
+ namespaceTable = new NamespaceTable(document);
+ if (parent instanceof Element)
+ {
+ namespaceTable.addElementLineage((Element)parent);
+ }
+ }
+ prefix = namespaceTable.getPrefixForURI(namespaceURI);
+ }
+ }
+ }
+ if (prefix != null && prefix.length() > 0)
+ {
+ result = prefix + ":" + result;
+ }
+ }
+ }
+ return result;
+ }
+
+
+ public static String[] getURIQualifiedNameComponents(String uriQualifiedName)
+ {
+ String[] result = new String[2];
+ int firstIndex = uriQualifiedName.indexOf("[");
+ int lastIndex = uriQualifiedName.indexOf("]");
+ if (firstIndex != -1 && lastIndex > firstIndex)
+ {
+ result[0] = uriQualifiedName.substring(firstIndex + 1, lastIndex);
+ result[1] = uriQualifiedName.substring(lastIndex + 1);
+ }
+ else
+ {
+ result[1] = uriQualifiedName;
+ }
+ return result;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMNamespaceInfoManager.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMNamespaceInfoManager.java
new file mode 100644
index 0000000000..dc81062528
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMNamespaceInfoManager.java
@@ -0,0 +1,225 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+
+/**
+ * DOMNamespaceInfoManager
+ *
+ *
+ */
+public class DOMNamespaceInfoManager
+{
+ public static final String XSI_URI = "http://www.w3.org/2001/XMLSchema-instance";
+
+ public DOMNamespaceInfoManager()
+ {
+ }
+
+ public List getNamespaceInfoList(Element element)
+ {
+ NamespaceInfoReader reader = new NamespaceInfoReader();
+ return reader.getNamespaceInfoList(element);
+ }
+
+ public void removeNamespaceInfo(Element element)
+ {
+ NamespaceInfoRemover remover = new NamespaceInfoRemover();
+ remover.removeNamespaceInfo(element);
+ }
+
+ public void addNamespaceInfo(Element element, List namespaceInfoList, boolean needsXSI)
+ {
+ // first we create an xmlns attribute for each namespace
+ //
+ Document document = element.getOwnerDocument();
+
+ String schemaLocationValue = "";
+
+ for (Iterator iterator = namespaceInfoList.iterator(); iterator.hasNext(); )
+ {
+ NamespaceInfo nsInfo = (NamespaceInfo)iterator.next();
+ nsInfo.normalize();
+
+ if (nsInfo.uri != null)
+ {
+ String attrName = nsInfo.prefix != null ? "xmlns:" + nsInfo.prefix : "xmlns";
+ Attr namespaceAttr = document.createAttribute(attrName);
+ namespaceAttr.setValue(nsInfo.uri);
+ element.setAttributeNode(namespaceAttr);
+
+ // in this case we use the attribute "xsi:schemaLocation"
+ // here we build up its value
+ //
+ if (nsInfo.locationHint != null)
+ {
+ schemaLocationValue += nsInfo.uri;
+ schemaLocationValue += " ";
+ schemaLocationValue += nsInfo.locationHint;
+ schemaLocationValue += " ";
+ }
+
+ if (nsInfo.uri.equals(XSI_URI))
+ {
+ needsXSI = false;
+ }
+ }
+ else if (nsInfo.locationHint != null)
+ {
+ // in this case we use the attribute "xsi:noNamespaceSchemaLocation"
+ //
+ Attr attr = document.createAttribute("xsi:noNamespaceSchemaLocation");
+ attr.setValue(nsInfo.locationHint);
+ element.setAttributeNode(attr);
+ }
+ }
+
+ if (needsXSI)
+ {
+ // we add an xmlns:xsi attribute to define 'xsi:schemaLocation' attribute
+ //
+ Attr attr = document.createAttribute("xmlns:xsi");
+ attr.setValue(XSI_URI);
+ element.setAttributeNode(attr);
+ }
+
+ if (schemaLocationValue.length() > 0)
+ {
+ // create the "xsi:schemaLocation" attribute
+ //
+ Attr attr = document.createAttribute("xsi:schemaLocation");
+ attr.setValue(schemaLocationValue);
+ element.setAttributeNode(attr);
+ }
+ }
+
+ /**
+ *
+ */
+ protected static class NamespaceInfoReader extends NamespaceAttributeVisitor
+ {
+ protected List namespaceInfoList = new Vector();
+
+ public List getNamespaceInfoList(Element element)
+ {
+ visitElement(element);
+ return namespaceInfoList;
+ }
+
+
+ public void visitXSINoNamespaceSchemaLocationAttribute(Attr attr, String value)
+ {
+ NamespaceInfo info = createNamespaceInfo();
+ info.locationHint = value;
+ }
+
+ public void visitXMLNamespaceAttribute(Attr attr, String prefix, String uri)
+ {
+ NamespaceInfo info = createNamespaceInfo();
+ info.uri = uri;
+ info.prefix = prefix;
+ super.visitXMLNamespaceAttribute(attr, prefix, uri);
+ }
+
+ public void visitXSISchemaLocationValuePair(String uri, String locationHint)
+ {
+ NamespaceInfo info = getNamespaceInfoForURI(uri);
+ if (info != null)
+ {
+ info.locationHint = locationHint;
+ }
+ else
+ {
+ info = createNamespaceInfo();
+ info.uri = uri;
+ info.locationHint = locationHint;
+ }
+ }
+
+ protected NamespaceInfo getNamespaceInfoForURI(String uri)
+ {
+ NamespaceInfo result = null;
+ for (Iterator i = namespaceInfoList.iterator(); i.hasNext(); )
+ {
+ NamespaceInfo info = (NamespaceInfo)i.next();
+ if (info.uri != null && info.uri.equals(uri))
+ {
+ result = info;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected NamespaceInfo createNamespaceInfo()
+ {
+ NamespaceInfo info = new NamespaceInfo();
+ namespaceInfoList.add(info);
+ return info;
+ }
+ }
+
+
+ /**
+ *
+ */
+ protected static class NamespaceInfoRemover extends NamespaceAttributeVisitor
+ {
+ protected List attributesToRemove = new Vector();
+
+ public void removeNamespaceInfo(Element element)
+ {
+ visitElement(element);
+ removeAttributes();
+ }
+
+ public void visitXSINoNamespaceSchemaLocationAttribute(Attr attr, String value)
+ {
+ attributesToRemove.add(attr);
+ }
+
+ public void visitXMLNamespaceAttribute(Attr attr, String namespacePrefix, String namespaceURI)
+ {
+ attributesToRemove.add(attr);
+ super.visitXMLNamespaceAttribute(attr, namespacePrefix, namespaceURI);
+ }
+
+ public void visitXSISchemaLocationAttribute(Attr attr, String value)
+ {
+ attributesToRemove.add(attr);
+ }
+
+ public void removeAttributes()
+ {
+ for (Iterator i = attributesToRemove.iterator(); i.hasNext(); )
+ {
+ Attr attr = (Attr)i.next();
+ Element element = attr.getOwnerElement();
+ if (element != null)
+ {
+ element.removeAttributeNode(attr);
+ }
+ }
+ }
+ }
+
+
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMVisitor.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMVisitor.java
new file mode 100644
index 0000000000..100feb62e4
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMVisitor.java
@@ -0,0 +1,133 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Comment;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.ProcessingInstruction;
+import org.w3c.dom.Text;
+
+// todo.. move this class to another package (perhaps xmlutility)
+//
+public class DOMVisitor
+{
+ public void visitNode(Node node)
+ {
+ switch (node.getNodeType())
+ {
+ case Node.ATTRIBUTE_NODE :
+ {
+ visitAttr((Attr)node);
+ break;
+ }
+ case Node.CDATA_SECTION_NODE :
+ {
+ visitCDATASection((CDATASection)node);
+ break;
+ }
+ case Node.COMMENT_NODE :
+ {
+ visitComment((Comment)node);
+ break;
+ }
+ case Node.DOCUMENT_NODE :
+ {
+ visitDocument((Document)node);
+ break;
+ }
+ case Node.DOCUMENT_TYPE_NODE :
+ {
+ visitDocumentType((DocumentType)node);
+ break;
+ }
+ case Node.ELEMENT_NODE :
+ {
+ visitElement((Element)node);
+ break;
+ }
+ case Node.PROCESSING_INSTRUCTION_NODE :
+ {
+ visitProcessingInstruction((ProcessingInstruction)node);
+ break;
+ }
+ case Node.TEXT_NODE :
+ {
+ visitText((Text)node);
+ break;
+ }
+ }
+ }
+
+ protected void visitDocument(Document document)
+ {
+ visitChildNodesHelper(document);
+ }
+
+ protected void visitDocumentType(DocumentType doctype)
+ {
+
+ }
+
+ protected void visitElement(Element element)
+ {
+ visitAttributesHelper(element);
+ visitChildNodesHelper(element);
+ }
+
+
+ public void visitAttr(Attr attr)
+ {
+ }
+
+ protected void visitText(Text text)
+ {
+ }
+
+ protected void visitCDATASection(CDATASection cdataSection)
+ {
+ }
+
+ protected void visitComment(Comment comment)
+ {
+ }
+
+ protected void visitProcessingInstruction(ProcessingInstruction pi)
+ {
+ }
+
+
+ protected void visitChildNodesHelper(Node node)
+ {
+ NodeList children = node.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++)
+ {
+ visitNode(children.item(i));
+ }
+ }
+
+ protected void visitAttributesHelper(Node node)
+ {
+ NamedNodeMap map = node.getAttributes();
+ for (int i = 0; i < map.getLength(); i++ )
+ {
+ visitNode(map.item(i));
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMWriter.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMWriter.java
new file mode 100644
index 0000000000..fbf1496b02
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/DOMWriter.java
@@ -0,0 +1,411 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Comment;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.ProcessingInstruction;
+import org.w3c.dom.Text;
+
+
+/**
+ * This is a hacked up dom writer stolen from a Xerces sample.
+ * I'd like to use an exisitng 'generic DOM' writer
+ * If anyone can find such a thing then please go ahead and junk this.
+ *
+ * @version
+ */
+public class DOMWriter
+{
+ protected boolean formattingEnabled = true;
+ protected boolean outputDoctypeEnabled = true;
+ protected PrintWriter out;
+ protected int indent = 0;
+
+ public DOMWriter() throws UnsupportedEncodingException
+ {
+ this(System.out);
+ }
+
+ public DOMWriter(OutputStream outputSteam)
+ {
+ out = new PrintWriter(outputSteam);
+ }
+
+ public DOMWriter(Writer writer)
+ {
+ out = new PrintWriter(writer);
+ }
+
+ public void setFormattingEnabled(boolean enabled)
+ {
+ formattingEnabled = enabled;
+ }
+
+ public boolean getFormattingEnabled()
+ {
+ return formattingEnabled;
+ }
+
+ public void setOutputDoctypeEnabled(boolean enabled)
+ {
+ outputDoctypeEnabled = enabled;
+ }
+
+ public class XMLVisitor
+ {
+ protected boolean currentElementHasChildElements = false;
+
+ public void visitNode(Node node)
+ {
+ switch (node.getNodeType())
+ {
+ case Node.ATTRIBUTE_NODE :
+ {
+ visitAttr((Attr)node);
+ break;
+ }
+ case Node.CDATA_SECTION_NODE :
+ {
+ visitCDATASection((CDATASection)node);
+ break;
+ }
+ case Node.COMMENT_NODE :
+ {
+ visitComment((Comment)node);
+ break;
+ }
+ case Node.DOCUMENT_NODE :
+ {
+ visitDocument((Document)node);
+ break;
+ }
+ case Node.DOCUMENT_TYPE_NODE :
+ {
+ visitDocumentType((DocumentType)node);
+ break;
+ }
+ case Node.ELEMENT_NODE :
+ {
+ visitElement((Element)node);
+ break;
+ }
+ case Node.PROCESSING_INSTRUCTION_NODE :
+ {
+ visitProcessingInstruction((ProcessingInstruction)node);
+ break;
+ }
+ case Node.TEXT_NODE :
+ {
+ visitText((Text)node);
+ break;
+ }
+ }
+ }
+
+ public void visitDocument(Document document)
+ {
+ visitChildNodesHelper(document);
+ }
+
+ public void visitDocumentType(DocumentType doctype)
+ {
+ if (outputDoctypeEnabled)
+ {
+ String data = getDocumentTypeData(doctype);
+ print("<!DOCTYPE " + data + ">");
+ }
+ }
+
+ public void visitElement(Element element)
+ {
+ if (!doShow(element))
+ return;
+
+ boolean parentElementHasChildNodes = currentElementHasChildElements;
+ currentElementHasChildElements = hasChildElements(element);
+
+ printIndent();
+ print("<");
+ print(element.getNodeName());
+ visitAttributesHelper(element);
+
+ boolean hasChildNodes = element.getChildNodes().getLength() > 0;
+ boolean isRootElement = element.getParentNode().getNodeType() == Node.DOCUMENT_NODE;
+ if (hasChildNodes || isRootElement)
+ {
+ if (currentElementHasChildElements || isRootElement)
+ {
+ println(">");
+ }
+ else
+ {
+ print(">");
+ }
+ indent += 2;
+ visitChildNodesHelper(element);
+ indent -= 2;
+
+ if (currentElementHasChildElements || isRootElement)
+ {
+ printIndent();
+ }
+ print("</");
+ print(element.getNodeName());
+ println(">");
+ }
+ else
+ {
+ println("/>");
+ }
+
+ currentElementHasChildElements = parentElementHasChildNodes;
+ }
+
+ public void visitAttr(Attr attr)
+ {
+ print(" ");
+ print(attr.getNodeName());
+ print("=\"");
+ print(createPrintableCharacterData(attr.getValue()));
+ print("\"");
+ }
+
+ public void visitText(Text text)
+ {
+ if (currentElementHasChildElements)
+ {
+ printIndent();
+ print(createPrintableCharacterData(text.getNodeValue()));
+ println();
+ }
+ else
+ {
+ print(createPrintableCharacterData(text.getNodeValue()));
+ }
+ }
+
+ public void visitCDATASection(CDATASection cdataSection)
+ {
+ }
+
+ public void visitComment(Comment comment)
+ {
+ printIndent();
+ print("<!--");
+ print(comment.getNodeValue());
+ println("-->");
+ }
+
+ public void visitProcessingInstruction(ProcessingInstruction pi)
+ {
+ printIndent();
+ print("<?");
+ print(pi.getNodeName());
+ print(" ");
+ print(pi.getNodeValue());
+ println("?>");
+ }
+
+
+ public boolean hasChildElements(Node node)
+ {
+ boolean result = false;
+ NodeList children = node.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++)
+ {
+ if (children.item(i).getNodeType() == Node.ELEMENT_NODE)
+ {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+
+ public void visitChildNodesHelper(Node node)
+ {
+ NodeList children = node.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++)
+ {
+ visitNode(children.item(i));
+ }
+ }
+
+ public void visitAttributesHelper(Node node)
+ {
+ NamedNodeMap map = node.getAttributes();
+ for (int i = 0; i < map.getLength(); i++ )
+ {
+ visitNode(map.item(i));
+ }
+ }
+ }
+
+ /** an ugly hack until I restruct this code a little
+ *
+ */
+ protected boolean doShow(Element element)
+ {
+ return true;
+ }
+
+ /** converts DOM text values to 'printable' values
+ * - converts '&' to '&amp;'
+ */
+ protected String createPrintableCharacterData(String string)
+ {
+ String result = "";
+ int index = 0;
+ while (true)
+ {
+ int ampersandIndex = string.indexOf("&", index);
+ if (ampersandIndex != -1)
+ {
+ result += string.substring(index, ampersandIndex);
+ result += "&amp;";
+ index = ampersandIndex + 1;
+ }
+ else
+ {
+ break;
+ }
+ }
+ result += string.substring(index);
+ return result;
+ }
+
+
+ /** Prints the specified node, recursively. */
+ public void print(Node node)
+ {
+ // is there anything to do?
+ if (node != null)
+ {
+ XMLVisitor visitor = new XMLVisitor();
+ visitor.visitNode(node);
+ }
+ out.flush();
+ }
+
+ /** a temporary hack to workaround our inability to create a DocumentType tag*/
+ public void print(Document document, String grammarURL)
+ {
+ String systemId = null;
+ if (grammarURL.endsWith("dtd"))
+ {
+ int lastSlashIndex = Math.max(grammarURL.lastIndexOf("/"), grammarURL.lastIndexOf("\\"));
+ if (lastSlashIndex != -1)
+ {
+ systemId = grammarURL.substring(lastSlashIndex + 1);
+ }
+ }
+ print(document, "UTF-8", grammarURL, null, systemId);
+
+ }
+
+ /** a temporary hack to workaround our inability to create a DocumentType tag*/
+ public void print(Document document, String encoding, String grammarFileName, String publicId, String systemId)
+ {
+ out.println("<?xml version=\"1.0\"" + " encoding=\"" + encoding + "\"?>");
+ if (grammarFileName.endsWith(".dtd"))
+ {
+ String docTypeLine = "<!DOCTYPE " + document.getDocumentElement().getNodeName() + " ";
+ if (publicId != null)
+ {
+ docTypeLine += "PUBLIC \"" + publicId + "\" ";
+ if (systemId != null)
+ {
+ docTypeLine += "\"" + systemId + "\" ";
+ }
+ docTypeLine += ">";
+ out.println(docTypeLine);
+ }
+ else if (systemId != null)
+ {
+ docTypeLine += "SYSTEM \"" + systemId + "\" >";
+ out.println(docTypeLine);
+ }
+ }
+ print(document);
+ }
+
+ public static String getDocumentTypeData(DocumentType doctype)
+ {
+ String data = doctype.getName();
+ if (doctype.getPublicId() != null)
+ {
+ data += " PUBLIC \"" + doctype.getPublicId() + "\"";
+ String systemId = doctype.getSystemId();
+ if (systemId == null)
+ {
+ systemId = "";
+ }
+ data += " \"" + systemId + "\"";
+ }
+ else
+ {
+ data += " SYSTEM \"" + doctype.getSystemId() + "\"";
+ }
+ return data;
+ }
+
+ public void println()
+ {
+ if (formattingEnabled)
+ {
+ out.println();
+ }
+ }
+
+ public void println(String string)
+ {
+ if (formattingEnabled)
+ {
+ out.println(string);
+ }
+ else
+ {
+ out.print(string);
+ }
+ }
+
+ public void printIndent()
+ {
+ if (formattingEnabled)
+ {
+ for (int i = 0; i < indent; i++)
+ {
+ out.print(" ");
+ }
+ }
+ }
+
+ public void print(String string)
+ {
+ out.print(string);
+ }
+}
+
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/InferredGrammarFactory.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/InferredGrammarFactory.java
new file mode 100644
index 0000000000..accd39b0a3
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/InferredGrammarFactory.java
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import java.util.Collection;
+
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.w3c.dom.Element;
+
+
+// this interface is used to build a grammar document given a local file name
+//
+public interface InferredGrammarFactory
+{
+ public CMDocument createCMDocument(String uri);
+ public CMElementDeclaration createCMElementDeclaration(CMDocument cmDocument, Element element, boolean isLocal);
+ public void createCMContent(CMDocument parentCMDocument, CMElementDeclaration parentEd, CMDocument childCMDocument, CMElementDeclaration childEd, boolean isLocal, String uri);
+ public void debugPrint(Collection collection);
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceAttributeVisitor.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceAttributeVisitor.java
new file mode 100644
index 0000000000..f34e1b4ecc
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceAttributeVisitor.java
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import java.util.StringTokenizer;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+
+public class NamespaceAttributeVisitor
+{
+ public static final String XML_SCHEMA_INSTANCE_URI = "http://www.w3.org/2001/XMLSchema-instance";
+ public String xsiPrefix = "xsi";
+
+ public void visitXMLNamespaceAttribute(Attr attr, String namespacePrefix, String namespaceURI)
+ {
+ if (namespaceURI.equals(XML_SCHEMA_INSTANCE_URI))
+ {
+ xsiPrefix = namespacePrefix;
+ }
+ }
+
+ public void visitXSINoNamespaceSchemaLocationAttribute(Attr attr, String value)
+ {
+ }
+
+ public void visitXSISchemaLocationAttribute(Attr attr, String value)
+ {
+ StringTokenizer st = new StringTokenizer(value);
+ while (true)
+ {
+ String nsURI = st.hasMoreTokens() ? st.nextToken() : null;
+ String locationHint = st.hasMoreTokens() ? st.nextToken() : null;
+ if (nsURI != null && locationHint != null)
+ {
+ visitXSISchemaLocationValuePair(nsURI, locationHint);
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+
+ public void visitXSISchemaLocationValuePair(String uri, String locationHint)
+ {
+ }
+
+ public void visitElement(Element element)
+ {
+ NamedNodeMap map = element.getAttributes();
+ int mapLength = map.getLength();
+ for (int i = 0; i < mapLength; i++)
+ {
+ Attr attr = (Attr)map.item(i);
+ String prefix = DOMNamespaceHelper.getPrefix(attr.getName());
+ String unprefixedName = DOMNamespaceHelper.getUnprefixedName(attr.getName());
+ if (prefix != null && unprefixedName != null)
+ {
+ if (prefix.equals("xmlns"))
+ {
+ visitXMLNamespaceAttribute(attr, unprefixedName, attr.getValue());
+ }
+ else if (prefix.equals(xsiPrefix) && unprefixedName.equals("schemaLocation"))
+ {
+ visitXSISchemaLocationAttribute(attr, attr.getValue());
+ }
+ else if (prefix.equals(xsiPrefix) && unprefixedName.equals("noNamespaceSchemaLocation"))
+ {
+ visitXSINoNamespaceSchemaLocationAttribute(attr, attr.getValue());
+ }
+ }
+ else if (unprefixedName != null)
+ {
+ if (unprefixedName.equals("xmlns"))
+ {
+ visitXMLNamespaceAttribute(attr, "", attr.getValue());
+ }
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceInfo.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceInfo.java
new file mode 100644
index 0000000000..f7a4ea6f62
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceInfo.java
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+public class NamespaceInfo
+{
+ public String uri;
+ public String prefix;
+ public String locationHint;
+ public boolean isPrefixRequired;
+ protected Hashtable hashtable;
+
+ public NamespaceInfo()
+ {
+ }
+
+ public NamespaceInfo(String uri, String prefix, String locationHint)
+ {
+ this.uri = uri;
+ this.prefix = prefix;
+ this.locationHint = locationHint;
+ }
+
+ public NamespaceInfo(NamespaceInfo that)
+ {
+ this.uri = that.uri;
+ this.prefix = that.prefix;
+ this.locationHint = that.locationHint;
+ // todo... see if we need to clone the hastable
+ }
+
+ public void normalize()
+ {
+ uri = getNormalizedValue(uri);
+ prefix = getNormalizedValue(prefix);
+ locationHint= getNormalizedValue(locationHint);
+ }
+
+ protected String getNormalizedValue(String string)
+ {
+ return (string != null && string.trim().length() == 0) ? null : string;
+ }
+
+ public void setProperty(String property, Object value)
+ {
+ if (hashtable == null)
+ {
+ hashtable = new Hashtable();
+ }
+ hashtable.put(property, value);
+ }
+
+ public Object getProperty(String property)
+ {
+ return (hashtable != null) ? hashtable.get(property) : null;
+ }
+
+ public static List cloneNamespaceInfoList(List oldList)
+ {
+ List newList = new Vector(oldList.size());
+ for (Iterator i = oldList.iterator(); i.hasNext(); )
+ {
+ NamespaceInfo oldInfo = (NamespaceInfo)i.next();
+ newList.add(new NamespaceInfo(oldInfo));
+ }
+ return newList;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceTable.java b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceTable.java
new file mode 100644
index 0000000000..7f4ccf7e00
--- /dev/null
+++ b/bundles/org.eclipse.wst.sse.core/src-contentmodel/org/eclipse/wst/sse/core/internal/contentmodel/util/NamespaceTable.java
@@ -0,0 +1,251 @@
+/*
+* Copyright (c) 2002 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Common Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/cpl-v10.html
+*
+* Contributors:
+* IBM - Initial API and implementation
+* Jens Lukowski/Innoopract - initial renaming/restructuring
+*
+*/
+package org.eclipse.wst.sse.core.internal.contentmodel.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+public class NamespaceTable extends NamespaceAttributeVisitor
+{
+ public Hashtable hashtable = new Hashtable();
+
+ public NamespaceTable(Document document)
+ {
+ //DOMExtension domExtension = DOMExtensionProviderRegistry.getInstance().getDOMExtension(document);
+ //if (domExtension != null)
+ //{
+ // addNamespaceInfoList(domExtension.getImplictNamespaceInfoList(), true);
+ // }
+ }
+
+ private NamespaceTable()
+ {
+ }
+
+ public boolean isNamespaceEncountered()
+ {
+ return hashtable.values().size() > 0;
+ }
+
+ public String getPrefixForURI(String uri)
+ {
+ String result = null;
+ NamespaceInfo entry = getNamespaceInfoForURI(uri, true);
+ if (entry != null)
+ {
+ result = entry.prefix;
+ }
+ return result;
+ }
+
+
+ public String getURIForPrefix(String prefix)
+ {
+ String result = null;
+ NamespaceInfo info = getNamespaceInfoForPrefix(prefix);
+ if (info != null)
+ {
+ result = info.uri;
+ }
+ return result;
+ }
+
+
+ protected boolean isMatchingString(String a, String b)
+ {
+ return ((a == null && b == null) || (a != null && b != null && a.equals(b)));
+ }
+
+
+ public NamespaceInfo getNamespaceInfoForURI(String uri)
+ {
+ return getNamespaceInfoForURI(uri, false);
+ }
+
+
+ public NamespaceInfo getNamespaceInfoForURI(String uri, boolean testImplied)
+ {
+ NamespaceInfo result = null;
+ for (Iterator i = hashtable.values().iterator(); i.hasNext(); )
+ {
+ NamespaceInfo nsInfo = (NamespaceInfo)i.next();
+ if (isMatchingString(nsInfo.uri, uri))
+ {
+ result = nsInfo;
+ if (testImplied && nsInfo.getProperty("isImplied") != null)
+ {
+ // continue
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+
+ public void setLocationHintForURI(String uri, String locationHint)
+ {
+ List list = new Vector();
+ for (Iterator i = hashtable.values().iterator(); i.hasNext(); )
+ {
+ NamespaceInfo nsInfo = (NamespaceInfo)i.next();
+ if (isMatchingString(nsInfo.uri, uri))
+ {
+ nsInfo.locationHint = locationHint;
+ }
+ }
+ }
+
+
+ public NamespaceInfo getNamespaceInfoForPrefix(String prefix)
+ {
+ prefix = prefix != null ? prefix : "";
+ return (NamespaceInfo)hashtable.get(prefix);
+ }
+
+
+ public void visitXMLNamespaceAttribute(Attr attr, String namespacePrefix, String namespaceURI)
+ {
+ NamespaceInfo nsInfo = new NamespaceInfo();
+ nsInfo.prefix = namespacePrefix;
+ nsInfo.uri = namespaceURI;
+
+ NamespaceInfo matchingNamespaceInfo = getNamespaceInfoForURI(namespaceURI);
+ if (matchingNamespaceInfo != null)
+ {
+ nsInfo.locationHint = matchingNamespaceInfo.locationHint;
+ }
+
+ internalAddNamespaceInfo(namespacePrefix, nsInfo);
+
+ super.visitXMLNamespaceAttribute(attr, namespacePrefix, namespaceURI);
+ }
+
+ public void visitXSISchemaLocationValuePair(String uri, String locationHint)
+ {
+ setLocationHintForURI(uri, locationHint);
+ }
+
+ public void addNamespaceInfo(NamespaceInfo info)
+ {
+ String key = (info.prefix != null) ? info.prefix : "";
+ internalAddNamespaceInfo(key, info);
+ }
+
+ protected void internalAddNamespaceInfo(String key, NamespaceInfo info)
+ {
+ hashtable.put(key, info);
+ }
+
+ protected void addNamespaceInfoList(List list, boolean isImplied)
+ {
+ if (list != null)
+ {
+ for (Iterator i = list.iterator(); i.hasNext(); )
+ {
+ NamespaceInfo info = (NamespaceInfo)i.next();
+ NamespaceInfo clone = new NamespaceInfo(info);
+ if (isImplied)
+ {
+ clone.setProperty("isImplied", "true");
+ }
+ addNamespaceInfo(clone);
+ }
+ }
+ }
+
+ public void addNamespaceInfoList(List list)
+ {
+ addNamespaceInfoList(list, false);
+ }
+
+ public void visitXSINoNamespaceSchemaLocationAttribute(Attr attr, String locationHint)
+ {
+ addNoNamespaceSchemaLocation(locationHint);
+ }
+
+ public void addNoNamespaceSchemaLocation(String locationHint)
+ {
+ NamespaceInfo nsInfo = new NamespaceInfo();
+ nsInfo.prefix = null;
+ nsInfo.uri = "";
+ nsInfo.locationHint = locationHint;
+ internalAddNamespaceInfo("", nsInfo);
+ }
+
+ public void addNamespaceInfo(String prefix, String uri, String locationHint)
+ {
+ NamespaceInfo nsInfo = new NamespaceInfo();
+ nsInfo.prefix = prefix;
+ nsInfo.uri = uri;
+ nsInfo.locationHint = locationHint;
+ internalAddNamespaceInfo(prefix != null ? prefix : "", nsInfo);
+ }
+
+ public void addElement(Element element)
+ {
+ visitElement(element);
+ }
+
+ public void addElementLineage(Element targetElement)
+ {
+ List list = NamespaceTable.getElementLineage(targetElement);
+ for (Iterator i = list.iterator(); i.hasNext(); )
+ {
+ Element element = (Element)i.next();
+ addElement(element);
+ }
+ }
+
+ public static List getElementLineage(Element element)
+ {
+ List result = new ArrayList();
+ for (Node node = element; node != null; node = node.getParentNode())
+ {
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ result.add(0, node);
+ }
+ else
+ {
+ break;
+ }
+ }
+ return result;
+ }
+
+ public Collection getNamespaceInfoCollection()
+ {
+ return hashtable.values();
+ }
+
+ public List getNamespaceInfoList()
+ {
+ List list = new Vector();
+ list.addAll(hashtable.values());
+ return list;
+ }
+}
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/CMDocumentTracker.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/CMDocumentTracker.java
index 8b862bbdf4..462f0a7698 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/CMDocumentTracker.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/CMDocumentTracker.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.sse.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/CMNodeWrapper.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/CMNodeWrapper.java
index 1e36639601..a2a796b188 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/CMNodeWrapper.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/CMNodeWrapper.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.sse.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
public interface CMNodeWrapper extends CMNode {
CMNode getOriginNode();
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/ContentModelAdapter.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/ContentModelAdapter.java
index f8b968bacc..94d39fd704 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/ContentModelAdapter.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/ContentModelAdapter.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.sse.core.contentmodel;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
* ContentModelAdapter interface
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/NullContentModel.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/NullContentModel.java
index 9a72bf507f..356f04e819 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/NullContentModel.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/contentmodel/NullContentModel.java
@@ -15,10 +15,10 @@ package org.eclipse.wst.sse.core.contentmodel;
import java.util.Iterator;
import java.util.NoSuchElementException;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNamespace;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamespace;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
/**
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java
index 428858dc88..2f78013877 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java
@@ -44,7 +44,7 @@ import org.osgi.framework.BundleContext;
* to DOM2 APIs, instead of the DOM1 (used by others, such as the desktop
* ("com.ibm.eclipse.*")) --> <requires><import
* plugin="com.ibm.etools.b2bxmlrt" export="true"/> <import
- * plugin="org.eclipse.wst.common.contentmodel" export="true"/> </requires>
+ * plugin="org.eclipse.wst.sse.core.internal.contentmodel" export="true"/> </requires>
* <runtime><library name="runtime/sedmodel.jar"> <export name="*"/>
* </library> </runtime> </plugin> to tell the workbench the model manager
* plugin ID and where to find this model manager plugin class. Then in the
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/ModelQueryAdapter.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/ModelQueryAdapter.java
index 76339f275c..aaee9a019c 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/ModelQueryAdapter.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/ModelQueryAdapter.java
@@ -12,9 +12,9 @@
*******************************************************************************/
package org.eclipse.wst.sse.core.modelquery;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.INodeAdapter;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/ModelQueryAdapterImpl.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/ModelQueryAdapterImpl.java
index d42c55974a..6b0478c84e 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/ModelQueryAdapterImpl.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/ModelQueryAdapterImpl.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.sse.core.modelquery;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/MovableModelQuery.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/MovableModelQuery.java
index c713c5eed6..157125eb8c 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/MovableModelQuery.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/modelquery/MovableModelQuery.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.sse.core.modelquery;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
public interface MovableModelQuery extends ModelQuery {
diff --git a/bundles/org.eclipse.wst.xml.core/plugin.xml b/bundles/org.eclipse.wst.xml.core/plugin.xml
index 73ce25de75..dd98fd558e 100644
--- a/bundles/org.eclipse.wst.xml.core/plugin.xml
+++ b/bundles/org.eclipse.wst.xml.core/plugin.xml
@@ -14,7 +14,6 @@
</runtime>
<requires>
<import plugin="org.eclipse.wst.sse.core"/>
- <import plugin="org.eclipse.wst.common.contentmodel"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.filebuffers"/>
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java
index ad5e83fef8..e0149dfa20 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/ElementNodeFormatter.java
@@ -13,10 +13,10 @@
package org.eclipse.wst.xml.core.format;
import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.format.IStructuredFormatContraints;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapter;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java
index 3ddd414e94..b5493e543e 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java
@@ -19,12 +19,12 @@ import java.util.List;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.text.edits.InsertEdit;
import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupHandler;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java
index 25a01fb223..c15b8d1ac6 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java
@@ -16,9 +16,9 @@ package org.eclipse.wst.xml.core.internal.document;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionContainer;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CMNodeUtil.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CMNodeUtil.java
index 44ecfabad5..0cba7245fc 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CMNodeUtil.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CMNodeUtil.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.xml.core.internal.document;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java
index 231e607d40..cd721692e0 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java
@@ -20,10 +20,10 @@ package org.eclipse.wst.xml.core.internal.document;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMEntityDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMEntityDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.modelhandler.IModelHandler;
import org.eclipse.wst.xml.core.NameValidator;
import org.eclipse.wst.xml.core.commentelement.impl.CommentElementRegistry;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java
index 8f98536fcd..b472b7f720 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java
@@ -16,8 +16,8 @@ package org.eclipse.wst.xml.core.internal.document;
import java.util.Iterator;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.parser.RegionParser;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java
index 5000a4d009..1b5a14292e 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.xml.core.internal.document;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.commentelement.impl.CommentElementRegistry;
import org.eclipse.wst.xml.core.document.DocumentTypeAdapter;
import org.eclipse.wst.xml.core.document.JSPTag;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForEmbeddedXML.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForEmbeddedXML.java
index bf5f3d1ab7..512c40487a 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForEmbeddedXML.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForEmbeddedXML.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.xml.core.modelquery;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManager;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapter;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForXML.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForXML.java
index f10b78ab86..1341cf395f 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForXML.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryAdapterFactoryForXML.java
@@ -20,15 +20,15 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.AbstractAdapterFactory;
import org.eclipse.wst.sse.core.AdapterFactory;
import org.eclipse.wst.sse.core.IModelStateListener;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapter;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapterImpl;
import org.eclipse.wst.xml.core.document.XMLNode;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryUtil.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryUtil.java
index 61f8cd4d32..39cbca07dd 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryUtil.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/ModelQueryUtil.java
@@ -14,10 +14,10 @@ package org.eclipse.wst.xml.core.modelquery;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapter;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryAssociationProvider.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryAssociationProvider.java
index b5a55d6d7b..12be690d7e 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryAssociationProvider.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryAssociationProvider.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.xml.core.modelquery;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.XMLAssociationProvider;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.XMLAssociationProvider;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.w3c.dom.Document;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryImpl.java
index 1ac1c16d78..1268677ee1 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/modelquery/XMLModelQueryImpl.java
@@ -14,8 +14,8 @@ package org.eclipse.wst.xml.core.modelquery;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.ModelQueryImpl;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.ModelQueryImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.modelquery.MovableModelQuery;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
diff --git a/bundles/org.eclipse.wst.xml.ui/plugin.xml b/bundles/org.eclipse.wst.xml.ui/plugin.xml
index 6e75c7e191..5915d9c899 100644
--- a/bundles/org.eclipse.wst.xml.ui/plugin.xml
+++ b/bundles/org.eclipse.wst.xml.ui/plugin.xml
@@ -21,7 +21,6 @@
<import plugin="org.eclipse.wst.sse.ui"/>
<import plugin="org.eclipse.wst.sse.core"/>
<import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.wst.common.contentmodel"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.wst.xml.uriresolver.ui"/>
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/DOMPropertyDescriptorFactory.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/DOMPropertyDescriptorFactory.java
index 906c4c577a..22d2d86376 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/DOMPropertyDescriptorFactory.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/DOMPropertyDescriptorFactory.java
@@ -10,8 +10,8 @@ package org.eclipse.wst.xml.ui.internal.tabletree;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.ui.internal.properties.EnumeratedStringPropertyDescriptor;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java
index d042bc2a8c..3dd1ad9edc 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java
@@ -19,7 +19,7 @@ import java.util.Vector;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.contentmodel.util.DOMWriter;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMWriter;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.w3c.dom.Attr;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
index 252d0b00a1..2b183ee897 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
@@ -26,10 +26,10 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.CMDocumentLoader;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.InferredGrammarBuildingCMDocumentLoader;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.CMDocumentLoader;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.InferredGrammarBuildingCMDocumentLoader;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeContentProvider.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeContentProvider.java
index 4603efa862..be09e44733 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeContentProvider.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeContentProvider.java
@@ -22,14 +22,14 @@ import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManagerListener;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.AbstractAdapterFactory;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManagerListener;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.ui.internal.Logger;
import org.eclipse.wst.xml.ui.util.SharedXMLEditorPluginImageHelper;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreePropertyDescriptorFactory.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreePropertyDescriptorFactory.java
index 1904e12f72..c14251ca59 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreePropertyDescriptorFactory.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreePropertyDescriptorFactory.java
@@ -14,10 +14,10 @@ import java.util.List;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.ui.internal.properties.EnumeratedStringPropertyDescriptor;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
index a6c1dfa5cf..169a76dbe5 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
@@ -25,9 +25,9 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.IModelStateListener;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.ui.ViewerSelectionManager;
import org.eclipse.wst.sse.ui.view.events.INodeSelectionListener;
import org.eclipse.wst.sse.ui.view.events.NodeSelectionChangedEvent;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
index 44a0373dfc..e280656dea 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
@@ -19,9 +19,9 @@ import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDescriptionBuilder;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDescriptionBuilder;
import org.eclipse.wst.xml.internal.ui.XMLEditorResourceHandler;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java
index 9cf981165d..78a98e05b8 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java
@@ -14,10 +14,10 @@ import java.util.Hashtable;
import java.util.List;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMAnyElement;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.util.ContentBuilder;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAnyElement;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.ContentBuilder;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
public class NamespaceInfoContentBuilder extends ContentBuilder
{
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
index 6ad0dd44d2..cfea042464 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
@@ -25,14 +25,14 @@ import javax.xml.parsers.DocumentBuilderFactory;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.util.Assert;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMPlugin;
-import org.eclipse.wst.common.contentmodel.util.ContentBuilder;
-import org.eclipse.wst.common.contentmodel.util.DOMContentBuilderImpl;
-import org.eclipse.wst.common.contentmodel.util.DOMWriter;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.ContentModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.ContentBuilder;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMContentBuilderImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMWriter;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
import org.eclipse.wst.xml.uriresolver.XMLCatalog;
@@ -83,7 +83,7 @@ public class NewXMLGenerator
if (URIHelper.isReadableURI(uri,true))
{
uri = URIHelper.normalize(uri, null, null);
- cmDocument = CMPlugin.getInstance().createCMDocument(uri, null);
+ cmDocument = ContentModelManager.getInstance().createCMDocument(uri, null);
if (uri.endsWith(".dtd"))
{
@@ -395,7 +395,7 @@ public class NewXMLGenerator
if (locationHint != null)
{
grammarURI = idResolver.resolveId(locationHint, locationHint);
- result = CMPlugin.getInstance().createCMDocument(getGrammarURI(), null);
+ result = ContentModelManager.getInstance().createCMDocument(getGrammarURI(), null);
}
}
else
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
index 073e495fa5..2220787bc5 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
@@ -47,11 +47,11 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.util.DOMContentBuilder;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMContentBuilder;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.NamespaceInfoErrorHelper;
import org.eclipse.wst.xml.ui.dialogs.SelectFileOrXMLCatalogIdPanel;
import org.eclipse.wst.xml.ui.dialogs.UpdateListener;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/DOMObserver.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/DOMObserver.java
index e94585515d..08a1e5e2a1 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/DOMObserver.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/DOMObserver.java
@@ -16,13 +16,13 @@ package org.eclipse.wst.xml.ui;
import java.util.Timer;
import java.util.TimerTask;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.CMDocumentLoader;
-import org.eclipse.wst.common.contentmodel.modelqueryimpl.InferredGrammarBuildingCMDocumentLoader;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.CMDocumentLoader;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelqueryimpl.InferredGrammarBuildingCMDocumentLoader;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.w3c.dom.Document;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/JobStatusLineHelper.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/JobStatusLineHelper.java
index b0803039ad..ca7be52455 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/JobStatusLineHelper.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/JobStatusLineHelper.java
@@ -23,7 +23,7 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
/**
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java
index 6b5d923e93..97f66bdc64 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java
@@ -25,16 +25,16 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDescriptionBuilder;
-import org.eclipse.wst.common.contentmodel.util.DOMContentBuilder;
-import org.eclipse.wst.common.contentmodel.util.DOMContentBuilderImpl;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDescriptionBuilder;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMContentBuilder;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMContentBuilderImpl;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.CMImageUtil;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
index 38b50f17e4..3711317993 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
@@ -21,14 +21,14 @@ import java.util.Vector;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQueryAction;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryAction;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Attr;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java
index db9d410c1b..09f754e40d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java
@@ -20,8 +20,8 @@ import java.util.Map;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceInfoManager;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceInfoManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.EditSchemaInfoDialog;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Document;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ReplacePrefixAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ReplacePrefixAction.java
index c94df41219..5d111ded4d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ReplacePrefixAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ReplacePrefixAction.java
@@ -18,7 +18,7 @@ import java.util.Map;
import java.util.Vector;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.wst.common.contentmodel.util.DOMVisitor;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMVisitor;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
index 5f844eb732..12a225a413 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
@@ -25,22 +25,22 @@ import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMEntityDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQueryAction;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMEntityDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryAction;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.internal.encoding.ContentTypeEncodingPreferences;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentModelGenerator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentModelGenerator.java
index 27b0d7267b..12b1204826 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentModelGenerator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentModelGenerator.java
@@ -12,11 +12,11 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.contentassist;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
import org.w3c.dom.Node;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationProvider.java
index bf2e0eb093..acf558e7fe 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationProvider.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AttributeContextInformationProvider.java
@@ -21,13 +21,13 @@ import java.util.List;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.contentassist.ContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMContent;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMGroup;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMContent;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMGroup;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/ContextInfoModelUtil.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/ContextInfoModelUtil.java
index 275e609a1d..f4baeb92f6 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/ContextInfoModelUtil.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/ContextInfoModelUtil.java
@@ -12,9 +12,9 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.contentassist;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/NonValidatingModelQueryAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/NonValidatingModelQueryAction.java
index 1bdfb81983..dcde79f185 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/NonValidatingModelQueryAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/NonValidatingModelQueryAction.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.xml.ui.contentassist;
-import org.eclipse.wst.common.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
-public class NonValidatingModelQueryAction implements org.eclipse.wst.common.contentmodel.modelquery.ModelQueryAction {
+public class NonValidatingModelQueryAction implements org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQueryAction {
protected CMNode cmnode = null;
protected int endIndex = 0;
@@ -46,7 +46,7 @@ public class NonValidatingModelQueryAction implements org.eclipse.wst.common.con
/**
* getCMNode method comment.
*/
- public org.eclipse.wst.common.contentmodel.CMNode getCMNode() {
+ public org.eclipse.wst.sse.core.internal.contentmodel.CMNode getCMNode() {
return cmnode;
}
@@ -97,7 +97,7 @@ public class NonValidatingModelQueryAction implements org.eclipse.wst.common.con
/**
* setCMNode method comment.
*/
- protected void setCMNode(org.eclipse.wst.common.contentmodel.CMNode newNode) {
+ protected void setCMNode(org.eclipse.wst.sse.core.internal.contentmodel.CMNode newNode) {
cmnode = newNode;
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/SimpleCMElementDeclaration.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/SimpleCMElementDeclaration.java
index 42dce88174..2d35f51e68 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/SimpleCMElementDeclaration.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/SimpleCMElementDeclaration.java
@@ -14,7 +14,7 @@ package org.eclipse.wst.xml.ui.contentassist;
-public class SimpleCMElementDeclaration implements org.eclipse.wst.common.contentmodel.CMElementDeclaration {
+public class SimpleCMElementDeclaration implements org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration {
String fNodeName;
@@ -37,7 +37,7 @@ public class SimpleCMElementDeclaration implements org.eclipse.wst.common.conten
*
* Returns CMNamedNodeMap of AttributeDeclaration
*/
- public org.eclipse.wst.common.contentmodel.CMNamedNodeMap getAttributes() {
+ public org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap getAttributes() {
return null;
}
@@ -49,7 +49,7 @@ public class SimpleCMElementDeclaration implements org.eclipse.wst.common.conten
* Returns the root node of this element's content model. This can be an
* CMElementDeclaration or a CMGroup
*/
- public org.eclipse.wst.common.contentmodel.CMContent getContent() {
+ public org.eclipse.wst.sse.core.internal.contentmodel.CMContent getContent() {
return null;
}
@@ -69,7 +69,7 @@ public class SimpleCMElementDeclaration implements org.eclipse.wst.common.conten
*
* @return java.lang.String
*/
- public org.eclipse.wst.common.contentmodel.CMDataType getDataType() {
+ public org.eclipse.wst.sse.core.internal.contentmodel.CMDataType getDataType() {
return null;
}
@@ -89,7 +89,7 @@ public class SimpleCMElementDeclaration implements org.eclipse.wst.common.conten
*
* Returns a list of locally defined elements.
*/
- public org.eclipse.wst.common.contentmodel.CMNamedNodeMap getLocalElements() {
+ public org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap getLocalElements() {
return null;
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentModelGenerator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentModelGenerator.java
index 64e7834b6f..f1ec66c152 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentModelGenerator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentModelGenerator.java
@@ -14,9 +14,9 @@ package org.eclipse.wst.xml.ui.contentassist;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.w3c.dom.Node;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java
index db03c67d03..d12c78e719 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java
@@ -34,9 +34,9 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMPlugin;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.ContentModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.eclipse.wst.xml.uriresolver.util.IdResolverImpl;
@@ -211,7 +211,7 @@ public class EditNamespaceInfoDialog extends Dialog {
}
try {
- CMDocument document = CMPlugin.getInstance().createCMDocument(grammarURI, "xsd"); //$NON-NLS-1$
+ CMDocument document = ContentModelManager.getInstance().createCMDocument(grammarURI, "xsd"); //$NON-NLS-1$
List namespaceInfoList = (List) document.getProperty("http://org.eclipse.wst/cm/properties/namespaceInfo"); //$NON-NLS-1$
NamespaceInfo info = (NamespaceInfo) namespaceInfoList.get(0);
if (uriField.getText().trim().length() == 0 && info.uri != null) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java
index 9101f2fd8b..3352dedcd3 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java
@@ -16,8 +16,8 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceInfoManager;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceInfoManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.eclipse.wst.xml.uriresolver.util.URIHelper;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java
index bcd71517c5..79c269c0ef 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java
@@ -48,7 +48,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
public class NamespaceInfoTable extends Composite {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
index 02a593089c..295667c527 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
@@ -25,8 +25,8 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.text.edits.InsertEdit;
import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java
index b2f00fa8dd..d51ee38ee1 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java
@@ -18,10 +18,10 @@ import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java
index 532c683c08..e78b50aae8 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java
@@ -19,8 +19,8 @@ import java.net.URLConnection;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Attr;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java
index 15af358cd6..202f2392e1 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java
@@ -18,15 +18,15 @@ import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.jface.text.hyperlink.URLHyperlink;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.common.uriresolver.URIResolverPlugin;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.xml.core.document.XMLAttr;
import org.eclipse.wst.xml.core.document.XMLNode;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java
index 03cf2de5fe..ac2a512f93 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java
@@ -30,7 +30,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.part.PageBook;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.SelectFileOrXMLCatalogIdDialog;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesDialog.java
index a1ba50f0cb..77477d5bde 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesDialog.java
@@ -26,7 +26,7 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.uriresolver.XMLCatalog;
import org.eclipse.wst.xml.uriresolver.XMLCatalogEntry;
import org.eclipse.wst.xml.uriresolver.XMLCatalogPlugin;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java
index 2ff3ee283e..b0171a5084 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java
@@ -34,7 +34,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.EditNamespaceInfoDialog;
import org.eclipse.wst.xml.ui.dialogs.NamespaceInfoErrorHelper;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java
index fb2506dc5d..85c7e081da 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java
@@ -20,7 +20,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.EditNamespaceInfoDialog;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java
index 7da1d32a5d..7f4e07c166 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java
@@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
public class CommonNamespaceInfoTable extends TableViewer {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/openon/DefaultOpenOnXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/openon/DefaultOpenOnXML.java
index 25870e5077..df38f00ad3 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/openon/DefaultOpenOnXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/openon/DefaultOpenOnXML.java
@@ -21,14 +21,14 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.common.uriresolver.URIResolverPlugin;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.sse.ui.openon.AbstractOpenOn;
import org.eclipse.wst.xml.core.document.XMLAttr;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepAdapterForXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepAdapterForXML.java
index 3e0b4bebe9..a75b225445 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepAdapterForXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepAdapterForXML.java
@@ -21,16 +21,16 @@ import java.util.Vector;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.reconciler.IReconcileResult;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCacheListener;
import org.eclipse.wst.sse.core.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCacheListener;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.ui.IReleasable;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForXML.java
index da00c7e4e5..c0abf59452 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForXML.java
@@ -14,11 +14,11 @@ package org.eclipse.wst.xml.ui.registry;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.AdapterFactory;
import org.eclipse.wst.sse.core.IFactoryRegistry;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.modelhandler.IDocumentTypeHandler;
import org.eclipse.wst.sse.core.util.Assert;
import org.eclipse.wst.sse.ui.registry.AdapterFactoryProvider;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java
index d450fe07e1..903d3101a7 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java
@@ -12,13 +12,13 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.taginfo;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMDocumentation;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.CMNodeList;
-import org.eclipse.wst.common.contentmodel.util.CMDescriptionBuilder;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocumentation;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNodeList;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDescriptionBuilder;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
/**
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/XMLTagInfoHoverProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/XMLTagInfoHoverProcessor.java
index 247334d7a9..45f24a9610 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/XMLTagInfoHoverProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/XMLTagInfoHoverProcessor.java
@@ -19,13 +19,13 @@ import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextHover;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.Region;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapter.java
index e570bb3698..d893e90127 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapter.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapter.java
@@ -26,12 +26,12 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.wst.common.contentmodel.CMDocument;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManagerListener;
-import org.eclipse.wst.common.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.core.AdapterFactory;
import org.eclipse.wst.sse.core.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManagerListener;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache;
import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapter;
import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapterFactory;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
@@ -50,7 +50,7 @@ public class JFaceNodeAdapter implements IJFaceNodeAdapter {
List beingRefreshed = Collections.synchronizedList(new ArrayList());
- public void cacheCleared(org.eclipse.wst.common.contentmodel.util.CMDocumentCache cache) {
+ public void cacheCleared(org.eclipse.wst.sse.core.internal.contentmodel.util.CMDocumentCache cache) {
}
@@ -201,7 +201,7 @@ public class JFaceNodeAdapter implements IJFaceNodeAdapter {
* Returns a CMDocumentManagerListener that can update JFace views when
* notified of CMDocumentManager events
*/
- public org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManagerListener getCMDocumentManagerListener() {
+ public org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManagerListener getCMDocumentManagerListener() {
if (cmDocumentManagerListener == null)
cmDocumentManagerListener = new CMDocumentManagerListenerImpl();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapterFactory.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapterFactory.java
index c13860683e..870facba5e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapterFactory.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapterFactory.java
@@ -17,12 +17,12 @@ package org.eclipse.wst.xml.ui.views.contentoutline;
import java.util.ArrayList;
import java.util.Collection;
-import org.eclipse.wst.common.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.AbstractAdapterFactory;
import org.eclipse.wst.sse.core.AdapterFactory;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.CMDocumentManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.modelquery.ModelQueryAdapter;
import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapter;
import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapterFactory;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/XMLNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/XMLNodeActionManager.java
index 9fe7c36c70..e91ac994b4 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/XMLNodeActionManager.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/XMLNodeActionManager.java
@@ -13,9 +13,9 @@
package org.eclipse.wst.xml.ui.views.contentoutline;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.format.IStructuredFormatProcessor;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.format.FormatProcessorXML;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.ui.actions.AbstractNodeActionManager;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySourceAdapter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySourceAdapter.java
index 36f2837d99..c598fbb155 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySourceAdapter.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySourceAdapter.java
@@ -24,13 +24,13 @@ import org.eclipse.ui.views.properties.IPropertySheetEntry;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.IPropertySource2;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.common.contentmodel.CMDataType;
-import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMAttributeDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMDataType;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.ui.views.properties.IPropertySourceExtension;
import org.eclipse.wst.xml.core.document.DocumentTypeAdapter;
import org.eclipse.wst.xml.core.document.XMLNode;
diff --git a/bundles/org.eclipse.wst.xsd.ui/plugin.xml b/bundles/org.eclipse.wst.xsd.ui/plugin.xml
index a8a0796419..b617deeb2d 100644
--- a/bundles/org.eclipse.wst.xsd.ui/plugin.xml
+++ b/bundles/org.eclipse.wst.xsd.ui/plugin.xml
@@ -20,7 +20,6 @@
<import plugin="org.eclipse.wst.sse.core"/>
<import plugin="org.eclipse.wst.xml.core"/>
<import plugin="org.eclipse.wst.xml.ui"/>
- <import plugin="org.eclipse.wst.common.contentmodel"/>
<import plugin="org.eclipse.wst.common.ui"/>
<import plugin="org.eclipse.jface.text"/>
@@ -119,7 +118,7 @@
<!-- Support help on the tags -->
<!-- ==================================================== -->
<!-- <extension
- point="org.eclipse.wst.common.contentmodel.annotationFiles">
+ point="org.eclipse.wst.sse.core.internal.contentmodel.annotationFiles">
<annotationFile
location="/w3c/schemaForCodeAssist-annotations.xml"
publicId="http://www.w3.org/2001/XMLSchema">
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDDataTypeValueExtension.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDDataTypeValueExtension.java
index 323cb9480f..c4c3253507 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDDataTypeValueExtension.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDDataTypeValueExtension.java
@@ -11,9 +11,9 @@
package org.eclipse.wst.xsd.ui.internal;
import java.util.Vector;
-import org.eclipse.wst.common.contentmodel.CMNode;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.modelquery.extension.DataTypeValueExtension;
+import org.eclipse.wst.sse.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.extension.DataTypeValueExtension;
import org.eclipse.wst.xsd.ui.internal.util.TypesHelper;
import org.eclipse.xsd.XSDSchema;
import org.w3c.dom.Element;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java
index 717afe0c59..db9b8a5c41 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/AbstractXSDModelQueryContributor.java
@@ -13,8 +13,8 @@ import java.net.URL;
import java.util.Vector;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.w3c.dom.Document;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java
index dd185156ae..794e741bb0 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java
@@ -33,8 +33,8 @@ import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.core.internal.SSECorePlugin;
+import org.eclipse.wst.sse.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.edit.util.StructuredTextEditorActionConstants;
import org.eclipse.wst.sse.ui.internal.openon.OpenOnAction;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/XSDEditNamespacesAction.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/XSDEditNamespacesAction.java
index 85a5a3781b..ad2bca8296 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/XSDEditNamespacesAction.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/actions/XSDEditNamespacesAction.java
@@ -19,8 +19,8 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.common.contentmodel.util.DOMNamespaceInfoManager;
-import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.DOMNamespaceInfoManager;
+import org.eclipse.wst.sse.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.eclipse.wst.xml.ui.actions.ReplacePrefixAction;
import org.eclipse.wst.xml.ui.util.XMLCommonResources;

Back to the top