├── .ci.ston ├── .github └── workflows │ └── test.yml ├── .project ├── LICENSE ├── README.md ├── doc └── images │ └── screen001.png └── src ├── .properties ├── BaselineOfXMLParser ├── BaselineOfXMLParser.class.st └── package.st ├── XML-Parser-GTExtensions ├── FileReference.extension.st ├── GLMXMLDisabledDocumentHighlighterTextStylerDecorator.class.st ├── GLMXMLDisabledRubricHighlightedTextPresentation.class.st ├── GLMXMLDocumentHighlighterTextStylerDecorator.class.st ├── GLMXMLHighlighterTextStylerDecorator.class.st ├── GLMXMLOuterXMLDocumentHighlighterTextStylerDecorator.class.st ├── SAXPositionHandler.class.st ├── SAXPositionParserDriver.class.st ├── XMLAttribute.extension.st ├── XMLAttributeList.extension.st ├── XMLDeclarationNode.extension.st ├── XMLDoctypeDeclaration.extension.st ├── XMLDocument.extension.st ├── XMLDocumentHighlightDefaults.class.st ├── XMLDocumentHighlighter.class.st ├── XMLElement.extension.st ├── XMLExternalDocumentConverter.class.st ├── XMLHighlight.class.st ├── XMLHighlightDefaults.class.st ├── XMLHighlighter.class.st ├── XMLHighlightingCanonicalWriterFormatter.class.st ├── XMLHighlightingParser.class.st ├── XMLHighlightingPrettyPrintingWriterFormatter.class.st ├── XMLHighlightingPrologPrettyPrintingWriterFormatter.class.st ├── XMLHighlightingWriter.class.st ├── XMLHighlightingWriterFormatter.class.st ├── XMLInternalSubsetList.extension.st ├── XMLLazyAttributeDictionary.extension.st ├── XMLNFAState.extension.st ├── XMLNode.extension.st ├── XMLNodeList.extension.st ├── XMLNodeWithChildren.extension.st ├── XMLNodeWithElements.extension.st ├── XMLOrderedList.extension.st ├── XMLPositionWellFormedParserTokenizer.class.st └── package.st ├── XML-Parser-GemstoneCompatibility ├── CharacterCollection.extension.st ├── Collection.extension.st ├── GsFile.extension.st ├── PositionableStream.extension.st ├── XMLGsFileReadStreamFactory.class.st ├── XMLGsFileWriteStreamFactory.class.st ├── XMLParserGemstoneCompatibility.class.st ├── XMLTransientKeyValueCache.class.st ├── XMLTransientReentrantMutex.class.st └── package.st ├── XML-Parser-Tests-Conformance ├── XMLConformanceCanonicalWriterFormatter.class.st ├── XMLConformanceDoctypeDeclarationWriter.class.st ├── XMLConformanceExpatTest.class.st ├── XMLConformanceFileFinder.class.st ├── XMLConformanceNotationDeclarationWriter.class.st ├── XMLConformanceOasisTest.class.st ├── XMLConformancePIWriter.class.st ├── XMLConformanceSunTest.class.st ├── XMLConformanceTest.class.st ├── XMLConformanceVirtualFileExternalEntityResolver.class.st ├── XMLConformanceWriter.class.st └── package.st ├── XML-Parser-Tests ├── BitmapCharacterSet.extension.st ├── DTDCachingExternalEntityResolverLimitingTest.class.st ├── DTDCachingExternalEntityResolverTest.class.st ├── DTDExternalEntityResolverLimitingTest.class.st ├── DTDExternalEntityResolverTest.class.st ├── DTDStaticExternalEntityResolverLimitingTest.class.st ├── DTDStaticExternalEntityResolverTest.class.st ├── ManifestXMLParserTests.class.st ├── SAX2ElementHandlerParserTest.class.st ├── SAX2HAuthorElementHandler.class.st ├── SAX2HBookElementHandler.class.st ├── SAX2HBooksElementHandler.class.st ├── SAX2HContactsElementHandler.class.st ├── SAX2HDateOfBirthElementHandler.class.st ├── SAX2HEmailElementHandler.class.st ├── SAX2HISBNElementHandler.class.st ├── SAX2HNameElementHandler.class.st ├── SAX2HPersonElementHandler.class.st ├── SAX2HResidenceElementHandler.class.st ├── SAX2HTitleElementHandler.class.st ├── SAX2ParserTest.class.st ├── SAX2SampleBook.class.st ├── SAX2SamplePerson.class.st ├── SAXHandlerTest.class.st ├── SAXInterruptingRecordingPrefixURILocalNameHandler.class.st ├── SAXRecordingHandler.class.st ├── SAXRecordingPrefixURIHandler.class.st ├── SAXRecordingPrefixURILocalNameHandler.class.st ├── SAXTestingMessageRecordingHandler.class.st ├── TestCase.extension.st ├── XMLASCIIStreamConverterTest.class.st ├── XMLAbstractReadStreamTest.class.st ├── XMLAbstractSetTest.class.st ├── XMLAttributeDeclarationTest.class.st ├── XMLAttributeDictionaryTest.class.st ├── XMLAttributeListTest.class.st ├── XMLAttributeSpecTest.class.st ├── XMLAttributeTest.class.st ├── XMLBasicAttributeSpecTest.class.st ├── XMLBasicElementClassMapperTest.class.st ├── XMLCDataTest.class.st ├── XMLCachingAttributeListTest.class.st ├── XMLCachingNodeListTest.class.st ├── XMLCharacterMethodsTest.class.st ├── XMLClassFinderTest.class.st ├── XMLCommentTest.class.st ├── XMLConfigurationTest.class.st ├── XMLDFALimitsTest.class.st ├── XMLDOMConfigurationTest.class.st ├── XMLDOMParserTest.class.st ├── XMLDeclarationNodeTest.class.st ├── XMLDecodingReadStreamAdapterASCIIStringTest.class.st ├── XMLDecodingReadStreamAdapterASCIITest.class.st ├── XMLDecodingReadStreamAdapterLatin1StringTest.class.st ├── XMLDecodingReadStreamAdapterLatin1Test.class.st ├── XMLDecodingReadStreamAdapterStringTest.class.st ├── XMLDecodingReadStreamAdapterTest.class.st ├── XMLDecodingReadStreamAdapterUTF16BEBOMStringTest.class.st ├── XMLDecodingReadStreamAdapterUTF16BEBOMTest.class.st ├── XMLDecodingReadStreamAdapterUTF16BEStringTest.class.st ├── XMLDecodingReadStreamAdapterUTF16BETest.class.st ├── XMLDecodingReadStreamAdapterUTF16LEBOMStringTest.class.st ├── XMLDecodingReadStreamAdapterUTF16LEBOMTest.class.st ├── XMLDecodingReadStreamAdapterUTF16LEStringTest.class.st ├── XMLDecodingReadStreamAdapterUTF16LETest.class.st ├── XMLDecodingReadStreamAdapterUTF32BEBOMStringTest.class.st ├── XMLDecodingReadStreamAdapterUTF32BEBOMTest.class.st ├── XMLDecodingReadStreamAdapterUTF32BEStringTest.class.st ├── XMLDecodingReadStreamAdapterUTF32BETest.class.st ├── XMLDecodingReadStreamAdapterUTF32LEBOMStringTest.class.st ├── XMLDecodingReadStreamAdapterUTF32LEBOMTest.class.st ├── XMLDecodingReadStreamAdapterUTF32LEStringTest.class.st ├── XMLDecodingReadStreamAdapterUTF32LETest.class.st ├── XMLDecodingReadStreamAdapterUTF8BOMStringTest.class.st ├── XMLDecodingReadStreamAdapterUTF8BOMTest.class.st ├── XMLDecodingReadStreamAdapterUTF8StringTest.class.st ├── XMLDecodingReadStreamAdapterUTF8Test.class.st ├── XMLDoctypeDeclarationTest.class.st ├── XMLDocumentTest.class.st ├── XMLDocumentWithCachingNodeList.class.st ├── XMLDocumentWithCachingNodeListTest.class.st ├── XMLElementClassMapperTest.class.st ├── XMLElementDeclarationTest.class.st ├── XMLElementTest.class.st ├── XMLElementWithCachingNodeList.class.st ├── XMLElementWithCachingNodeListTest.class.st ├── XMLElementWithoutCachingAttributeList.class.st ├── XMLElementWithoutCachingAttributeListTest.class.st ├── XMLEncodingDetectorTest.class.st ├── XMLEncodingDetectorUTF16BEStringTest.class.st ├── XMLEncodingDetectorUTF16BETest.class.st ├── XMLEncodingDetectorUTF16LEStringTest.class.st ├── XMLEncodingDetectorUTF16LETest.class.st ├── XMLEncodingDetectorUTF32BEStringTest.class.st ├── XMLEncodingDetectorUTF32BETest.class.st ├── XMLEncodingDetectorUTF32LEStringTest.class.st ├── XMLEncodingDetectorUTF32LETest.class.st ├── XMLEncodingDetectorUTF8StringTest.class.st ├── XMLEncodingDetectorUTF8Test.class.st ├── XMLEncodingTest.class.st ├── XMLEncodingWriteStreamAdapterASCIIStringTest.class.st ├── XMLEncodingWriteStreamAdapterASCIITest.class.st ├── XMLEncodingWriteStreamAdapterLatin1StringTest.class.st ├── XMLEncodingWriteStreamAdapterLatin1Test.class.st ├── XMLEncodingWriteStreamAdapterTest.class.st ├── XMLEncodingWriteStreamAdapterUTF16BEStringTest.class.st ├── XMLEncodingWriteStreamAdapterUTF16BETest.class.st ├── XMLEncodingWriteStreamAdapterUTF16LEStringTest.class.st ├── XMLEncodingWriteStreamAdapterUTF16LETest.class.st ├── XMLEncodingWriteStreamAdapterUTF32BEStringTest.class.st ├── XMLEncodingWriteStreamAdapterUTF32BETest.class.st ├── XMLEncodingWriteStreamAdapterUTF32LEStringTest.class.st ├── XMLEncodingWriteStreamAdapterUTF32LETest.class.st ├── XMLEncodingWriteStreamAdapterUTF8StringTest.class.st ├── XMLEncodingWriteStreamAdapterUTF8Test.class.st ├── XMLEntityDeclarationTest.class.st ├── XMLExceptionRaisingReadStream.class.st ├── XMLExceptionTest.class.st ├── XMLExternalEntityTest.class.st ├── XMLFAttributeList.class.st ├── XMLFCData.class.st ├── XMLFComment.class.st ├── XMLFDateElement.class.st ├── XMLFDocument.class.st ├── XMLFElement.class.st ├── XMLFNodeList.class.st ├── XMLFPI.class.st ├── XMLFRealNameElement.class.st ├── XMLFSerializationFormatElement.class.st ├── XMLFString.class.st ├── XMLFTableElement.class.st ├── XMLFUserElement.class.st ├── XMLFUsernameElement.class.st ├── XMLFWrongElement.class.st ├── XMLFileHandleTest.class.st ├── XMLFileHandleUTF16BETest.class.st ├── XMLFileHandleUTF16LETest.class.st ├── XMLFileHandleUTF32BETest.class.st ├── XMLFileHandleUTF32LETest.class.st ├── XMLFileHandleUTF8Test.class.st ├── XMLGeneralEntityDeclarationTest.class.st ├── XMLHTTPMIMETypeTest.class.st ├── XMLHTTPMessageTest.class.st ├── XMLHTTPRequestTest.class.st ├── XMLHTTPResponseTest.class.st ├── XMLImplicitUTF16BigEndianStreamConverterTest.class.st ├── XMLImplicitUTF16LittleEndianStreamConverterTest.class.st ├── XMLImplicitUTF32BigEndianStreamConverterTest.class.st ├── XMLImplicitUTF32LittleEndianStreamConverterTest.class.st ├── XMLImplicitUTF8StreamConverterTest.class.st ├── XMLIntegerReaderTest.class.st ├── XMLKeyValueCacheTest.class.st ├── XMLLatin1StreamConverterTest.class.st ├── XMLLazyAttributeDictionaryTest.class.st ├── XMLLazyNamespacedAttributeDictionaryTest.class.st ├── XMLLimitedReadStreamAdapterTest.class.st ├── XMLMessageRecorder.class.st ├── XMLNFAStateSetTest.class.st ├── XMLNamespaceScopeTest.class.st ├── XMLNamespacedAttributeDictionaryTest.class.st ├── XMLNestedStreamReaderTest.class.st ├── XMLNodeCanonicalPrintingTest.class.st ├── XMLNodeFactoryTest.class.st ├── XMLNodeListTest.class.st ├── XMLNodeTest.class.st ├── XMLNodeWithChildrenTest.class.st ├── XMLNodeWithElementsTest.class.st ├── XMLNotationDeclarationTest.class.st ├── XMLNullReadStreamTest.class.st ├── XMLNullStreamConverterTest.class.st ├── XMLObservableListTest.class.st ├── XMLOrderedListTest.class.st ├── XMLPITest.class.st ├── XMLParameterEntityDeclarationTest.class.st ├── XMLParserExceptionTest.class.st ├── XMLParserLimitsTest.class.st ├── XMLParserTest.class.st ├── XMLPercentDecodingReadStreamAdapterTest.class.st ├── XMLPercentEncodingWriteStreamAdapterTest.class.st ├── XMLPluggableAttributeSpecTest.class.st ├── XMLPluggableElementFactoryTest.class.st ├── XMLPluggableNodeFactoryTest.class.st ├── XMLReadStreamAdapterTest.class.st ├── XMLRecordingAttributeListObserver.class.st ├── XMLRecordingListObserver.class.st ├── XMLRecordingNodeListObserver.class.st ├── XMLRecordingNodeVisitor.class.st ├── XMLSingleCharacterReadStreamTest.class.st ├── XMLSkippableTest.class.st ├── XMLSmallIntegerReaderTest.class.st ├── XMLStreamAdapterTest.class.st ├── XMLStreamConverterTest.class.st ├── XMLStringMethodsTest.class.st ├── XMLStringReadStreamAdapterBinaryTest.class.st ├── XMLStringReadStreamAdapterTest.class.st ├── XMLStringTest.class.st ├── XMLStubOrderedListCustomCollection.class.st ├── XMLTempFileManager.class.st ├── XMLURITest.class.st ├── XMLUTF16BigEndianStreamConverterTest.class.st ├── XMLUTF16LittleEndianStreamConverterTest.class.st ├── XMLUTF32BigEndianStreamConverterTest.class.st ├── XMLUTF32LittleEndianStreamConverterTest.class.st ├── XMLUTF8StreamConverterTest.class.st ├── XMLWriteStreamAdapterTest.class.st └── package.st ├── XML-Parser-Tools ├── XMLDocument.extension.st ├── XMLElement.extension.st ├── XMLNode.extension.st └── package.st └── XML-Parser ├── Character.extension.st ├── Collection.extension.st ├── DTDAttributeDefinitionParser.class.st ├── DTDCachingExternalEntityResolver.class.st ├── DTDContentModelParser.class.st ├── DTDDecodedResolvedExternalParsedEntityReplacement.class.st ├── DTDDoctypeDefinition.class.st ├── DTDDocumentValidator.class.st ├── DTDElementContentModelParser.class.st ├── DTDEntity.class.st ├── DTDEntityConfiguration.class.st ├── DTDEnumerationListParser.class.st ├── DTDExternalEntityLimits.class.st ├── DTDExternalEntityResolver.class.st ├── DTDExternalEntityResolverLimitingDecorator.class.st ├── DTDExternalGeneralParsedEntity.class.st ├── DTDExternalParameterParsedEntity.class.st ├── DTDExternalParsedEntity.class.st ├── DTDExternalSubsetParserDriver.class.st ├── DTDInternalGeneralParsedEntity.class.st ├── DTDInternalParameterParsedEntity.class.st ├── DTDInternalParsedEntity.class.st ├── DTDLiteralContentModelParser.class.st ├── DTDMixedContentEnumerationListParser.class.st ├── DTDMixedContentModelParser.class.st ├── DTDNotation.class.st ├── DTDNotationEnumerationListParser.class.st ├── DTDParsedEntity.class.st ├── DTDResolvedExternalParsedEntityReplacement.class.st ├── DTDStandaloneExternalAttributeDefinitionParser.class.st ├── DTDStandaloneExternalElementContentModelParser.class.st ├── DTDStandaloneExternalExternalGeneralParsedEntity.class.st ├── DTDStandaloneExternalInternalGeneralParsedEntity.class.st ├── DTDStaticExternalEntityResolver.class.st ├── DTDSubsetParserDriver.class.st ├── DTDUndecodedResolvedExternalParsedEntityReplacement.class.st ├── DTDUnparsedEntity.class.st ├── DTDUnresolvableExternalGeneralParsedEntity.class.st ├── DTDUnresolvableExternalParameterParsedEntity.class.st ├── DTDUnresolvableExternalParsedEntity.class.st ├── DTDUnresolvedExternalParsedEntityReplacement.class.st ├── Error.extension.st ├── ManifestXMLParser.class.st ├── Object.extension.st ├── SAX2ContentHandler.class.st ├── SAX2DeclarationHandler.class.st ├── SAX2ElementCharacterHandler.class.st ├── SAX2ElementHandler.class.st ├── SAX2ElementHandlerFactory.class.st ├── SAX2ElementHandlerFactoryMapper.class.st ├── SAX2ElementParser.class.st ├── SAX2LexicalHandler.class.st ├── SAX2Parser.class.st ├── SAX2PluggableElementHandlerFactory.class.st ├── SAX2PluggableElementHandlerFactoryMapper.class.st ├── SAXHandler.class.st ├── SAXParserDriver.class.st ├── SequenceableCollection.extension.st ├── Stream.extension.st ├── String.extension.st ├── UndefinedObject.extension.st ├── XMLASCIIStreamConverter.class.st ├── XMLAbstractFactory.class.st ├── XMLAbstractReadStream.class.st ├── XMLAbstractReadStreamParser.class.st ├── XMLAnyElementValidator.class.st ├── XMLAttribute.class.st ├── XMLAttributeDeclaration.class.st ├── XMLAttributeDefaultValidator.class.st ├── XMLAttributeDictionary.class.st ├── XMLAttributeFixedValueDefaultValidator.class.st ├── XMLAttributeImpliedDefaultValidator.class.st ├── XMLAttributeList.class.st ├── XMLAttributeRequiredDefaultValidator.class.st ├── XMLAttributeSpec.class.st ├── XMLAttributeValidator.class.st ├── XMLAttributeValueDefaultValidator.class.st ├── XMLBasicAttributeSpec.class.st ├── XMLBasicElementClassMapper.class.st ├── XMLCData.class.st ├── XMLCDataAttributeValidator.class.st ├── XMLCachingAttributeList.class.st ├── XMLCachingNodeList.class.st ├── XMLClassFinder.class.st ├── XMLComment.class.st ├── XMLConfiguration.class.st ├── XMLContentState.class.st ├── XMLDFAElementContentElementValidator.class.st ├── XMLDFAElementValidator.class.st ├── XMLDFAState.class.st ├── XMLDFAStateCache.class.st ├── XMLDOMConfiguration.class.st ├── XMLDOMException.class.st ├── XMLDOMParser.class.st ├── XMLDeclarationNode.class.st ├── XMLDecodingReadStreamAdapter.class.st ├── XMLDoctypeDeclaration.class.st ├── XMLDoctypeDeclarationState.class.st ├── XMLDocument.class.st ├── XMLDocumentValidator.class.st ├── XMLElement.class.st ├── XMLElementClassMapper.class.st ├── XMLElementDeclaration.class.st ├── XMLElementIDValidator.class.st ├── XMLElementNester.class.st ├── XMLElementValidator.class.st ├── XMLEmptyElementValidator.class.st ├── XMLEncodingDetector.class.st ├── XMLEncodingException.class.st ├── XMLEncodingWriteStreamAdapter.class.st ├── XMLEntitiesAttributeValidator.class.st ├── XMLEntityAttributeValidator.class.st ├── XMLEntityDeclaration.class.st ├── XMLEnumerationAttributeValidator.class.st ├── XMLException.class.st ├── XMLExternalSubsetState.class.st ├── XMLExternalSubsetTextDeclarationState.class.st ├── XMLFileDirectoryFileHandle.class.st ├── XMLFileException.class.st ├── XMLFileHandle.class.st ├── XMLFileReadStreamFactory.class.st ├── XMLFileSystemFileHandle.class.st ├── XMLFileWriteStreamFactory.class.st ├── XMLGeneralEntityDeclaration.class.st ├── XMLHTTPDecompressingReadStreamAdapterFactory.class.st ├── XMLHTTPException.class.st ├── XMLHTTPGZipDecompressingReadStreamAdapterFactory.class.st ├── XMLHTTPMIMEType.class.st ├── XMLHTTPMIMETypeParser.class.st ├── XMLHTTPMessage.class.st ├── XMLHTTPRequest.class.st ├── XMLHTTPResponse.class.st ├── XMLHTTPResponseContentReader.class.st ├── XMLHTTPWebClientRequest.class.st ├── XMLHTTPWebClientResponse.class.st ├── XMLHTTPWebClientResponseContentReader.class.st ├── XMLHTTPZincRequest.class.st ├── XMLHTTPZincResponse.class.st ├── XMLHTTPZincResponseContentReader.class.st ├── XMLIDAttributeValidator.class.st ├── XMLIDRefAttributeValidator.class.st ├── XMLIDRefsAttributeValidator.class.st ├── XMLImplicitEncodingDetector.class.st ├── XMLImplicitUTF16BigEndianStreamConverter.class.st ├── XMLImplicitUTF16LittleEndianStreamConverter.class.st ├── XMLImplicitUTF32BigEndianStreamConverter.class.st ├── XMLImplicitUTF32LittleEndianStreamConverter.class.st ├── XMLImplicitUTF8StreamConverter.class.st ├── XMLIntegerReader.class.st ├── XMLInternalSubsetList.class.st ├── XMLInternalSubsetState.class.st ├── XMLKeyValueCache.class.st ├── XMLLatin1StreamConverter.class.st ├── XMLLazyAttributeDictionary.class.st ├── XMLLazyNamespacedAttributeDictionary.class.st ├── XMLLimitException.class.st ├── XMLLimitedReadStreamAdapter.class.st ├── XMLMixedContentElementValidator.class.st ├── XMLMutatingNodeVisitor.class.st ├── XMLNFAAcceptingState.class.st ├── XMLNFABranchingState.class.st ├── XMLNFABuilder.class.st ├── XMLNFAFragment.class.st ├── XMLNFAMatchingState.class.st ├── XMLNFAState.class.st ├── XMLNFAStateSet.class.st ├── XMLNamespaceException.class.st ├── XMLNamespaceScope.class.st ├── XMLNamespaceScopeAllocator.class.st ├── XMLNamespacedAttributeDictionary.class.st ├── XMLNestedStreamReader.class.st ├── XMLNmtokenAttributeValidator.class.st ├── XMLNmtokensAttributeValidator.class.st ├── XMLNode.class.st ├── XMLNodeContentWriteStreamAdapter.class.st ├── XMLNodeFactory.class.st ├── XMLNodeList.class.st ├── XMLNodeVisitor.class.st ├── XMLNodeWithChildren.class.st ├── XMLNodeWithElements.class.st ├── XMLNotationDeclaration.class.st ├── XMLNotationEnumerationAttributeValidator.class.st ├── XMLNullReadStream.class.st ├── XMLNullStreamConverter.class.st ├── XMLObservableList.class.st ├── XMLOrderedList.class.st ├── XMLPI.class.st ├── XMLParameterEntityDeclaration.class.st ├── XMLParser.class.st ├── XMLParserDriver.class.st ├── XMLParserException.class.st ├── XMLParserLimits.class.st ├── XMLParserTokenizer.class.st ├── XMLParsingInterruptException.class.st ├── XMLPercentDecodingReadStreamAdapter.class.st ├── XMLPercentEncodingWriteStreamAdapter.class.st ├── XMLPharoFileReferenceReadStreamFactory.class.st ├── XMLPharoFileReferenceWriteStreamFactory.class.st ├── XMLPluggableAttributeSpec.class.st ├── XMLPluggableElementFactory.class.st ├── XMLPluggableNodeFactory.class.st ├── XMLPostDoctypeDeclarationState.class.st ├── XMLPrologState.class.st ├── XMLPushedBackEntity.class.st ├── XMLPushedBackExternalStream.class.st ├── XMLPushedBackGeneralEntity.class.st ├── XMLPushedBackInternalStream.class.st ├── XMLPushedBackParameterEntity.class.st ├── XMLPushedBackStream.class.st ├── XMLReadStreamAdapter.class.st ├── XMLReentrantMutex.class.st ├── XMLSingleCharacterReadStream.class.st ├── XMLSmallIntegerReader.class.st ├── XMLStandaloneExternalAttributeFixedValueDefaultValidator.class.st ├── XMLStandaloneExternalAttributeValueDefaultValidator.class.st ├── XMLStandaloneExternalCDataAttributeValidator.class.st ├── XMLStandaloneExternalDFAElementContentElementValidator.class.st ├── XMLStandaloneExternalEntitiesAttributeValidator.class.st ├── XMLStandaloneExternalEntityAttributeValidator.class.st ├── XMLStandaloneExternalEnumerationAttributeValidator.class.st ├── XMLStandaloneExternalIDAttributeValidator.class.st ├── XMLStandaloneExternalIDRefAttributeValidator.class.st ├── XMLStandaloneExternalIDRefsAttributeValidator.class.st ├── XMLStandaloneExternalNmtokenAttributeValidator.class.st ├── XMLStandaloneExternalNmtokensAttributeValidator.class.st ├── XMLStandaloneExternalNotationEnumerationAttributeValidator.class.st ├── XMLStandaloneExternalXMLIDAttributeValidator.class.st ├── XMLStandardFileStreamReadStreamFactory.class.st ├── XMLStandardFileStreamWriteStreamFactory.class.st ├── XMLStandardKeyValueCache.class.st ├── XMLStandardReentrantMutex.class.st ├── XMLStatelessStreamConverter.class.st ├── XMLStreamAdapter.class.st ├── XMLStreamConverter.class.st ├── XMLString.class.st ├── XMLStringReadStreamAdapter.class.st ├── XMLStringWriteStreamAdapter.class.st ├── XMLTerminatedState.class.st ├── XMLTokenizerState.class.st ├── XMLURI.class.st ├── XMLURIParser.class.st ├── XMLUTF16BigEndianStreamConverter.class.st ├── XMLUTF16LittleEndianStreamConverter.class.st ├── XMLUTF16StreamConverter.class.st ├── XMLUTF32BigEndianStreamConverter.class.st ├── XMLUTF32LittleEndianStreamConverter.class.st ├── XMLUTF32StreamConverter.class.st ├── XMLUTF8StreamConverter.class.st ├── XMLUTFStreamConverter.class.st ├── XMLUninitializedState.class.st ├── XMLUnparsedEntityValidator.class.st ├── XMLValidatingNodeVisitor.class.st ├── XMLValidationException.class.st ├── XMLWellFormedParserTokenizer.class.st ├── XMLWellFormednessException.class.st ├── XMLWriteStreamAdapter.class.st ├── XMLXMLDeclarationState.class.st ├── XMLXMLIDAttributeValidator.class.st ├── XMLZincByteEncoderStreamConverter.class.st └── package.st /.ci.ston: -------------------------------------------------------------------------------- 1 | SmalltalkCISpec { 2 | #loading : [ 3 | SCIMetacelloLoadSpec { 4 | #baseline : 'XMLParser', 5 | #directory : 'src', 6 | #load : [ 'Tests' ], 7 | #platforms : [ #pharo ] 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: [ push, pull_request, workflow_dispatch ] 4 | 5 | jobs: 6 | test: 7 | strategy: 8 | # Default value means that a failure in one OS cancels all jobs 9 | fail-fast: false 10 | matrix: 11 | smalltalk: [ Pharo64-9.0, Pharo64-10, Pharo64-11, Pharo64-12, Pharo64-13 ] 12 | os: [ ubuntu-latest, windows-latest ] # macos-latest 13 | ston: [ .ci.ston ] 14 | runs-on: ${{ matrix.os }} 15 | name: ${{ matrix.smalltalk }} on ${{ matrix.os }} 16 | steps: 17 | - uses: actions/checkout@v3 18 | - name: Setup smalltalkCI 19 | uses: hpi-swa/setup-smalltalkCI@v1 20 | with: 21 | smalltalk-image: ${{ matrix.smalltalk }} 22 | - name: "Download Pharo, load code and run SUnit tests" 23 | run: smalltalkci -s ${{ matrix.smalltalk }} ${{ matrix.ston }} 24 | shell: bash 25 | #timeout-minutes: 10 26 | #env: 27 | # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | { 2 | 'srcDirectory' : 'src', 3 | 'tags' : [ #'XML' ] 4 | } 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 pharo-contributions 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /doc/images/screen001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pharo-contributions/XML-XMLParser/26a888381174c154b02e908f27d9d5eead3d04ec/doc/images/screen001.png -------------------------------------------------------------------------------- /src/.properties: -------------------------------------------------------------------------------- 1 | { 2 | #format : #tonel 3 | } -------------------------------------------------------------------------------- /src/BaselineOfXMLParser/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : #BaselineOfXMLParser } 2 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/GLMXMLDisabledRubricHighlightedTextPresentation.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A disabled version of the superclass. 3 | " 4 | Class { 5 | #name : #GLMXMLDisabledRubricHighlightedTextPresentation, 6 | #superclass : #GLMRubricHighlightedTextPresentation, 7 | #category : #'XML-Parser-GTExtensions-Highlighting-Parser' 8 | } 9 | 10 | { #category : #accessing } 11 | GLMXMLDisabledRubricHighlightedTextPresentation >> acceptsSelection [ 12 | ^ false 13 | ] 14 | 15 | { #category : #rendering } 16 | GLMXMLDisabledRubricHighlightedTextPresentation >> renderGlamorouslyOn: aRenderer [ 17 | | result oldBackgroundColor | 18 | 19 | result := (super renderGlamorouslyOn: aRenderer). 20 | oldBackgroundColor := result backgroundColor. 21 | "make it read-only, and also change the background to imply it's disabled" 22 | ^ result 23 | beReadOnly; 24 | backgroundColor: 25 | (oldBackgroundColor brightness < 0.5 26 | ifTrue: [oldBackgroundColor lighter] 27 | ifFalse: [oldBackgroundColor darker]); 28 | yourself. 29 | ] 30 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/XMLAttribute.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #XMLAttribute } 2 | 3 | { #category : #'*XML-Parser-GTExtensions' } 4 | XMLAttribute >> removeFromParent [ 5 | self parent removeAttributeNode: self 6 | ] 7 | 8 | { #category : #'*XML-Parser-GTExtensions' } 9 | XMLAttribute >> supportsSourceEditing [ 10 | ^ false 11 | ] 12 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/XMLAttributeList.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #XMLAttributeList } 2 | 3 | { #category : #'*XML-Parser-GTExtensions' } 4 | XMLAttributeList >> gtInspectorItemsIn: aComposite [ 5 | ^ self 6 | addOrderedListTableToComposite: aComposite 7 | paneTitle: 'Attributes' 8 | columnTitle: 'Attribute' 9 | ] 10 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/XMLDeclarationNode.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #XMLDeclarationNode } 2 | 3 | { #category : #'*XML-Parser-GTExtensions' } 4 | XMLDeclarationNode >> supportsSourceEditing [ 5 | ^ false 6 | ] 7 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/XMLDoctypeDeclaration.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #XMLDoctypeDeclaration } 2 | 3 | { #category : #'*XML-Parser-GTExtensions' } 4 | XMLDoctypeDeclaration >> removeFromParent [ 5 | self parent doctypeDeclaration: nil 6 | ] 7 | 8 | { #category : #'*XML-Parser-GTExtensions' } 9 | XMLDoctypeDeclaration >> supportsSourceEditing [ 10 | ^ false 11 | ] 12 | 13 | { #category : #'*XML-Parser-GTExtensions' } 14 | XMLDoctypeDeclaration >> writeTreeViewLabelXMLOn: aWriter [ 15 | aWriter doctype 16 | root: self root; 17 | publicID: self publicID; 18 | systemID: self systemID; 19 | write 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/XMLHighlight.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class stores a highlight TextColor and 1-based start/end highlight positions. 3 | " 4 | Class { 5 | #name : #XMLHighlight, 6 | #superclass : #Object, 7 | #instVars : [ 8 | 'color', 9 | 'start', 10 | 'end' 11 | ], 12 | #category : #'XML-Parser-GTExtensions-Highlighting' 13 | } 14 | 15 | { #category : #highlighting } 16 | XMLHighlight >> applyToText: aText [ 17 | | attributeStart attributeEnd | 18 | 19 | "must be bounded between 1 and aText size to avoid errors if the text 20 | being highlighted was truncated by printString/asString" 21 | attributeStart := (self start ifNil: [1]) max: 1. 22 | attributeEnd := (self end ifNil: [aText size]) min: aText size. 23 | attributeStart <= attributeEnd 24 | ifTrue: [ 25 | aText 26 | addAttribute: self color 27 | from: attributeStart 28 | to: attributeEnd]. 29 | ] 30 | 31 | { #category : #accessing } 32 | XMLHighlight >> color [ 33 | ^ color 34 | ] 35 | 36 | { #category : #accessing } 37 | XMLHighlight >> color: aTextColor [ 38 | color := aTextColor 39 | ] 40 | 41 | { #category : #accessing } 42 | XMLHighlight >> end [ 43 | ^ end 44 | ] 45 | 46 | { #category : #accessing } 47 | XMLHighlight >> end: anEndPosition [ 48 | end := anEndPosition 49 | ] 50 | 51 | { #category : #accessing } 52 | XMLHighlight >> start [ 53 | ^ start 54 | ] 55 | 56 | { #category : #accessing } 57 | XMLHighlight >> start: aStartPosition [ 58 | start := aStartPosition 59 | ] 60 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/XMLInternalSubsetList.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #XMLInternalSubsetList } 2 | 3 | { #category : #'*XML-Parser-GTExtensions' } 4 | XMLInternalSubsetList >> gtInspectorItemsIn: aComposite [ 5 | ^ self 6 | addOrderedListTableToComposite: aComposite 7 | paneTitle: 'Nodes' 8 | columnTitle: 'Node' 9 | ] 10 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/XMLLazyAttributeDictionary.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #XMLLazyAttributeDictionary } 2 | 3 | { #category : #'*XML-Parser-GTExtensions' } 4 | XMLLazyAttributeDictionary >> gtInspectorItemsIn: aComposite [ 5 | attributeDictionary gtInspectorItemsIn: aComposite 6 | ] 7 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/XMLNFAState.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #XMLNFAState } 2 | 3 | { #category : #'*XML-Parser-GTExtensions' } 4 | XMLNFAState >> gtInspectorTreeIn: aComposite [ 5 | 6 | 7 | aComposite tree 8 | title: 'Tree'; 9 | display: [{self}]; 10 | children: [:each | each treeViewChildren]; 11 | format: [:each | each treeViewLabelText]; 12 | when: [self supportsTreeView]; 13 | "these two features need to be disabled, because we're modeling a 14 | cyclic directed graph as a tree, and the tree presentation will 15 | loop in #pathIn: otherwise" 16 | shouldValidate: false; 17 | allowsRecursiveSearch: false; 18 | rootsExpanded 19 | ] 20 | 21 | { #category : #'*XML-Parser-GTExtensions' } 22 | XMLNFAState >> supportsTreeView [ 23 | self nextStatesDo: [:each | 24 | ^ true]. 25 | ^ false. 26 | ] 27 | 28 | { #category : #'*XML-Parser-GTExtensions' } 29 | XMLNFAState >> treeViewChildren [ 30 | | nextStates | 31 | 32 | nextStates := #(). 33 | self nextStatesDo: [:each | 34 | nextStates := nextStates copyWith: each]. 35 | ^ nextStates. 36 | ] 37 | 38 | { #category : #'*XML-Parser-GTExtensions' } 39 | XMLNFAState >> treeViewLabelText [ 40 | ^ (String streamContents: [:stream | 41 | stream 42 | nextPutAll: self class name asString; 43 | nextPut: $(. 44 | self printLabelOn: stream. 45 | stream nextPut: $)]) asText 46 | ] 47 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/XMLNodeList.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #XMLNodeList } 2 | 3 | { #category : #'*XML-Parser-GTExtensions' } 4 | XMLNodeList >> gtInspectorItemsIn: aComposite [ 5 | ^ self 6 | addOrderedListTableToComposite: aComposite 7 | paneTitle: 'Nodes' 8 | columnTitle: 'Node' 9 | ] 10 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/XMLNodeWithChildren.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #XMLNodeWithChildren } 2 | 3 | { #category : #'*XML-Parser-GTExtensions' } 4 | XMLNodeWithChildren >> addTreeViewChildrenTo: anOrderedCollection [ 5 | self nodesDo: [:each | 6 | anOrderedCollection addLast: each] 7 | ] 8 | 9 | { #category : #'*XML-Parser-GTExtensions' } 10 | XMLNodeWithChildren >> supportsTreeView [ 11 | ^ self hasChildren 12 | ] 13 | 14 | { #category : #'*XML-Parser-GTExtensions' } 15 | XMLNodeWithChildren >> treeViewChildren [ 16 | self supportsTreeView 17 | ifTrue: [| treeViewChildren | 18 | treeViewChildren := OrderedCollection new: self nodes size. 19 | self addTreeViewChildrenTo: treeViewChildren. 20 | ^ treeViewChildren] 21 | ifFalse: [^ #()] 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-GTExtensions/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : #'XML-Parser-GTExtensions' } 2 | -------------------------------------------------------------------------------- /src/XML-Parser-GemstoneCompatibility/Collection.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #Collection } 2 | 3 | { #category : #'*XML-Parser-GemstoneCompatibility' } 4 | Collection >> capacity [ 5 | ^ self size 6 | ] 7 | -------------------------------------------------------------------------------- /src/XML-Parser-GemstoneCompatibility/GsFile.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #GsFile } 2 | 3 | { #category : #'*XML-Parser-GemstoneCompatibility' } 4 | GsFile >> isStream [ 5 | "needed so #parse: and similar messages can accept GsFile arguments" 6 | ^ true 7 | ] 8 | 9 | { #category : #'*XML-Parser-GemstoneCompatibility' } 10 | GsFile >> isXMLBinaryOrExternalStream [ 11 | ^ self isExternal 12 | ] 13 | 14 | { #category : #'*XML-Parser-GemstoneCompatibility' } 15 | GsFile >> upToEnd [ 16 | "needed for compatibility with XMLReadStreamAdapter 17 | (GsFile>>#contents works like #upToEnd, so this is OK)" 18 | ^ self contents 19 | ] 20 | -------------------------------------------------------------------------------- /src/XML-Parser-GemstoneCompatibility/PositionableStream.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : #PositionableStream } 2 | 3 | { #category : #'*XML-Parser-GemstoneCompatibility' } 4 | PositionableStream >> isBinary [ 5 | "needed for GZipReadStream and Zinc" 6 | ^ self _collection isKindOf: ByteArray 7 | ] 8 | 9 | { #category : #'*XML-Parser-GemstoneCompatibility' } 10 | PositionableStream >> isXMLBinaryOrExternalStream [ 11 | "some GS PositionableStream subclasses (like AnsiReadStream) override 12 | #isBinary to only treat ByteArray (not its subclasses) streams as 13 | binary, so we replace the #isBinary-based superclass version with this one, 14 | which skips #isBinary and sends #isKindOf: to catch ByteArray subclasses 15 | like Utf8" 16 | ^ self _collection isKindOf: ByteArray 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-GemstoneCompatibility/XMLGsFileReadStreamFactory.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A GsFile read stream factory. This stream is preferred for Gemstone because it does no decoding and returns byte characters so XMLParser can do its own decoding. 3 | " 4 | Class { 5 | #name : #XMLGsFileReadStreamFactory, 6 | #superclass : #XMLFileReadStreamFactory, 7 | #category : #'XML-Parser-GemstoneCompatibility' 8 | } 9 | 10 | { #category : #'instance creation' } 11 | XMLGsFileReadStreamFactory class >> basicOnPath: aPathString [ 12 | ^ (XMLClassFinder classNamed: #GsFile) 13 | open: aPathString 14 | mode: 'rb' "binary to avoid CRLF<->LF conversions on Windows" 15 | onClient: false "use server files by default" 16 | ] 17 | 18 | { #category : #testing } 19 | XMLGsFileReadStreamFactory class >> isSupportedImplementation [ 20 | ^ XMLClassFinder hasClassNamed: #GsFile 21 | ] 22 | -------------------------------------------------------------------------------- /src/XML-Parser-GemstoneCompatibility/XMLGsFileWriteStreamFactory.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A GsFile write stream factory. This stream is preferred for Gemstone because it does no encoding and accepts byte characters so XMLParser can do its own encoding. 3 | " 4 | Class { 5 | #name : #XMLGsFileWriteStreamFactory, 6 | #superclass : #XMLFileWriteStreamFactory, 7 | #category : #'XML-Parser-GemstoneCompatibility' 8 | } 9 | 10 | { #category : #'instance creation' } 11 | XMLGsFileWriteStreamFactory class >> basicOnPath: aPathString [ 12 | ^ (XMLClassFinder classNamed: #GsFile) 13 | open: aPathString 14 | mode: 'wb' "binary to avoid CRLF<->LF conversions on Windows" 15 | onClient: false "use server files by default" 16 | ] 17 | 18 | { #category : #testing } 19 | XMLGsFileWriteStreamFactory class >> isSupportedImplementation [ 20 | ^ XMLClassFinder hasClassNamed: #GsFile 21 | ] 22 | -------------------------------------------------------------------------------- /src/XML-Parser-GemstoneCompatibility/XMLParserGemstoneCompatibility.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Used in development to copy String extension methods to CharacterCollection. 3 | " 4 | Class { 5 | #name : #XMLParserGemstoneCompatibility, 6 | #superclass : #Object, 7 | #category : #'XML-Parser-GemstoneCompatibility' 8 | } 9 | 10 | { #category : #private } 11 | XMLParserGemstoneCompatibility class >> copyXMLGSExtensionMethods [ 12 | " 13 | self copyXMLGSExtensionMethods 14 | " 15 | (String selectorsInProtocol: #'*XML-Parser') do: [:each | 16 | CharacterCollection 17 | compile: (String sourceCodeAt: each) 18 | classified: #'*XML-Parser-GemstoneCompatibility']. 19 | ] 20 | -------------------------------------------------------------------------------- /src/XML-Parser-GemstoneCompatibility/XMLTransientKeyValueCache.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class is a key-value cache implementation for Gemstone that uses a transient internal collection. 3 | " 4 | Class { 5 | #name : #XMLTransientKeyValueCache, 6 | #superclass : #XMLKeyValueCache, 7 | #category : #'XML-Parser-GemstoneCompatibility' 8 | } 9 | 10 | { #category : #testing } 11 | XMLTransientKeyValueCache class >> isSupportedImplementation [ 12 | ^ XMLReentrantMutex hasSupportedImplementation 13 | and: [XMLClassFinder hasClassNamed: #TransientValue] 14 | ] 15 | 16 | { #category : #accessing } 17 | XMLTransientKeyValueCache >> collection [ 18 | ^ collection value 19 | ifNil: [ 20 | collection 21 | value: self collectionClass new; 22 | value] 23 | ] 24 | 25 | { #category : #initialization } 26 | XMLTransientKeyValueCache >> setCollection: aKeyValueCollection [ 27 | collection := 28 | (XMLClassFinder classNamed: #TransientValue) value: 29 | aKeyValueCollection 30 | ] 31 | -------------------------------------------------------------------------------- /src/XML-Parser-GemstoneCompatibility/XMLTransientReentrantMutex.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class is an implementation that uses Gemstone's TransientRecursionLock to implement a reentrant mutex. These are not persistent. 3 | " 4 | Class { 5 | #name : #XMLTransientReentrantMutex, 6 | #superclass : #XMLReentrantMutex, 7 | #instVars : [ 8 | 'transientRecursionLock' 9 | ], 10 | #category : #'XML-Parser-GemstoneCompatibility' 11 | } 12 | 13 | { #category : #testing } 14 | XMLTransientReentrantMutex class >> isSupportedImplementation [ 15 | ^ XMLClassFinder hasClassNamed: #TransientRecursionLock 16 | ] 17 | 18 | { #category : #'mutual exclusion' } 19 | XMLTransientReentrantMutex >> critical: aBlock [ 20 | ^ transientRecursionLock critical: aBlock 21 | ] 22 | 23 | { #category : #initialization } 24 | XMLTransientReentrantMutex >> initialize [ 25 | super initialize. 26 | 27 | transientRecursionLock := 28 | (XMLClassFinder classNamed: #TransientRecursionLock) new. 29 | ] 30 | -------------------------------------------------------------------------------- /src/XML-Parser-GemstoneCompatibility/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : #'XML-Parser-GemstoneCompatibility' } 2 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests-Conformance/XMLConformanceCanonicalWriterFormatter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A formatter for the XML Conformance test suite canonical XML format, which is different from the standard canonical XML format. 3 | " 4 | Class { 5 | #name : #XMLConformanceCanonicalWriterFormatter, 6 | #superclass : #XMLWriterFormatter, 7 | #category : #'XML-Parser-Tests-Conformance-Writer' 8 | } 9 | 10 | { #category : #formatting } 11 | XMLConformanceCanonicalWriterFormatter >> formatAfterDeclaration: aDeclarationWriter [ 12 | self writeLineBreak 13 | ] 14 | 15 | { #category : #formatting } 16 | XMLConformanceCanonicalWriterFormatter >> formatAfterDoctypeDeclaration: aDoctypeDeclaration [ 17 | self writeLineBreak 18 | ] 19 | 20 | { #category : #formatting } 21 | XMLConformanceCanonicalWriterFormatter >> formatBeforeInternalSubset: aDoctypeDeclarationWriter [ 22 | self writeLineBreak 23 | ] 24 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests-Conformance/XMLConformanceDoctypeDeclarationWriter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A doctype writer for the XML Conformance test suite canonical XML format that is not omittable, unlike doctypes in regular canonical XML. 3 | " 4 | Class { 5 | #name : #XMLConformanceDoctypeDeclarationWriter, 6 | #superclass : #XMLDoctypeDeclarationWriter, 7 | #category : #'XML-Parser-Tests-Conformance-Writer' 8 | } 9 | 10 | { #category : #testing } 11 | XMLConformanceDoctypeDeclarationWriter >> isExternalIDOmittable [ 12 | "unlike standard canonical XML, doctype external IDs are always omittable 13 | for conformance canonical XML" 14 | ^ self isCanonical 15 | ] 16 | 17 | { #category : #testing } 18 | XMLConformanceDoctypeDeclarationWriter >> isOmittable [ 19 | "unlike standard canonical XML, doctypes are never omittable 20 | for conformance canonical XML" 21 | ^ false 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests-Conformance/XMLConformanceNotationDeclarationWriter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A notation declaration writer for the XML Conformance test suite canonical XML format that is not omittable, unlike notation declarations in regular canonical XML. 3 | " 4 | Class { 5 | #name : #XMLConformanceNotationDeclarationWriter, 6 | #superclass : #XMLNotationDeclarationWriter, 7 | #category : #'XML-Parser-Tests-Conformance-Writer' 8 | } 9 | 10 | { #category : #testing } 11 | XMLConformanceNotationDeclarationWriter >> isOmittable [ 12 | "unlike standard canonical XML, notation declarations are never omittable 13 | for conformance canonical XML" 14 | ^ false 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests-Conformance/XMLConformancePIWriter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A PI writer for the XML Conformance test suite canonical XML format that always outputs a space after the target, even if the data is empty, unlike the regular PI writer. 3 | " 4 | Class { 5 | #name : #XMLConformancePIWriter, 6 | #superclass : #XMLPIWriter, 7 | #category : #'XML-Parser-Tests-Conformance-Writer' 8 | } 9 | 10 | { #category : #testing } 11 | XMLConformancePIWriter >> isDataOmittable [ 12 | "unlike standard canonical XML, PI data is never omittable 13 | for conformance canonical XML" 14 | ^ self isCanonical not 15 | and: [self hasData not] 16 | ] 17 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests-Conformance/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : #'XML-Parser-Tests-Conformance' } 2 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/DTDCachingExternalEntityResolverLimitingTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'DTDCachingExternalEntityResolverLimitingTest', 3 | #superclass : 'DTDCachingExternalEntityResolverTest', 4 | #category : 'XML-Parser-Tests-DTD', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'DTD' 7 | } 8 | 9 | { #category : 'testing' } 10 | DTDCachingExternalEntityResolverLimitingTest >> isTestingLimiting [ 11 | ^ true 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/DTDCachingExternalEntityResolverTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'DTDCachingExternalEntityResolverTest', 3 | #superclass : 'DTDExternalEntityResolverTest', 4 | #category : 'XML-Parser-Tests-DTD', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'DTD' 7 | } 8 | 9 | { #category : 'accessing' } 10 | DTDCachingExternalEntityResolverTest >> resolverClass [ 11 | ^ DTDCachingExternalEntityResolver 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/DTDExternalEntityResolverLimitingTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'DTDExternalEntityResolverLimitingTest', 3 | #superclass : 'DTDExternalEntityResolverTest', 4 | #category : 'XML-Parser-Tests-DTD', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'DTD' 7 | } 8 | 9 | { #category : 'testing' } 10 | DTDExternalEntityResolverLimitingTest >> isTestingLimiting [ 11 | ^ true 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/DTDStaticExternalEntityResolverLimitingTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'DTDStaticExternalEntityResolverLimitingTest', 3 | #superclass : 'DTDStaticExternalEntityResolverTest', 4 | #category : 'XML-Parser-Tests-DTD', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'DTD' 7 | } 8 | 9 | { #category : 'testing' } 10 | DTDStaticExternalEntityResolverLimitingTest >> isTestingLimiting [ 11 | ^ true 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HAuthorElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HAuthorElementHandler', 6 | #superclass : 'SAX2ElementCharacterHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAX2HAuthorElementHandler >> endElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName [ 14 | self parser parsingResult last addAuthor: self characters 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HBookElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HBookElementHandler', 6 | #superclass : 'SAX2ElementHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAX2HBookElementHandler >> startElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName attributes: anAttributeDictionary [ 14 | self parser parsingResult addLast: SAX2SampleBook new 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HBooksElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HBooksElementHandler', 6 | #superclass : 'SAX2ElementHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAX2HBooksElementHandler >> startElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName attributes: anAttributeDictionary [ 14 | self parser parsingResult: OrderedCollection new 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HContactsElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HContactsElementHandler', 6 | #superclass : 'SAX2ElementHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HDateOfBirthElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HDateOfBirthElementHandler', 6 | #superclass : 'SAX2ElementCharacterHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAX2HDateOfBirthElementHandler >> endElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName [ 14 | self parser parsingResult dateOfBirth: 15 | (Date readFrom: self characters readStream) 16 | ] 17 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HEmailElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HEmailElementHandler', 6 | #superclass : 'SAX2ElementHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAX2HEmailElementHandler >> startElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName attributes: anAttributeDictionary [ 14 | self parser parsingResult addEmailAddress: (anAttributeDictionary at: 'address') 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HISBNElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HISBNElementHandler', 6 | #superclass : 'SAX2ElementCharacterHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAX2HISBNElementHandler >> endElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName [ 14 | self parser parsingResult last isbn: self characters 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HNameElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HNameElementHandler', 6 | #superclass : 'SAX2ElementCharacterHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAX2HNameElementHandler >> endElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName [ 14 | self parser parsingResult name: self characters 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HPersonElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HPersonElementHandler', 6 | #superclass : 'SAX2ElementHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAX2HPersonElementHandler >> startElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName attributes: anAttributeDictionary [ 14 | self parser parsingResult: SAX2SamplePerson new 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HResidenceElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HResidenceElementHandler', 6 | #superclass : 'SAX2ElementCharacterHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAX2HResidenceElementHandler >> endElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName [ 14 | self parser parsingResult residence: self characters 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2HTitleElementHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Handler for the sample element. 3 | " 4 | Class { 5 | #name : 'SAX2HTitleElementHandler', 6 | #superclass : 'SAX2ElementCharacterHandler', 7 | #category : 'XML-Parser-Tests-ElementHandlers', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'ElementHandlers' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAX2HTitleElementHandler >> endElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName [ 14 | self parser parsingResult last title: self characters 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAX2SampleBook.class.st: -------------------------------------------------------------------------------- 1 | " 2 | The sample book object parsed by the SAX2ElementParser. 3 | " 4 | Class { 5 | #name : 'SAX2SampleBook', 6 | #superclass : 'Object', 7 | #instVars : [ 8 | 'title', 9 | 'isbn', 10 | 'authors' 11 | ], 12 | #category : 'XML-Parser-Tests-ElementHandlers', 13 | #package : 'XML-Parser-Tests', 14 | #tag : 'ElementHandlers' 15 | } 16 | 17 | { #category : 'adding' } 18 | SAX2SampleBook >> addAuthor: aString [ 19 | ^ self authors addLast: aString 20 | ] 21 | 22 | { #category : 'accessing' } 23 | SAX2SampleBook >> authors [ 24 | ^ authors 25 | ] 26 | 27 | { #category : 'initialization' } 28 | SAX2SampleBook >> initialize [ 29 | super initialize. 30 | 31 | title := ''. 32 | isbn := ''. 33 | authors := OrderedCollection new 34 | ] 35 | 36 | { #category : 'accessing' } 37 | SAX2SampleBook >> isbn [ 38 | ^ isbn 39 | ] 40 | 41 | { #category : 'accessing' } 42 | SAX2SampleBook >> isbn: aString [ 43 | isbn := aString 44 | ] 45 | 46 | { #category : 'accessing' } 47 | SAX2SampleBook >> title [ 48 | ^ title 49 | ] 50 | 51 | { #category : 'accessing' } 52 | SAX2SampleBook >> title: aString [ 53 | title := aString 54 | ] 55 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAXRecordingPrefixURIHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class records the second element events (#startElement:prefix:uri:attributes: and #endElement:prefix:uri:) used when the first aren't defined. 3 | " 4 | Class { 5 | #name : 'SAXRecordingPrefixURIHandler', 6 | #superclass : 'SAXRecordingHandler', 7 | #category : 'XML-Parser-Tests-Base', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'Base' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAXRecordingPrefixURIHandler >> endElement: aQualifiedName prefix: aPrefix uri: aURI [ 14 | self 15 | recordMessageReceiver: self 16 | selector: #endElement:prefix:uri: 17 | arguments: 18 | (OrderedCollection new 19 | addLast: aQualifiedName; 20 | addLast: aPrefix; 21 | addLast: aURI; 22 | yourself) 23 | ] 24 | 25 | { #category : 'handling - content' } 26 | SAXRecordingPrefixURIHandler >> startElement: aQualifiedName prefix: aPrefix uri: aURI attributes: anAttributeDictionary [ 27 | self 28 | recordMessageReceiver: self 29 | selector: #startElement:prefix:uri:attributes: 30 | arguments: 31 | (OrderedCollection new 32 | addLast: aQualifiedName; 33 | addLast: aPrefix; 34 | addLast: aURI; 35 | addLast: anAttributeDictionary; 36 | yourself) 37 | ] 38 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/SAXRecordingPrefixURILocalNameHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class records the first element events (#startElement:prefix:uri:attributes:localName: and #endElement:prefix:uri:localName:) sent before the others. 3 | " 4 | Class { 5 | #name : 'SAXRecordingPrefixURILocalNameHandler', 6 | #superclass : 'SAXRecordingPrefixURIHandler', 7 | #category : 'XML-Parser-Tests-Base', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'Base' 10 | } 11 | 12 | { #category : 'handling - content' } 13 | SAXRecordingPrefixURILocalNameHandler >> endElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName [ 14 | self 15 | recordMessageReceiver: self 16 | selector: #endElement:prefix:uri:localName: 17 | arguments: 18 | (OrderedCollection new 19 | addLast: aQualifiedName; 20 | addLast: aPrefix; 21 | addLast: aURI; 22 | addLast: aLocalName; 23 | yourself) 24 | ] 25 | 26 | { #category : 'handling - content' } 27 | SAXRecordingPrefixURILocalNameHandler >> startElement: aQualifiedName prefix: aPrefix uri: aURI localName: aLocalName attributes: anAttributeDictionary [ 28 | self 29 | recordMessageReceiver: self 30 | selector: #startElement:prefix:uri:localName:attributes: 31 | arguments: 32 | (OrderedCollection new 33 | addLast: aQualifiedName; 34 | addLast: aPrefix; 35 | addLast: aURI; 36 | addLast: aLocalName; 37 | addLast: anAttributeDictionary; 38 | yourself) 39 | ] 40 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLASCIIStreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLASCIIStreamConverterTest', 3 | #superclass : 'XMLStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLASCIIStreamConverterTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLASCIIStreamConverterTest >> primaryEncodingName [ 16 | ^ 'ASCII' 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLASCIIStreamConverterTest >> streamConverterClass [ 21 | ^ XMLASCIIStreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLAttributeSpecTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLAttributeSpecTest', 3 | #superclass : 'TestCase', 4 | #category : 'XML-Parser-Tests-Utils', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Utils' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLAttributeSpecTest class >> shouldInheritSelectors [ 11 | ^ true 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLAttributeSpecTest >> attributeSpecClass [ 16 | ^ XMLAttributeSpec 17 | ] 18 | 19 | { #category : 'instance creation' } 20 | XMLAttributeSpecTest >> newAttributeSpec [ 21 | ^ self attributeSpecClass new 22 | ] 23 | 24 | { #category : 'tests' } 25 | XMLAttributeSpecTest >> testAsXMLAttributeSpec [ 26 | 27 | | attributeSpec | 28 | attributeSpec := self newAttributeSpec. 29 | self 30 | assert: attributeSpec asXMLAttributeSpec 31 | identicalTo: attributeSpec 32 | ] 33 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLCachingAttributeListTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLCachingAttributeListTest', 3 | #superclass : 'XMLAttributeListTest', 4 | #category : 'XML-Parser-Tests-DOM', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'DOM' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLCachingAttributeListTest >> listClass [ 11 | ^ XMLCachingAttributeList 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLCachingAttributeListTest >> listCopyClass [ 16 | ^ XMLAttributeList 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLCachingNodeListTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLCachingNodeListTest', 3 | #superclass : 'XMLNodeListTest', 4 | #category : 'XML-Parser-Tests-DOM', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'DOM' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLCachingNodeListTest >> listClass [ 11 | ^ XMLCachingNodeList 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLCachingNodeListTest >> listCopyClass [ 16 | ^ XMLNodeList 17 | ] 18 | 19 | { #category : 'tests' } 20 | XMLCachingNodeListTest >> testSort [ 21 | 22 | | list cachedElements | 23 | super testSort. 24 | 25 | list := self listWithItems. 26 | cachedElements := list elements. 27 | list sort: self reverseSortBlock. 28 | self 29 | assert: list elements 30 | equals: (cachedElements sort: self reverseSortBlock) 31 | ] 32 | 33 | { #category : 'tests' } 34 | XMLCachingNodeListTest >> testSwapWith [ 35 | 36 | | list cachedElements start end | 37 | super testSwapWith. 38 | 39 | list := self listWithItems. 40 | cachedElements := list elements. 41 | start := 1. 42 | end := list size. 43 | [ start < end ] whileTrue: [ 44 | list swap: start with: end. 45 | start := start + 1. 46 | end := end - 1 ]. 47 | self assert: list elements equals: cachedElements reversed 48 | ] 49 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDeclarationNodeTest.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Abstract, do not run. 3 | " 4 | Class { 5 | #name : 'XMLDeclarationNodeTest', 6 | #superclass : 'XMLNodeTest', 7 | #category : 'XML-Parser-Tests-DOM', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLDeclarationNodeTest class >> isAbstract [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'accessing' } 18 | XMLDeclarationNodeTest >> nodeClass [ 19 | ^ XMLDeclarationNode 20 | ] 21 | 22 | { #category : 'tests' } 23 | XMLDeclarationNodeTest >> testIsDeclaration [ 24 | self assert: self newNode isDeclaration 25 | ] 26 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterASCIIStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterASCIIStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterASCIITest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterASCIIStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterASCIITest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterASCIITest', 3 | #superclass : 'XMLDecodingReadStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLDecodingReadStreamAdapterASCIITest >> basicInputCollection [ 11 | ^ self encodedASCIIBinary 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLDecodingReadStreamAdapterASCIITest >> basicInvalidInputCollections [ 16 | ^ (16r80 to: 16rFF) asArray collect: [:each | ByteArray with: each] 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLDecodingReadStreamAdapterASCIITest >> basicOutputCollection [ 21 | ^ self decodedASCIIString 22 | ] 23 | 24 | { #category : 'accessing' } 25 | XMLDecodingReadStreamAdapterASCIITest >> streamConverterClass [ 26 | ^ XMLASCIIStreamConverter 27 | ] 28 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterLatin1StringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterLatin1StringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterLatin1Test', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterLatin1StringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterLatin1Test.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterLatin1Test', 3 | #superclass : 'XMLDecodingReadStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLDecodingReadStreamAdapterLatin1Test >> basicInputCollection [ 11 | ^ self encodedLatin1Binary 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLDecodingReadStreamAdapterLatin1Test >> basicOutputCollection [ 16 | ^ self decodedLatin1String 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLDecodingReadStreamAdapterLatin1Test >> streamConverterClass [ 21 | ^ XMLLatin1StreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF16BEBOMStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF16BEBOMStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF16BEBOMTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF16BEBOMStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF16BEBOMTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF16BEBOMTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF16BETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF16BEBOMTest >> detectsBOMs [ 11 | ^ true 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF16BEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF16BEStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF16BETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF16BEStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF16BETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF16BETest', 3 | #superclass : 'XMLDecodingReadStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLDecodingReadStreamAdapterUTF16BETest >> basicInputCollection [ 11 | ^ self encodedUTF16BEBinary 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLDecodingReadStreamAdapterUTF16BETest >> basicInvalidInputCollections [ 16 | "code points greater than U+10FFFF can't be encoded using UTF-16, so 17 | they aren't tested for here" 18 | ^ #( 19 | #(16rDC 16r00 16rDC 16r00) "first illegal leading surrogate" 20 | #(16rDF 16rFF 16rDC 16r00) "last illegal leading surrogate" 21 | #(16rD8 16r00 16rD8 16r00) "first illegal trailing surrogate" 22 | #(16rD8 16r00 16rDB 16rFF) "last illegal trailing surrogate" 23 | #(16r00) "incomplete" 24 | #(16rFF) "incomplete" 25 | #(16rD8 16r00) "incomplete surrogate pair" 26 | #(16rD8 16r00 16rDC) "incomplete surrogate pair" 27 | ) collect: [:each | each asByteArray] 28 | ] 29 | 30 | { #category : 'accessing' } 31 | XMLDecodingReadStreamAdapterUTF16BETest >> basicOutputCollection [ 32 | ^ self decodedUTF16String 33 | ] 34 | 35 | { #category : 'accessing' } 36 | XMLDecodingReadStreamAdapterUTF16BETest >> streamConverterClass [ 37 | ^ XMLUTF16BigEndianStreamConverter 38 | ] 39 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF16LEBOMStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF16LEBOMStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF16LEBOMTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF16LEBOMStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF16LEBOMTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF16LEBOMTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF16LETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF16LEBOMTest >> detectsBOMs [ 11 | ^ true 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF16LEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF16LEStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF16LETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF16LEStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF16LETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF16LETest', 3 | #superclass : 'XMLDecodingReadStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLDecodingReadStreamAdapterUTF16LETest >> basicInputCollection [ 11 | ^ self encodedUTF16LEBinary 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLDecodingReadStreamAdapterUTF16LETest >> basicInvalidInputCollections [ 16 | "code points greater than U+10FFFF can't be encoded using UTF-16, so 17 | they aren't tested for here" 18 | ^ #( 19 | #(16r00 16rDC 16r00 16rDC) "first illegal leading surrogate" 20 | #(16rFF 16rDF 16r00 16rDC) "last illegal leading surrogate" 21 | #(16r00 16rD8 16r00 16rD8) "first illegal trailing surrogate" 22 | #(16r00 16rD8 16rFF 16rDB) "last illegal trailing surrogate" 23 | #(16r00) "incomplete" 24 | #(16rFF) "incomplete" 25 | #(16r00 16rD8) "incomplete surrogate pair" 26 | #(16r00 16rD8 16r00) "incomplete surrogate pair" 27 | ) collect: [:each | each asByteArray] 28 | ] 29 | 30 | { #category : 'accessing' } 31 | XMLDecodingReadStreamAdapterUTF16LETest >> basicOutputCollection [ 32 | ^ self decodedUTF16String 33 | ] 34 | 35 | { #category : 'accessing' } 36 | XMLDecodingReadStreamAdapterUTF16LETest >> streamConverterClass [ 37 | ^ XMLUTF16LittleEndianStreamConverter 38 | ] 39 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF32BEBOMStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF32BEBOMStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF32BEBOMTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF32BEBOMStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF32BEBOMTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF32BEBOMTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF32BETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF32BEBOMTest >> detectsBOMs [ 11 | ^ true 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF32BEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF32BEStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF32BETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF32BEStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF32BETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF32BETest', 3 | #superclass : 'XMLDecodingReadStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLDecodingReadStreamAdapterUTF32BETest >> basicInputCollection [ 11 | ^ self encodedUTF32BEBinary 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLDecodingReadStreamAdapterUTF32BETest >> basicInvalidInputCollections [ 16 | ^ #( 17 | #(16r00 16r00 16rD8 16r00) "first surrogate code point" 18 | #(16r00 16r00 16rDB 16rFF) "last surrogate code point" 19 | #(16r00 16r11 16r00 16r00) "greater than U+10FFFF" 20 | #(16r00) "incomplete" 21 | #(16rFF) "incomplete" 22 | #(16r00 16r00) "incomplete" 23 | #(16r00 16rFF) "incomplete" 24 | #(16r00 16r00 16r00) "incomplete" 25 | #(16r00 16r00 16rFF) "incomplete" 26 | ) collect: [:each | each asByteArray] 27 | ] 28 | 29 | { #category : 'accessing' } 30 | XMLDecodingReadStreamAdapterUTF32BETest >> basicOutputCollection [ 31 | ^ self decodedUTF32String 32 | ] 33 | 34 | { #category : 'accessing' } 35 | XMLDecodingReadStreamAdapterUTF32BETest >> streamConverterClass [ 36 | ^ XMLUTF32BigEndianStreamConverter 37 | ] 38 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF32LEBOMStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF32LEBOMStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF32LEBOMTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF32LEBOMStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF32LEBOMTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF32LEBOMTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF32LETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF32LEBOMTest >> detectsBOMs [ 11 | ^ true 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF32LEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF32LEStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF32LETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF32LEStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF32LETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF32LETest', 3 | #superclass : 'XMLDecodingReadStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLDecodingReadStreamAdapterUTF32LETest >> basicInputCollection [ 11 | ^ self encodedUTF32LEBinary 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLDecodingReadStreamAdapterUTF32LETest >> basicInvalidInputCollections [ 16 | ^ #( 17 | #(16r00 16rD8 16r00 16r00) "first surrogate code point" 18 | #(16rFF 16rDB 16r00 16r00) "last surrogate code point" 19 | #(16r00 16r00 16r11 16r00) "greater than U+10FFFF" 20 | #(16r01 16r00 16r00) "greater than U+10FFFF" 21 | #(16r00) "incomplete" 22 | #(16rFF) "incomplete" 23 | #(16r00 16r00) "incomplete" 24 | #(16rFF 16r00) "incomplete" 25 | #(16r00 16r00 16r00) "incomplete" 26 | #(16rFF 16r00 16r00) "incomplete" 27 | ) collect: [:each | each asByteArray] 28 | ] 29 | 30 | { #category : 'accessing' } 31 | XMLDecodingReadStreamAdapterUTF32LETest >> basicOutputCollection [ 32 | ^ self decodedUTF32String 33 | ] 34 | 35 | { #category : 'accessing' } 36 | XMLDecodingReadStreamAdapterUTF32LETest >> streamConverterClass [ 37 | ^ XMLUTF32LittleEndianStreamConverter 38 | ] 39 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF8BOMStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF8BOMStringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF8BOMTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF8BOMStringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF8BOMTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF8BOMTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF8Test', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF8BOMTest >> detectsBOMs [ 11 | ^ true 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDecodingReadStreamAdapterUTF8StringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDecodingReadStreamAdapterUTF8StringTest', 3 | #superclass : 'XMLDecodingReadStreamAdapterUTF8Test', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLDecodingReadStreamAdapterUTF8StringTest >> expectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDocumentWithCachingNodeList.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A class for testing documents that use XMLCachingNodeList instead of XMLNodeList. 3 | " 4 | Class { 5 | #name : 'XMLDocumentWithCachingNodeList', 6 | #superclass : 'XMLDocument', 7 | #category : 'XML-Parser-Tests-DOM', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'defaults' } 13 | XMLDocumentWithCachingNodeList >> nodeListClass [ 14 | ^ XMLCachingNodeList 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLDocumentWithCachingNodeListTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLDocumentWithCachingNodeListTest', 3 | #superclass : 'XMLDocumentTest', 4 | #category : 'XML-Parser-Tests-DOM', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'DOM' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLDocumentWithCachingNodeListTest >> elementClass [ 11 | ^ XMLElementWithCachingNodeList 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLDocumentWithCachingNodeListTest >> nodeClass [ 16 | ^ XMLDocumentWithCachingNodeList 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLDocumentWithCachingNodeListTest >> nodeListClass [ 21 | ^ XMLCachingNodeList 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLElementWithCachingNodeList.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A class for testing elements that use XMLCachingNodeList instead of XMLNodeList. 3 | " 4 | Class { 5 | #name : 'XMLElementWithCachingNodeList', 6 | #superclass : 'XMLElement', 7 | #category : 'XML-Parser-Tests-DOM', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'defaults' } 13 | XMLElementWithCachingNodeList >> nodeListClass [ 14 | ^ XMLCachingNodeList 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLElementWithCachingNodeListTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLElementWithCachingNodeListTest', 3 | #superclass : 'XMLElementTest', 4 | #category : 'XML-Parser-Tests-DOM', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'DOM' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLElementWithCachingNodeListTest >> elementClass [ 11 | ^ XMLElementWithCachingNodeList 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLElementWithCachingNodeListTest >> nodeClass [ 16 | ^ XMLElementWithCachingNodeList 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLElementWithCachingNodeListTest >> nodeListClass [ 21 | ^ XMLCachingNodeList 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLElementWithoutCachingAttributeList.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A class for testing elements that use XMLAttributeList instead of XMLCachingAttributeList. 3 | " 4 | Class { 5 | #name : 'XMLElementWithoutCachingAttributeList', 6 | #superclass : 'XMLElement', 7 | #category : 'XML-Parser-Tests-DOM', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'defaults' } 13 | XMLElementWithoutCachingAttributeList >> attributeListClass [ 14 | ^ XMLAttributeList 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLElementWithoutCachingAttributeListTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLElementWithoutCachingAttributeListTest', 3 | #superclass : 'XMLElementTest', 4 | #category : 'XML-Parser-Tests-DOM', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'DOM' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLElementWithoutCachingAttributeListTest >> attributeListClass [ 11 | ^ XMLAttributeList 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLElementWithoutCachingAttributeListTest >> elementClass [ 16 | ^ XMLElementWithoutCachingAttributeList 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLElementWithoutCachingAttributeListTest >> nodeClass [ 21 | ^ XMLElementWithoutCachingAttributeList 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingDetectorUTF16BEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingDetectorUTF16BEStringTest', 3 | #superclass : 'XMLEncodingDetectorUTF16BETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingDetectorUTF16BEStringTest >> detectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingDetectorUTF16BETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingDetectorUTF16BETest', 3 | #superclass : 'XMLEncodingDetectorTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingDetectorUTF16BETest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingDetectorUTF16BETest >> basicImplicitEncodedInputCollections [ 16 | ^ #( 17 | #(16r00 16r01) 18 | #(16r00 16r0F) 19 | #(16r00 16r7F) 20 | ) collect: [:each | each asByteArray] 21 | ] 22 | 23 | { #category : 'accessing' } 24 | XMLEncodingDetectorUTF16BETest >> explicitStreamConverterClass [ 25 | ^ XMLUTF16BigEndianStreamConverter 26 | ] 27 | 28 | { #category : 'accessing' } 29 | XMLEncodingDetectorUTF16BETest >> implicitStreamConverterClass [ 30 | ^ XMLImplicitUTF16BigEndianStreamConverter 31 | ] 32 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingDetectorUTF16LEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingDetectorUTF16LEStringTest', 3 | #superclass : 'XMLEncodingDetectorUTF16LETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingDetectorUTF16LEStringTest >> detectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingDetectorUTF16LETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingDetectorUTF16LETest', 3 | #superclass : 'XMLEncodingDetectorTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingDetectorUTF16LETest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingDetectorUTF16LETest >> basicImplicitEncodedInputCollections [ 16 | ^ #( 17 | #(16r01 16r00) 18 | #(16r0F 16r00) 19 | #(16r7F 16r00) 20 | ) collect: [:each | each asByteArray] 21 | ] 22 | 23 | { #category : 'accessing' } 24 | XMLEncodingDetectorUTF16LETest >> explicitStreamConverterClass [ 25 | ^ XMLUTF16LittleEndianStreamConverter 26 | ] 27 | 28 | { #category : 'accessing' } 29 | XMLEncodingDetectorUTF16LETest >> implicitStreamConverterClass [ 30 | ^ XMLImplicitUTF16LittleEndianStreamConverter 31 | ] 32 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingDetectorUTF32BEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingDetectorUTF32BEStringTest', 3 | #superclass : 'XMLEncodingDetectorUTF32BETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingDetectorUTF32BEStringTest >> detectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingDetectorUTF32BETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingDetectorUTF32BETest', 3 | #superclass : 'XMLEncodingDetectorTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingDetectorUTF32BETest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingDetectorUTF32BETest >> basicImplicitEncodedInputCollections [ 16 | ^ #( 17 | #(16r00 16r00 16r00 16r01) 18 | #(16r00 16r00 16r00 16r0F) 19 | #(16r00 16r00 16r00 16r7F) 20 | ) collect: [:each | each asByteArray] 21 | ] 22 | 23 | { #category : 'accessing' } 24 | XMLEncodingDetectorUTF32BETest >> explicitStreamConverterClass [ 25 | ^ XMLUTF32BigEndianStreamConverter 26 | ] 27 | 28 | { #category : 'accessing' } 29 | XMLEncodingDetectorUTF32BETest >> implicitStreamConverterClass [ 30 | ^ XMLImplicitUTF32BigEndianStreamConverter 31 | ] 32 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingDetectorUTF32LEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingDetectorUTF32LEStringTest', 3 | #superclass : 'XMLEncodingDetectorUTF32LETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingDetectorUTF32LEStringTest >> detectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingDetectorUTF32LETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingDetectorUTF32LETest', 3 | #superclass : 'XMLEncodingDetectorTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingDetectorUTF32LETest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingDetectorUTF32LETest >> basicImplicitEncodedInputCollections [ 16 | ^ #( 17 | #(16r01 16r00 16r00 16r00) 18 | #(16r0F 16r00 16r00 16r00) 19 | #(16r7F 16r00 16r00 16r00) 20 | ) collect: [:each | each asByteArray] 21 | ] 22 | 23 | { #category : 'accessing' } 24 | XMLEncodingDetectorUTF32LETest >> explicitStreamConverterClass [ 25 | ^ XMLUTF32LittleEndianStreamConverter 26 | ] 27 | 28 | { #category : 'accessing' } 29 | XMLEncodingDetectorUTF32LETest >> implicitStreamConverterClass [ 30 | ^ XMLImplicitUTF32LittleEndianStreamConverter 31 | ] 32 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingDetectorUTF8StringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingDetectorUTF8StringTest', 3 | #superclass : 'XMLEncodingDetectorUTF8Test', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingDetectorUTF8StringTest >> detectsBinaryInput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterASCIIStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterASCIIStringTest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterASCIITest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingWriteStreamAdapterASCIIStringTest >> expectsBinaryOutput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterASCIITest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterASCIITest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLEncodingWriteStreamAdapterASCIITest >> basicInputCollection [ 11 | ^ self decodedASCIIString 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingWriteStreamAdapterASCIITest >> basicInvalidInputCollections [ 16 | ^ self basicInvalidLatin1InputCollections, 17 | ((16r80 to: 16rFF) asArray collect: [:each | 18 | String with: each asCharacter]) 19 | ] 20 | 21 | { #category : 'accessing' } 22 | XMLEncodingWriteStreamAdapterASCIITest >> basicOutputCollection [ 23 | ^ self encodedASCIIBinary 24 | ] 25 | 26 | { #category : 'accessing' } 27 | XMLEncodingWriteStreamAdapterASCIITest >> streamConverterClass [ 28 | ^ XMLASCIIStreamConverter 29 | ] 30 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterLatin1StringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterLatin1StringTest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterLatin1Test', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingWriteStreamAdapterLatin1StringTest >> expectsBinaryOutput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterLatin1Test.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterLatin1Test', 3 | #superclass : 'XMLEncodingWriteStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLEncodingWriteStreamAdapterLatin1Test >> basicInputCollection [ 11 | ^ self decodedLatin1String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingWriteStreamAdapterLatin1Test >> basicInvalidInputCollections [ 16 | ^ self basicInvalidLatin1InputCollections 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLEncodingWriteStreamAdapterLatin1Test >> basicOutputCollection [ 21 | ^ self encodedLatin1Binary 22 | ] 23 | 24 | { #category : 'accessing' } 25 | XMLEncodingWriteStreamAdapterLatin1Test >> streamConverterClass [ 26 | ^ XMLLatin1StreamConverter 27 | ] 28 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterUTF16BEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterUTF16BEStringTest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterUTF16BETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingWriteStreamAdapterUTF16BEStringTest >> expectsBinaryOutput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterUTF16BETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterUTF16BETest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLEncodingWriteStreamAdapterUTF16BETest >> basicInputCollection [ 11 | ^ self decodedUTF16String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingWriteStreamAdapterUTF16BETest >> basicInvalidInputCollections [ 16 | ^ self basicInvalidUTFInputCollections 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLEncodingWriteStreamAdapterUTF16BETest >> basicOutputCollection [ 21 | ^ self encodedUTF16BEBinary 22 | ] 23 | 24 | { #category : 'accessing' } 25 | XMLEncodingWriteStreamAdapterUTF16BETest >> streamConverterClass [ 26 | ^ XMLUTF16BigEndianStreamConverter 27 | ] 28 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterUTF16LEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterUTF16LEStringTest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterUTF16LETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingWriteStreamAdapterUTF16LEStringTest >> expectsBinaryOutput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterUTF16LETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterUTF16LETest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLEncodingWriteStreamAdapterUTF16LETest >> basicInputCollection [ 11 | ^ self decodedUTF16String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingWriteStreamAdapterUTF16LETest >> basicInvalidInputCollections [ 16 | ^ self basicInvalidUTFInputCollections 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLEncodingWriteStreamAdapterUTF16LETest >> basicOutputCollection [ 21 | ^ self encodedUTF16LEBinary 22 | ] 23 | 24 | { #category : 'accessing' } 25 | XMLEncodingWriteStreamAdapterUTF16LETest >> streamConverterClass [ 26 | ^ XMLUTF16LittleEndianStreamConverter 27 | ] 28 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterUTF32BEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterUTF32BEStringTest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterUTF32BETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingWriteStreamAdapterUTF32BEStringTest >> expectsBinaryOutput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterUTF32BETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterUTF32BETest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLEncodingWriteStreamAdapterUTF32BETest >> basicInputCollection [ 11 | ^ self decodedUTF32String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingWriteStreamAdapterUTF32BETest >> basicInvalidInputCollections [ 16 | ^ self basicInvalidUTFInputCollections 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLEncodingWriteStreamAdapterUTF32BETest >> basicOutputCollection [ 21 | ^ self encodedUTF32BEBinary 22 | ] 23 | 24 | { #category : 'accessing' } 25 | XMLEncodingWriteStreamAdapterUTF32BETest >> streamConverterClass [ 26 | ^ XMLUTF32BigEndianStreamConverter 27 | ] 28 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterUTF32LEStringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterUTF32LEStringTest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterUTF32LETest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingWriteStreamAdapterUTF32LEStringTest >> expectsBinaryOutput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterUTF32LETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterUTF32LETest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLEncodingWriteStreamAdapterUTF32LETest >> basicInputCollection [ 11 | ^ self decodedUTF32String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingWriteStreamAdapterUTF32LETest >> basicInvalidInputCollections [ 16 | ^ self basicInvalidUTFInputCollections 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLEncodingWriteStreamAdapterUTF32LETest >> basicOutputCollection [ 21 | ^ self encodedUTF32LEBinary 22 | ] 23 | 24 | { #category : 'accessing' } 25 | XMLEncodingWriteStreamAdapterUTF32LETest >> streamConverterClass [ 26 | ^ XMLUTF32LittleEndianStreamConverter 27 | ] 28 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterUTF8StringTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterUTF8StringTest', 3 | #superclass : 'XMLEncodingWriteStreamAdapterUTF8Test', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLEncodingWriteStreamAdapterUTF8StringTest >> expectsBinaryOutput [ 11 | ^ false 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLEncodingWriteStreamAdapterUTF8Test.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLEncodingWriteStreamAdapterUTF8Test', 3 | #superclass : 'XMLEncodingWriteStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLEncodingWriteStreamAdapterUTF8Test >> basicInputCollection [ 11 | ^ self decodedUTF8String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLEncodingWriteStreamAdapterUTF8Test >> basicInvalidInputCollections [ 16 | ^ self basicInvalidUTFInputCollections 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLEncodingWriteStreamAdapterUTF8Test >> basicOutputCollection [ 21 | ^ self encodedUTF8Binary 22 | ] 23 | 24 | { #category : 'accessing' } 25 | XMLEncodingWriteStreamAdapterUTF8Test >> streamConverterClass [ 26 | ^ XMLUTF8StreamConverter 27 | ] 28 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFAttributeList.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLAttributeList 3 | " 4 | Class { 5 | #name : 'XMLFAttributeList', 6 | #superclass : 'XMLAttributeList', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFCData.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLCData 3 | " 4 | Class { 5 | #name : 'XMLFCData', 6 | #superclass : 'XMLCData', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFComment.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLComment 3 | " 4 | Class { 5 | #name : 'XMLFComment', 6 | #superclass : 'XMLComment', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFDateElement.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLElement 3 | " 4 | Class { 5 | #name : 'XMLFDateElement', 6 | #superclass : 'XMLElement', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFDocument.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLDocument 3 | " 4 | Class { 5 | #name : 'XMLFDocument', 6 | #superclass : 'XMLDocument', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFElement.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLElement 3 | " 4 | Class { 5 | #name : 'XMLFElement', 6 | #superclass : 'XMLElement', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFNodeList.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLFNodeList 3 | " 4 | Class { 5 | #name : 'XMLFNodeList', 6 | #superclass : 'XMLNodeList', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFPI.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLPI 3 | " 4 | Class { 5 | #name : 'XMLFPI', 6 | #superclass : 'XMLPI', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFRealNameElement.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLElement 3 | " 4 | Class { 5 | #name : 'XMLFRealNameElement', 6 | #superclass : 'XMLElement', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFSerializationFormatElement.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLElement 3 | " 4 | Class { 5 | #name : 'XMLFSerializationFormatElement', 6 | #superclass : 'XMLElement', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFString.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLString 3 | " 4 | Class { 5 | #name : 'XMLFString', 6 | #superclass : 'XMLString', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFTableElement.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLElement 3 | " 4 | Class { 5 | #name : 'XMLFTableElement', 6 | #superclass : 'XMLElement', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFUserElement.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLElement 3 | " 4 | Class { 5 | #name : 'XMLFUserElement', 6 | #superclass : 'XMLElement', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFUsernameElement.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLElement 3 | " 4 | Class { 5 | #name : 'XMLFUsernameElement', 6 | #superclass : 'XMLElement', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFWrongElement.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A dummy subclass of XMLElement 3 | " 4 | Class { 5 | #name : 'XMLFWrongElement', 6 | #superclass : 'XMLElement', 7 | #category : 'XML-Parser-Tests-DOM-Factories', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM-Factories' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFileHandleUTF16BETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLFileHandleUTF16BETest', 3 | #superclass : 'XMLFileHandleTest', 4 | #category : 'XML-Parser-Tests-Files', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Files' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLFileHandleUTF16BETest >> decodedFileContents [ 11 | ^ XMLStreamAdapterTest decodedUTF16String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLFileHandleUTF16BETest >> encodedFileContents [ 16 | ^ XMLStreamAdapterTest encodedUTF16BEBinary 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLFileHandleUTF16BETest >> streamConverterClass [ 21 | ^ XMLUTF16BigEndianStreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFileHandleUTF16LETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLFileHandleUTF16LETest', 3 | #superclass : 'XMLFileHandleTest', 4 | #category : 'XML-Parser-Tests-Files', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Files' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLFileHandleUTF16LETest >> decodedFileContents [ 11 | ^ XMLStreamAdapterTest decodedUTF16String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLFileHandleUTF16LETest >> encodedFileContents [ 16 | ^ XMLStreamAdapterTest encodedUTF16LEBinary 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLFileHandleUTF16LETest >> streamConverterClass [ 21 | ^ XMLUTF16LittleEndianStreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFileHandleUTF32BETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLFileHandleUTF32BETest', 3 | #superclass : 'XMLFileHandleTest', 4 | #category : 'XML-Parser-Tests-Files', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Files' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLFileHandleUTF32BETest >> decodedFileContents [ 11 | ^ XMLStreamAdapterTest decodedUTF32String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLFileHandleUTF32BETest >> encodedFileContents [ 16 | ^ XMLStreamAdapterTest encodedUTF32BEBinary 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLFileHandleUTF32BETest >> streamConverterClass [ 21 | ^ XMLUTF32BigEndianStreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFileHandleUTF32LETest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLFileHandleUTF32LETest', 3 | #superclass : 'XMLFileHandleTest', 4 | #category : 'XML-Parser-Tests-Files', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Files' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLFileHandleUTF32LETest >> decodedFileContents [ 11 | ^ XMLStreamAdapterTest decodedUTF32String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLFileHandleUTF32LETest >> encodedFileContents [ 16 | ^ XMLStreamAdapterTest encodedUTF32LEBinary 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLFileHandleUTF32LETest >> streamConverterClass [ 21 | ^ XMLUTF32LittleEndianStreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLFileHandleUTF8Test.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLFileHandleUTF8Test', 3 | #superclass : 'XMLFileHandleTest', 4 | #category : 'XML-Parser-Tests-Files', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Files' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLFileHandleUTF8Test >> decodedFileContents [ 11 | ^ XMLStreamAdapterTest decodedUTF8String 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLFileHandleUTF8Test >> encodedFileContents [ 16 | ^ XMLStreamAdapterTest encodedUTF8Binary 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLFileHandleUTF8Test >> streamConverterClass [ 21 | ^ XMLUTF8StreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLImplicitUTF16BigEndianStreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLImplicitUTF16BigEndianStreamConverterTest', 3 | #superclass : 'XMLUTF16BigEndianStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLImplicitUTF16BigEndianStreamConverterTest >> isImplicit [ 11 | ^ true 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLImplicitUTF16BigEndianStreamConverterTest >> streamConverterClass [ 16 | ^ XMLImplicitUTF16BigEndianStreamConverter 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLImplicitUTF16LittleEndianStreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLImplicitUTF16LittleEndianStreamConverterTest', 3 | #superclass : 'XMLUTF16LittleEndianStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLImplicitUTF16LittleEndianStreamConverterTest >> isImplicit [ 11 | ^ true 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLImplicitUTF16LittleEndianStreamConverterTest >> streamConverterClass [ 16 | ^ XMLImplicitUTF16LittleEndianStreamConverter 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLImplicitUTF32BigEndianStreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLImplicitUTF32BigEndianStreamConverterTest', 3 | #superclass : 'XMLUTF32BigEndianStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLImplicitUTF32BigEndianStreamConverterTest >> isImplicit [ 11 | ^ true 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLImplicitUTF32BigEndianStreamConverterTest >> streamConverterClass [ 16 | ^ XMLImplicitUTF32BigEndianStreamConverter 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLImplicitUTF32LittleEndianStreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLImplicitUTF32LittleEndianStreamConverterTest', 3 | #superclass : 'XMLUTF32LittleEndianStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLImplicitUTF32LittleEndianStreamConverterTest >> isImplicit [ 11 | ^ true 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLImplicitUTF32LittleEndianStreamConverterTest >> streamConverterClass [ 16 | ^ XMLImplicitUTF32LittleEndianStreamConverter 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLImplicitUTF8StreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLImplicitUTF8StreamConverterTest', 3 | #superclass : 'XMLUTF8StreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLImplicitUTF8StreamConverterTest >> isImplicit [ 11 | ^ true 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLImplicitUTF8StreamConverterTest >> streamConverterClass [ 16 | ^ XMLImplicitUTF8StreamConverter 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLLatin1StreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLLatin1StreamConverterTest', 3 | #superclass : 'XMLStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLLatin1StreamConverterTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLLatin1StreamConverterTest >> primaryEncodingName [ 16 | ^ 'Latin-1' 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLLatin1StreamConverterTest >> streamConverterClass [ 21 | ^ XMLLatin1StreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLLazyAttributeDictionaryTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLLazyAttributeDictionaryTest', 3 | #superclass : 'XMLAttributeDictionaryTest', 4 | #category : 'XML-Parser-Tests-Base', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Base' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLLazyAttributeDictionaryTest >> dictionaryClass [ 11 | ^ XMLLazyAttributeDictionary 12 | ] 13 | 14 | { #category : 'testing' } 15 | XMLLazyAttributeDictionaryTest >> isTestingLazyDictionary [ 16 | ^ true 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLLazyNamespacedAttributeDictionaryTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLLazyNamespacedAttributeDictionaryTest', 3 | #superclass : 'XMLNamespacedAttributeDictionaryTest', 4 | #category : 'XML-Parser-Tests-Base', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Base' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLLazyNamespacedAttributeDictionaryTest >> dictionaryClass [ 11 | ^ XMLLazyNamespacedAttributeDictionary 12 | ] 13 | 14 | { #category : 'testing' } 15 | XMLLazyNamespacedAttributeDictionaryTest >> isTestingLazyDictionary [ 16 | ^ true 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLNullReadStreamTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLNullReadStreamTest', 3 | #superclass : 'XMLAbstractReadStreamTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLNullReadStreamTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLNullReadStreamTest >> inputCollection [ 16 | ^ '' 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLNullReadStreamTest >> streamClass [ 21 | ^ XMLNullReadStream 22 | ] 23 | 24 | { #category : 'tests' } 25 | XMLNullReadStreamTest >> testNew [ 26 | 27 | self assert: self streamClass new class identicalTo: self streamClass 28 | ] 29 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLNullStreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLNullStreamConverterTest', 3 | #superclass : 'XMLStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLNullStreamConverterTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLNullStreamConverterTest >> streamConverterClass [ 16 | ^ XMLNullStreamConverter 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLParameterEntityDeclarationTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLParameterEntityDeclarationTest', 3 | #superclass : 'XMLEntityDeclarationTest', 4 | #category : 'XML-Parser-Tests-DOM', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'DOM' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLParameterEntityDeclarationTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLParameterEntityDeclarationTest >> nodeClass [ 16 | ^ XMLParameterEntityDeclaration 17 | ] 18 | 19 | { #category : 'tests' } 20 | XMLParameterEntityDeclarationTest >> testIsParameter [ 21 | self assert: self newNode isParameter 22 | ] 23 | 24 | { #category : 'tests' } 25 | XMLParameterEntityDeclarationTest >> testWriteXMLOn [ 26 | 27 | self 28 | assert: (self nodeClass name: 'one' replacement: 'two') printString 29 | equals: '<!ENTITY % one "two">'. 30 | self 31 | assert: 32 | (self nodeClass name: 'one' publicID: 'two' systemID: 'three') 33 | printString 34 | equals: '<!ENTITY % one PUBLIC "two" "three">'. 35 | self 36 | assert: (self nodeClass name: 'one' publicID: '' systemID: 'three') 37 | printString 38 | equals: '<!ENTITY % one SYSTEM "three">' 39 | ] 40 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLPercentDecodingReadStreamAdapterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLPercentDecodingReadStreamAdapterTest', 3 | #superclass : 'XMLReadStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLPercentDecodingReadStreamAdapterTest >> basicInputCollection [ 11 | ^ String streamContents: [:stream | 12 | super basicInputCollection do: [:each | 13 | stream nextPutAll: 14 | (self class percentEncodeCharacter: each)]] 15 | ] 16 | 17 | { #category : 'accessing' } 18 | XMLPercentDecodingReadStreamAdapterTest >> basicOutputCollection [ 19 | ^ 'test' 20 | ] 21 | 22 | { #category : 'testing' } 23 | XMLPercentDecodingReadStreamAdapterTest >> expectsBinaryOutput [ 24 | ^ true 25 | ] 26 | 27 | { #category : 'accessing' } 28 | XMLPercentDecodingReadStreamAdapterTest >> streamAdapterClass [ 29 | ^ XMLPercentDecodingReadStreamAdapter 30 | ] 31 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLPercentEncodingWriteStreamAdapterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLPercentEncodingWriteStreamAdapterTest', 3 | #superclass : 'XMLWriteStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLPercentEncodingWriteStreamAdapterTest >> basicOutputCollection [ 11 | ^ String streamContents: [:stream | 12 | super basicOutputCollection do: [:each | 13 | stream nextPutAll: 14 | (self class percentEncodeCharacter: each)]] 15 | ] 16 | 17 | { #category : 'converting' } 18 | XMLPercentEncodingWriteStreamAdapterTest >> contentsFromCharacter: aCharacter [ 19 | ^ self class percentEncodeCharacter: aCharacter 20 | ] 21 | 22 | { #category : 'testing' } 23 | XMLPercentEncodingWriteStreamAdapterTest >> expectsBinaryInput [ 24 | ^ true 25 | ] 26 | 27 | { #category : 'accessing' } 28 | XMLPercentEncodingWriteStreamAdapterTest >> streamAdapterClass [ 29 | ^ XMLPercentEncodingWriteStreamAdapter 30 | ] 31 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLRecordingAttributeListObserver.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This observer records notifications from XMLAttributeLists. 3 | " 4 | Class { 5 | #name : 'XMLRecordingAttributeListObserver', 6 | #superclass : 'XMLRecordingListObserver', 7 | #category : 'XML-Parser-Tests-DOM', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'notifying' } 13 | XMLRecordingAttributeListObserver >> addedAttribute: anAttribute [ 14 | self messageRecorder 15 | recordMessageReceiver: self 16 | selector: #addedAttribute: 17 | arguments: (Array with: anAttribute) 18 | ] 19 | 20 | { #category : 'notifying' } 21 | XMLRecordingAttributeListObserver >> removedAttribute: anAttribute [ 22 | self messageRecorder 23 | recordMessageReceiver: self 24 | selector: #removedAttribute: 25 | arguments: (Array with: anAttribute) 26 | ] 27 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLRecordingListObserver.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This observer records notifications using an XMLMessageRecorder. 3 | " 4 | Class { 5 | #name : 'XMLRecordingListObserver', 6 | #superclass : 'Object', 7 | #instVars : [ 8 | 'messageRecorder' 9 | ], 10 | #category : 'XML-Parser-Tests-DOM', 11 | #package : 'XML-Parser-Tests', 12 | #tag : 'DOM' 13 | } 14 | 15 | { #category : 'notifying' } 16 | XMLRecordingListObserver >> added: anObject to: aList [ 17 | self messageRecorder 18 | recordMessageReceiver: self 19 | selector: #added:to: 20 | arguments: (Array with: anObject with: aList) 21 | ] 22 | 23 | { #category : 'accesing' } 24 | XMLRecordingListObserver >> clearNotifications [ 25 | self messageRecorder clearMessages 26 | ] 27 | 28 | { #category : 'testing' } 29 | XMLRecordingListObserver >> hasNotifications [ 30 | ^ self messageRecorder hasMessages 31 | ] 32 | 33 | { #category : 'accesing' } 34 | XMLRecordingListObserver >> messageRecorder [ 35 | ^ messageRecorder ifNil: [messageRecorder := XMLMessageRecorder new] 36 | ] 37 | 38 | { #category : 'accesing' } 39 | XMLRecordingListObserver >> nextNotification [ 40 | ^ self messageRecorder nextMessage 41 | ] 42 | 43 | { #category : 'notifying' } 44 | XMLRecordingListObserver >> removed: anObject from: aList [ 45 | self messageRecorder 46 | recordMessageReceiver: self 47 | selector: #removed:from: 48 | arguments: (Array with: anObject with: aList) 49 | ] 50 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLRecordingNodeListObserver.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This observer records notifications from XMLNodeLists. 3 | " 4 | Class { 5 | #name : 'XMLRecordingNodeListObserver', 6 | #superclass : 'XMLRecordingListObserver', 7 | #category : 'XML-Parser-Tests-DOM', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'notifying' } 13 | XMLRecordingNodeListObserver >> addedNode: aNode [ 14 | self messageRecorder 15 | recordMessageReceiver: self 16 | selector: #addedNode: 17 | arguments: (Array with: aNode) 18 | ] 19 | 20 | { #category : 'notifying' } 21 | XMLRecordingNodeListObserver >> removedNode: aNode [ 22 | self messageRecorder 23 | recordMessageReceiver: self 24 | selector: #removedNode: 25 | arguments: (Array with: aNode) 26 | ] 27 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLSingleCharacterReadStreamTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLSingleCharacterReadStreamTest', 3 | #superclass : 'XMLAbstractReadStreamTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLSingleCharacterReadStreamTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLSingleCharacterReadStreamTest >> character [ 16 | ^ $! 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLSingleCharacterReadStreamTest >> inputCollection [ 21 | ^ self character asString 22 | ] 23 | 24 | { #category : 'instance creation' } 25 | XMLSingleCharacterReadStreamTest >> newStreamOn: aCollection [ 26 | ^ self streamClass on: aCollection first 27 | ] 28 | 29 | { #category : 'accessing' } 30 | XMLSingleCharacterReadStreamTest >> streamClass [ 31 | ^ XMLSingleCharacterReadStream 32 | ] 33 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLSmallIntegerReaderTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLSmallIntegerReaderTest', 3 | #superclass : 'XMLIntegerReaderTest', 4 | #category : 'XML-Parser-Tests-Utils', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Utils' 7 | } 8 | 9 | { #category : 'accessing' } 10 | XMLSmallIntegerReaderTest >> integerReaderClass [ 11 | ^ XMLSmallIntegerReader 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLStringReadStreamAdapterBinaryTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLStringReadStreamAdapterBinaryTest', 3 | #superclass : 'XMLStringReadStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLStringReadStreamAdapterBinaryTest >> expectsBinaryInput [ 11 | ^ true 12 | ] 13 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLStringReadStreamAdapterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLStringReadStreamAdapterTest', 3 | #superclass : 'XMLReadStreamAdapterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLStringReadStreamAdapterTest >> expectsBinaryOutput [ 11 | ^ true 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLStringReadStreamAdapterTest >> streamAdapterClass [ 16 | ^ XMLStringReadStreamAdapter 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLStubOrderedListCustomCollection.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a stub custom collection for XMLOrderedLists to test that #= and #hash do not depend on the type of the internal collection used. 3 | " 4 | Class { 5 | #name : 'XMLStubOrderedListCustomCollection', 6 | #superclass : 'OrderedCollection', 7 | #category : 'XML-Parser-Tests-DOM', 8 | #package : 'XML-Parser-Tests', 9 | #tag : 'DOM' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLUTF16BigEndianStreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLUTF16BigEndianStreamConverterTest', 3 | #superclass : 'XMLStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLUTF16BigEndianStreamConverterTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLUTF16BigEndianStreamConverterTest >> primaryEncodingName [ 16 | ^ 'UTF-16' 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLUTF16BigEndianStreamConverterTest >> streamConverterClass [ 21 | ^ XMLUTF16BigEndianStreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLUTF16LittleEndianStreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLUTF16LittleEndianStreamConverterTest', 3 | #superclass : 'XMLStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLUTF16LittleEndianStreamConverterTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLUTF16LittleEndianStreamConverterTest >> primaryEncodingName [ 16 | ^ 'UTF-16-LE' 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLUTF16LittleEndianStreamConverterTest >> streamConverterClass [ 21 | ^ XMLUTF16LittleEndianStreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLUTF32BigEndianStreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLUTF32BigEndianStreamConverterTest', 3 | #superclass : 'XMLStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLUTF32BigEndianStreamConverterTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLUTF32BigEndianStreamConverterTest >> primaryEncodingName [ 16 | ^ 'UTF-32' 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLUTF32BigEndianStreamConverterTest >> streamConverterClass [ 21 | ^ XMLUTF32BigEndianStreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLUTF32LittleEndianStreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLUTF32LittleEndianStreamConverterTest', 3 | #superclass : 'XMLStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLUTF32LittleEndianStreamConverterTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLUTF32LittleEndianStreamConverterTest >> primaryEncodingName [ 16 | ^ 'UTF-32-LE' 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLUTF32LittleEndianStreamConverterTest >> streamConverterClass [ 21 | ^ XMLUTF32LittleEndianStreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/XMLUTF8StreamConverterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'XMLUTF8StreamConverterTest', 3 | #superclass : 'XMLStreamConverterTest', 4 | #category : 'XML-Parser-Tests-Streams', 5 | #package : 'XML-Parser-Tests', 6 | #tag : 'Streams' 7 | } 8 | 9 | { #category : 'testing' } 10 | XMLUTF8StreamConverterTest class >> isAbstract [ 11 | ^ false 12 | ] 13 | 14 | { #category : 'accessing' } 15 | XMLUTF8StreamConverterTest >> primaryEncodingName [ 16 | ^ 'UTF-8' 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLUTF8StreamConverterTest >> streamConverterClass [ 21 | ^ XMLUTF8StreamConverter 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser-Tests/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'XML-Parser-Tests' } 2 | -------------------------------------------------------------------------------- /src/XML-Parser-Tools/XMLDocument.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'XMLDocument' } 2 | 3 | { #category : '*XML-Parser-Tools' } 4 | XMLDocument >> inspectorRoots [ 5 | 6 | ^ Array with: self root 7 | ] 8 | -------------------------------------------------------------------------------- /src/XML-Parser-Tools/XMLElement.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'XMLElement' } 2 | 3 | { #category : '*XML-Parser-Tools' } 4 | XMLElement >> inspectAttributesIn: specBuilder [ 5 | <inspectorPresentationOrder: 30 title: 'Attributes'> 6 | 7 | | builder table | 8 | builder := (StSimpleInspectorBuilder on: specBuilder). 9 | 10 | self attributes keysAndValuesDo: [:key :value | 11 | builder key: key value: value 12 | ]. 13 | table := builder table. 14 | table columns first title: #'Name'. 15 | table columns second title: #'Value'. 16 | ^ table 17 | 18 | 19 | 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser-Tools/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'XML-Parser-Tools' } 2 | -------------------------------------------------------------------------------- /src/XML-Parser/Collection.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'Collection' } 2 | 3 | { #category : '*XML-Parser' } 4 | Collection >> asXMLAttributeDictionary [ 5 | ^ XMLAttributeDictionary newFrom: self 6 | ] 7 | 8 | { #category : '*XML-Parser' } 9 | Collection >> asXMLAttributeSpec [ 10 | ^ XMLBasicAttributeSpec attributes: self 11 | ] 12 | 13 | { #category : '*XML-Parser' } 14 | Collection >> includesXMLName: aName [ 15 | "optimized with do: instead of anySatisfy:" 16 | self do: [:each | 17 | (aName isXMLQualifiedOrLocalName: each) 18 | ifTrue: [^ true]]. 19 | ^ false. 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDDecodedResolvedExternalParsedEntityReplacement.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class stores the decoded resolved replacement of an external parsed entity. 3 | " 4 | Class { 5 | #name : 'DTDDecodedResolvedExternalParsedEntityReplacement', 6 | #superclass : 'DTDResolvedExternalParsedEntityReplacement', 7 | #instVars : [ 8 | 'contents' 9 | ], 10 | #category : 'XML-Parser-DTD', 11 | #package : 'XML-Parser', 12 | #tag : 'DTD' 13 | } 14 | 15 | { #category : 'instance creation' } 16 | DTDDecodedResolvedExternalParsedEntityReplacement class >> contents: aString [ 17 | ^ self new setContents: aString 18 | ] 19 | 20 | { #category : 'accessing' } 21 | DTDDecodedResolvedExternalParsedEntityReplacement >> contents [ 22 | 23 | ^ contents 24 | ] 25 | 26 | { #category : 'testing' } 27 | DTDDecodedResolvedExternalParsedEntityReplacement >> isEmpty [ 28 | 29 | ^ self contents isEmpty 30 | ] 31 | 32 | { #category : 'printing' } 33 | DTDDecodedResolvedExternalParsedEntityReplacement >> printOn: aStream [ 34 | 35 | super printOn: aStream. 36 | 37 | aStream 38 | nextPut: $(; 39 | nextPutAll: self contents; 40 | nextPut: $) 41 | ] 42 | 43 | { #category : 'accessing' } 44 | DTDDecodedResolvedExternalParsedEntityReplacement >> readStream [ 45 | 46 | ^ self contents readStream 47 | ] 48 | 49 | { #category : 'initialization' } 50 | DTDDecodedResolvedExternalParsedEntityReplacement >> setContents: aString [ 51 | 52 | contents := aString 53 | ] 54 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDExternalGeneralParsedEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for external general parsed entities with external replacements that can be inserted into an XML document. 3 | " 4 | Class { 5 | #name : 'DTDExternalGeneralParsedEntity', 6 | #superclass : 'DTDExternalParsedEntity', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDExternalParameterParsedEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for external parameter parsed entities with external replacements that can be inserted into an XML document. 3 | " 4 | Class { 5 | #name : 'DTDExternalParameterParsedEntity', 6 | #superclass : 'DTDExternalParsedEntity', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | 12 | { #category : 'testing' } 13 | DTDExternalParameterParsedEntity >> isParameter [ 14 | 15 | ^ true 16 | ] 17 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDInternalGeneralParsedEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for internal general parsed entities with replacements that can be inserted into documents. 3 | " 4 | Class { 5 | #name : 'DTDInternalGeneralParsedEntity', 6 | #superclass : 'DTDInternalParsedEntity', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDInternalParameterParsedEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for internal parameter parsed entities with replacements that can be inserted into documents. 3 | " 4 | Class { 5 | #name : 'DTDInternalParameterParsedEntity', 6 | #superclass : 'DTDInternalParsedEntity', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | 12 | { #category : 'testing' } 13 | DTDInternalParameterParsedEntity >> isParameter [ 14 | 15 | ^ true 16 | ] 17 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDLiteralContentModelParser.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class parses literal ""ANY"" and ""EMPTY"" element content models and returns XMLElementValidators accepting any content or no content (not even whitespace, comments, or PIs). 3 | " 4 | Class { 5 | #name : 'DTDLiteralContentModelParser', 6 | #superclass : 'DTDContentModelParser', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | 12 | { #category : 'parsing' } 13 | DTDLiteralContentModelParser >> parse [ 14 | "either ANY or EMPTY" 15 | 16 | (contentModel at: 1) == $A 17 | ifTrue: [^ XMLAnyElementValidator element: element] 18 | ifFalse: [^ XMLEmptyElementValidator element: element] 19 | ] 20 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDMixedContentEnumerationListParser.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a parser of mixed content lists in the form of ""(#PCDATA|one|two|...)*"". It assumes there is no whitespace around the ""|"" separated list values. 3 | " 4 | Class { 5 | #name : 'DTDMixedContentEnumerationListParser', 6 | #superclass : 'DTDEnumerationListParser', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | 12 | { #category : 'private' } 13 | DTDMixedContentEnumerationListParser >> listEndOffset [ 14 | 15 | ^ listString last == $* 16 | ifTrue: [ 2 "')*' size"] 17 | ifFalse: [ 1 "')' size" ] 18 | ] 19 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDMixedContentModelParser.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class parses mixed content declarations like ""(#PCDATA|one|two)*"" using a DTDEnumerationListParser and returns an XMLElementValidator accepting any sequence of PCDATA and the named elements in any order. 3 | " 4 | Class { 5 | #name : 'DTDMixedContentModelParser', 6 | #superclass : 'DTDContentModelParser', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | 12 | { #category : 'parsing' } 13 | DTDMixedContentModelParser >> parse [ 14 | ^ XMLMixedContentElementValidator 15 | element: element 16 | allowedContent: 17 | (DTDMixedContentEnumerationListParser on: contentModel) 18 | parse 19 | ] 20 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDNotationEnumerationListParser.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class parses notation attribute value lists in the form of ""NOTATION (one|two|...)"". It assumes there is no whitespace around the ""|"" separated list values. 3 | " 4 | Class { 5 | #name : 'DTDNotationEnumerationListParser', 6 | #superclass : 'DTDEnumerationListParser', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | 12 | { #category : 'private' } 13 | DTDNotationEnumerationListParser >> listStartOffset [ 14 | 15 | ^ 10 "'NOTATION (' size" 16 | ] 17 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDParsedEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is an abstract base class for parsed entities with replacements that can be inserted into an XML document. 3 | " 4 | Class { 5 | #name : 'DTDParsedEntity', 6 | #superclass : 'DTDEntity', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | 12 | { #category : 'converting' } 13 | DTDParsedEntity >> asPushedBackEntity [ 14 | 15 | ^ self isParameter 16 | ifTrue: [ XMLPushedBackParameterEntity entity: self ] 17 | ifFalse: [ XMLPushedBackGeneralEntity entity: self ] 18 | ] 19 | 20 | { #category : 'testing' } 21 | DTDParsedEntity >> hasReplacement [ 22 | 23 | self subclassResponsibility 24 | ] 25 | 26 | { #category : 'accessing' } 27 | DTDParsedEntity >> replacement [ 28 | 29 | self subclassResponsibility 30 | ] 31 | 32 | { #category : 'accessing' } 33 | DTDParsedEntity >> replacementStream [ 34 | 35 | self subclassResponsibility 36 | ] 37 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDResolvedExternalParsedEntityReplacement.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is an abstract class for resolved external entity replacements. 3 | " 4 | Class { 5 | #name : 'DTDResolvedExternalParsedEntityReplacement', 6 | #superclass : 'Object', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | 12 | { #category : 'converting' } 13 | DTDResolvedExternalParsedEntityReplacement >> asString [ 14 | 15 | ^ self contents 16 | ] 17 | 18 | { #category : 'accessing' } 19 | DTDResolvedExternalParsedEntityReplacement >> contents [ 20 | 21 | self subclassResponsibility 22 | ] 23 | 24 | { #category : 'testing' } 25 | DTDResolvedExternalParsedEntityReplacement >> isEmpty [ 26 | 27 | self subclassResponsibility 28 | ] 29 | 30 | { #category : 'testing' } 31 | DTDResolvedExternalParsedEntityReplacement >> isNotEmpty [ 32 | 33 | ^ self isEmpty not 34 | ] 35 | 36 | { #category : 'testing' } 37 | DTDResolvedExternalParsedEntityReplacement >> notEmpty [ 38 | 39 | self 40 | deprecated: 'Please use #isNotEmpty instead.' 41 | transformWith: '`@receiver notEmpty' -> '`@receiver isNotEmpty'. 42 | 43 | ^ self isNotEmpty 44 | ] 45 | 46 | { #category : 'accessing' } 47 | DTDResolvedExternalParsedEntityReplacement >> readStream [ 48 | 49 | self subclassResponsibility 50 | ] 51 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDStandaloneExternalAttributeDefinitionParser.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class parses standalone externally defined ATTLIST attribute definitions and returns XMLAttributeValidators for them that disallow attributes needing further value normalization or substitution with default or fixed default values. 3 | " 4 | Class { 5 | #name : 'DTDStandaloneExternalAttributeDefinitionParser', 6 | #superclass : 'DTDAttributeDefinitionParser', 7 | #category : 'XML-Parser-DTD-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD-Standalone' 10 | } 11 | 12 | { #category : 'private' } 13 | DTDStandaloneExternalAttributeDefinitionParser class >> attributeDefaultValidatorClassForPragma: aDefaultPragma [ 14 | ^ (super attributeDefaultValidatorClassForPragma: aDefaultPragma) 15 | standaloneExternalClass 16 | ] 17 | 18 | { #category : 'private' } 19 | DTDStandaloneExternalAttributeDefinitionParser >> attributeValidatorClassForType [ 20 | ^ super attributeValidatorClassForType standaloneExternalClass 21 | ] 22 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDStandaloneExternalElementContentModelParser.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class parses standalone externally defined element content models and returns XMLElementValidators for them. Validators for content models that specify element content like ""(one|two+)"" won't treat whitespace as ignorable. 3 | " 4 | Class { 5 | #name : 'DTDStandaloneExternalElementContentModelParser', 6 | #superclass : 'DTDElementContentModelParser', 7 | #category : 'XML-Parser-DTD-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD-Standalone' 10 | } 11 | 12 | { #category : 'defaults' } 13 | DTDStandaloneExternalElementContentModelParser >> elementValidatorClass [ 14 | ^ XMLStandaloneExternalDFAElementContentElementValidator 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDStandaloneExternalExternalGeneralParsedEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for standalone externally defined external general entities that cannot be referenced in documents. 3 | " 4 | Class { 5 | #name : 'DTDStandaloneExternalExternalGeneralParsedEntity', 6 | #superclass : 'DTDExternalGeneralParsedEntity', 7 | #category : 'XML-Parser-DTD-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | DTDStandaloneExternalExternalGeneralParsedEntity >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDStandaloneExternalInternalGeneralParsedEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for standalone externally defined external general entities that cannot be referenced in documents except in ATTLIST attribute declaration default values. 3 | " 4 | Class { 5 | #name : 'DTDStandaloneExternalInternalGeneralParsedEntity', 6 | #superclass : 'DTDInternalGeneralParsedEntity', 7 | #category : 'XML-Parser-DTD-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | DTDStandaloneExternalInternalGeneralParsedEntity >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDUnresolvableExternalGeneralParsedEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for unresolvable external general parsed entities that lazily raises an error when #replacement or #replacementStream is sent, which would normally trigger resolution. 3 | " 4 | Class { 5 | #name : 'DTDUnresolvableExternalGeneralParsedEntity', 6 | #superclass : 'DTDUnresolvableExternalParsedEntity', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDUnresolvableExternalParameterParsedEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for unresolvable external parameter parsed entities that lazily raises an error when #replacement or #replacementStream is sent, which would normally trigger resolution. 3 | " 4 | Class { 5 | #name : 'DTDUnresolvableExternalParameterParsedEntity', 6 | #superclass : 'DTDUnresolvableExternalParsedEntity', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | 12 | { #category : 'testing' } 13 | DTDUnresolvableExternalParameterParsedEntity >> isParameter [ 14 | 15 | ^ true 16 | ] 17 | -------------------------------------------------------------------------------- /src/XML-Parser/DTDUnresolvableExternalParsedEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is an abstract base class for unresolvable external parsed entities that lazily raises an error when #replacement or #replacementStream is sent, which would normally trigger resolution. 3 | " 4 | Class { 5 | #name : 'DTDUnresolvableExternalParsedEntity', 6 | #superclass : 'DTDParsedEntity', 7 | #category : 'XML-Parser-DTD', 8 | #package : 'XML-Parser', 9 | #tag : 'DTD' 10 | } 11 | 12 | { #category : 'private' } 13 | DTDUnresolvableExternalParsedEntity >> errorUnresolvableExternalEntity [ 14 | 15 | XMLParserException 16 | formatSignal: 17 | 'External entity {1} can''t be resolved unless resolution is ' 18 | , 'enabled; use #resolvesExternalEntityReferences: before parsing ' 19 | , 'to enable' 20 | with: self asReference 21 | ] 22 | 23 | { #category : 'testing' } 24 | DTDUnresolvableExternalParsedEntity >> hasReplacement [ 25 | 26 | ^ true 27 | ] 28 | 29 | { #category : 'testing' } 30 | DTDUnresolvableExternalParsedEntity >> isExternal [ 31 | 32 | ^ true 33 | ] 34 | 35 | { #category : 'accessing' } 36 | DTDUnresolvableExternalParsedEntity >> replacement [ 37 | 38 | self errorUnresolvableExternalEntity 39 | ] 40 | 41 | { #category : 'accessing' } 42 | DTDUnresolvableExternalParsedEntity >> replacementStream [ 43 | 44 | self errorUnresolvableExternalEntity 45 | ] 46 | -------------------------------------------------------------------------------- /src/XML-Parser/Error.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'Error' } 2 | 3 | { #category : '*XML-Parser' } 4 | Error >> isXMLParserException [ 5 | ^ false 6 | ] 7 | -------------------------------------------------------------------------------- /src/XML-Parser/Object.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'Object' } 2 | 3 | { #category : '*XML-Parser' } 4 | Object >> isXMLBinaryOrExternalStream [ 5 | "Not every stream or stream-like object is a subclass of Stream, so this 6 | must be defined here. 7 | 8 | At a minimum, these streams must accept binary objects (like SmallIntegers 9 | and ByteArrays) when writing. When reading, they can return byte values 10 | as SmallIntegers or Characters and collections of byte values as ByteArrays 11 | or ByteStrings." 12 | 13 | ^ self isStream 14 | and: [(self respondsTo: #isBinary) 15 | and: [self isBinary]] 16 | ] 17 | 18 | { #category : '*XML-Parser' } 19 | Object >> isXMLConvertingStreamAdapter [ 20 | ^ false 21 | ] 22 | -------------------------------------------------------------------------------- /src/XML-Parser/SAX2ElementCharacterHandler.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class is a SAX2ElementHandler that handles #characters: events. Sending #characters returns the complete character data of the element as a string. 3 | " 4 | Class { 5 | #name : 'SAX2ElementCharacterHandler', 6 | #superclass : 'SAX2ElementHandler', 7 | #instVars : [ 8 | 'characters' 9 | ], 10 | #category : 'XML-Parser', 11 | #package : 'XML-Parser' 12 | } 13 | 14 | { #category : 'accessing' } 15 | SAX2ElementCharacterHandler >> characters [ 16 | "This returns the combined #characters: events handled by the receiver 17 | as a string." 18 | 19 | ^ characters ifNil: [characters := ''] 20 | ] 21 | 22 | { #category : 'handling - content' } 23 | SAX2ElementCharacterHandler >> characters: aString [ 24 | "building the string this way is simpler and performs as well in tests 25 | as using a write stream" 26 | characters := 27 | characters 28 | ifNil: [aString] 29 | ifNotNil: [characters, aString] 30 | ] 31 | -------------------------------------------------------------------------------- /src/XML-Parser/SAX2ElementHandlerFactory.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a base class for element handler factories used by SAX2ElementParsers to create element handlers. Instances can be injected into a SAX2ElementParser with #elementHandlerFactory: before parsing. 3 | 4 | This factory just uses the default handler class SAX2ElementHandler for all elements. 5 | " 6 | Class { 7 | #name : 'SAX2ElementHandlerFactory', 8 | #superclass : 'Object', 9 | #category : 'XML-Parser', 10 | #package : 'XML-Parser' 11 | } 12 | 13 | { #category : 'accessing' } 14 | SAX2ElementHandlerFactory >> classForElement: aQualifiedName namespaceURI: aURI localName: aLocalName attributes: anAssociationCollection [ 15 | ^ self elementHandlerClass 16 | ] 17 | 18 | { #category : 'accessing' } 19 | SAX2ElementHandlerFactory >> elementHandlerClass [ 20 | ^ SAX2ElementHandler 21 | ] 22 | -------------------------------------------------------------------------------- /src/XML-Parser/SAX2ElementHandlerFactoryMapper.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a base class for mappers to map element handler objects to element handler factories. 3 | 4 | Requesting the factory for an element handler checks the handler's #elementHandlerFactory message first and then the mapper's own #elementHandlerFactory message which can be (and is) overridden in subclasses to return a default factory. 5 | 6 | When a SAX2ElementParser requests the factory for a new element handler, if none is found, it will reuse (inherit) the current factory. 7 | " 8 | Class { 9 | #name : 'SAX2ElementHandlerFactoryMapper', 10 | #superclass : 'Object', 11 | #category : 'XML-Parser', 12 | #package : 'XML-Parser' 13 | } 14 | 15 | { #category : 'accessing' } 16 | SAX2ElementHandlerFactoryMapper >> elementHandlerFactory [ 17 | "Can be overridden to return a default element handler factory to use 18 | if no other mapping is defined for it." 19 | 20 | ^ nil 21 | ] 22 | 23 | { #category : 'accessing' } 24 | SAX2ElementHandlerFactoryMapper >> factoryForElementHandler: anElementHandler [ 25 | ^ self 26 | factoryForElementHandler: anElementHandler 27 | ifNone: [nil] 28 | ] 29 | 30 | { #category : 'accessing' } 31 | SAX2ElementHandlerFactoryMapper >> factoryForElementHandler: anElementHandler ifNone: aBlock [ 32 | ^ anElementHandler elementHandlerFactory 33 | ifNil: [ 34 | self elementHandlerFactory 35 | ifNil: [aBlock value]] 36 | ] 37 | -------------------------------------------------------------------------------- /src/XML-Parser/SequenceableCollection.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'SequenceableCollection' } 2 | 3 | { #category : '*XML-Parser' } 4 | SequenceableCollection >> includesXMLName: aName [ 5 | "optimized with #to:do:" 6 | 1 to: self size do: [:i | 7 | (aName isXMLQualifiedOrLocalName: (self at: i)) 8 | ifTrue: [^ true]]. 9 | ^ false. 10 | ] 11 | 12 | { #category : '*XML-Parser' } 13 | SequenceableCollection >> xmlLastOrNil [ 14 | "for speed to avoid at:ifAbsent: closure" 15 | | lastOrNilOffset | 16 | 17 | (lastOrNilOffset := self size) > 0 18 | ifTrue: [^ self at: lastOrNilOffset] 19 | ifFalse: [^ nil] 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/Stream.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'Stream' } 2 | 3 | { #category : '*XML-Parser' } 4 | Stream >> isXMLBinaryOrExternalStream [ 5 | ^ self isBinary 6 | ] 7 | 8 | { #category : '*XML-Parser' } 9 | Stream >> parseXML [ 10 | ^ XMLDOMParser parse: self 11 | ] 12 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLASCIIStreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A stream converter for ASCII. 3 | " 4 | Class { 5 | #name : 'XMLASCIIStreamConverter', 6 | #superclass : 'XMLStatelessStreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'basic' } 13 | XMLASCIIStreamConverter class >> basicEncodingNames [ 14 | ^ #('ASCII' 'US-ASCII' 'USASCII') 15 | ] 16 | 17 | { #category : 'decoding' } 18 | XMLASCIIStreamConverter >> nextFromStream: aStream [ 19 | | byte | 20 | 21 | aStream atEnd 22 | ifTrue: [^ nil]. 23 | (byte := aStream next asInteger) > 127 24 | ifTrue: [self errorBadCharacterValue: byte]. 25 | 26 | ^ byte asCharacter. 27 | ] 28 | 29 | { #category : 'encoding' } 30 | XMLASCIIStreamConverter >> nextPut: aCharacter toStream: aStream [ 31 | | codePoint | 32 | 33 | (codePoint := aCharacter asInteger) > 127 34 | ifTrue: [self errorBadCharacterValue: codePoint]. 35 | 36 | aStream nextPut: codePoint. 37 | ] 38 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLAnyElementValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates elements that can contain any content. 3 | " 4 | Class { 5 | #name : 'XMLAnyElementValidator', 6 | #superclass : 'XMLElementValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLAnyElementValidator >> atEnd [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLAnyElementValidator >> isAny [ 19 | ^ true 20 | ] 21 | 22 | { #category : 'defaults' } 23 | XMLAnyElementValidator >> typeName [ 24 | ^ 'ANY' 25 | ] 26 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLAttributeImpliedDefaultValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class allows an attribute to be absent (the #IMPLIED constraint). 3 | " 4 | Class { 5 | #name : 'XMLAttributeImpliedDefaultValidator', 6 | #superclass : 'XMLAttributeDefaultValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLAttributeImpliedDefaultValidator >> isImplied [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLAttributeRequiredDefaultValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class makes sure an attribute is present (the #REQUIRED constrant). 3 | " 4 | Class { 5 | #name : 'XMLAttributeRequiredDefaultValidator', 6 | #superclass : 'XMLAttributeDefaultValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'private' } 13 | XMLAttributeRequiredDefaultValidator >> errorRequiredAttributeMissing [ 14 | XMLValidationException 15 | formatSignal: 'Required attribute "{1}" is missing' 16 | with: self attribute 17 | ] 18 | 19 | { #category : 'testing' } 20 | XMLAttributeRequiredDefaultValidator >> isRequired [ 21 | ^ true 22 | ] 23 | 24 | { #category : 'validating' } 25 | XMLAttributeRequiredDefaultValidator >> validatedDefaultForAbsentAttributeValue [ 26 | self errorRequiredAttributeMissing 27 | ] 28 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLAttributeSpec.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a base class for attribute specifications. Subclasses need to implement matchesAttributes: to return true if the argument attribute dictionary matches the spec and false otherwise. 3 | " 4 | Class { 5 | #name : 'XMLAttributeSpec', 6 | #superclass : 'Object', 7 | #category : 'XML-Parser-Utils', 8 | #package : 'XML-Parser', 9 | #tag : 'Utils' 10 | } 11 | 12 | { #category : 'converting' } 13 | XMLAttributeSpec >> asXMLAttributeSpec [ 14 | ^ self 15 | ] 16 | 17 | { #category : 'matching' } 18 | XMLAttributeSpec >> matchesAttributes: anAttributeDictionary [ 19 | self subclassResponsibility 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLAttributeValueDefaultValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class will put a default value for an attribute if the attribute is absent. 3 | " 4 | Class { 5 | #name : 'XMLAttributeValueDefaultValidator', 6 | #superclass : 'XMLAttributeDefaultValidator', 7 | #instVars : [ 8 | 'value' 9 | ], 10 | #category : 'XML-Parser-Validation', 11 | #package : 'XML-Parser', 12 | #tag : 'Validation' 13 | } 14 | 15 | { #category : 'defaults' } 16 | XMLAttributeValueDefaultValidator class >> standaloneExternalClass [ 17 | ^ XMLStandaloneExternalAttributeValueDefaultValidator 18 | ] 19 | 20 | { #category : 'testing' } 21 | XMLAttributeValueDefaultValidator >> isValue [ 22 | ^ true 23 | ] 24 | 25 | { #category : 'processing' } 26 | XMLAttributeValueDefaultValidator >> processedDefaultForAbsentAttributeValue [ 27 | ^ self value 28 | ] 29 | 30 | { #category : 'initialization' } 31 | XMLAttributeValueDefaultValidator >> setAttribute: anAttribute value: aDefaultValue [ 32 | attribute := anAttribute. 33 | value := aDefaultValue. 34 | ] 35 | 36 | { #category : 'validating' } 37 | XMLAttributeValueDefaultValidator >> validatedDefaultForAbsentAttributeValue [ 38 | ^ self value 39 | ] 40 | 41 | { #category : 'accessing' } 42 | XMLAttributeValueDefaultValidator >> value [ 43 | ^ value 44 | ] 45 | 46 | { #category : 'accessing' } 47 | XMLAttributeValueDefaultValidator >> value: aDefaultValue [ 48 | value := aDefaultValue 49 | ] 50 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLCData.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class represents a preserved <![CDATA[...]]> section. By default these are handled as XMLString nodes and merged with adjacent string nodes during parsing. To preserve CDATA nodes, use #preservesCDataNodes: with the DOM parser before parsing. 3 | " 4 | Class { 5 | #name : 'XMLCData', 6 | #superclass : 'XMLString', 7 | #category : 'XML-Parser-DOM', 8 | #package : 'XML-Parser', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'visiting' } 13 | XMLCData >> acceptNodeVisitor: aNodeVisitor [ 14 | ^ aNodeVisitor visitCData: self 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLCData >> isCData [ 19 | ^ true 20 | ] 21 | 22 | { #category : 'private' } 23 | XMLCData >> isCoalescingStringNode [ 24 | "this returns false to stop preserved CDATA nodes from coalescing 25 | together or with ordinary string nodes" 26 | 27 | ^ false 28 | ] 29 | 30 | { #category : 'printing' } 31 | XMLCData >> writeXMLOn: aWriter [ 32 | aWriter cdata: self string 33 | ] 34 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLCDataAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates CDATA attributes, which are not whitespace-normalized further. 3 | " 4 | Class { 5 | #name : 'XMLCDataAttributeValidator', 6 | #superclass : 'XMLAttributeValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'defaults' } 13 | XMLCDataAttributeValidator class >> standaloneExternalClass [ 14 | ^ XMLStandaloneExternalCDataAttributeValidator 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLCDataAttributeValidator >> isCData [ 19 | ^ true 20 | ] 21 | 22 | { #category : 'testing' } 23 | XMLCDataAttributeValidator >> mustFurtherNormalizeAttributeValue [ 24 | ^ false 25 | ] 26 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLComment.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class represents a comment node. Comments are ignored during parsing by default. If you want them preserved as comment nodes, use #preservesCommentNodes: with the DOM parser before parsing. 3 | " 4 | Class { 5 | #name : 'XMLComment', 6 | #superclass : 'XMLNode', 7 | #instVars : [ 8 | 'string' 9 | ], 10 | #category : 'XML-Parser-DOM', 11 | #package : 'XML-Parser', 12 | #tag : 'DOM' 13 | } 14 | 15 | { #category : 'instance creation' } 16 | XMLComment class >> string: aString [ 17 | ^ self new string: aString 18 | ] 19 | 20 | { #category : 'visiting' } 21 | XMLComment >> acceptNodeVisitor: aNodeVisitor [ 22 | ^ aNodeVisitor visitComment: self 23 | ] 24 | 25 | { #category : 'testing' } 26 | XMLComment >> isComment [ 27 | ^ true 28 | ] 29 | 30 | { #category : 'accessing' } 31 | XMLComment >> sortKey [ 32 | ^ self string 33 | ] 34 | 35 | { #category : 'accessing' } 36 | XMLComment >> string [ 37 | ^ string ifNil: [string := ''] 38 | ] 39 | 40 | { #category : 'accessing' } 41 | XMLComment >> string: aString [ 42 | string := aString 43 | ] 44 | 45 | { #category : 'printing' } 46 | XMLComment >> writeXMLOn: aWriter [ 47 | aWriter comment: self string 48 | ] 49 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLContentState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A state for content tokens, everything from the first stat tag to the end of the document. 3 | " 4 | Class { 5 | #name : 'XMLContentState', 6 | #superclass : 'XMLTokenizerState', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLContentState >> isContentState [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'tokenizing' } 18 | XMLContentState >> nextTokenFrom: aTokenizer [ 19 | ^ aTokenizer nextContentToken 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLDFAElementContentElementValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates elements that can only contain element content (no PCDATA) using a regular expression converted to a DFA. It ignores comments, PIs, and whitespace. 3 | " 4 | Class { 5 | #name : 'XMLDFAElementContentElementValidator', 6 | #superclass : 'XMLDFAElementValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLDFAElementContentElementValidator >> ignoresWhitespace [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLDFAElementContentElementValidator >> isElementContent [ 19 | ^ true 20 | ] 21 | 22 | { #category : 'defaults' } 23 | XMLDFAElementContentElementValidator >> typeName [ 24 | ^ 'element content' 25 | ] 26 | 27 | { #category : 'validating' } 28 | XMLDFAElementContentElementValidator >> validatePCData: aString [ 29 | self errorUnexpectedPCData 30 | ] 31 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLDOMException.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Invoked when a DOM tree is manipulated wrong. 3 | " 4 | Class { 5 | #name : 'XMLDOMException', 6 | #superclass : 'XMLParserException', 7 | #category : 'XML-Parser-Exceptions', 8 | #package : 'XML-Parser', 9 | #tag : 'Exceptions' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLDeclarationNode.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is an abstract class for markup declaration nodes in the internal subset. 3 | " 4 | Class { 5 | #name : 'XMLDeclarationNode', 6 | #superclass : 'XMLNode', 7 | #category : 'XML-Parser-DOM', 8 | #package : 'XML-Parser', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLDeclarationNode >> isDeclaration [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLDoctypeDeclarationState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A state for <!DOCTYPE ...> and internal subset tokens. 3 | " 4 | Class { 5 | #name : 'XMLDoctypeDeclarationState', 6 | #superclass : 'XMLPrologState', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLDoctypeDeclarationState >> isDoctypeDeclarationState [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLElementDeclaration.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for <!ELEMENT> declarations. 3 | " 4 | Class { 5 | #name : 'XMLElementDeclaration', 6 | #superclass : 'XMLDeclarationNode', 7 | #instVars : [ 8 | 'element', 9 | 'contentModel' 10 | ], 11 | #category : 'XML-Parser-DOM', 12 | #package : 'XML-Parser', 13 | #tag : 'DOM' 14 | } 15 | 16 | { #category : 'instance creation' } 17 | XMLElementDeclaration class >> element: anElementName contentModel: aContentModel [ 18 | ^ self new 19 | element: anElementName; 20 | contentModel: aContentModel 21 | ] 22 | 23 | { #category : 'accessing' } 24 | XMLElementDeclaration >> contentModel [ 25 | ^ contentModel ifNil: [contentModel := ''] 26 | ] 27 | 28 | { #category : 'accessing' } 29 | XMLElementDeclaration >> contentModel: aContentModel [ 30 | contentModel := aContentModel 31 | ] 32 | 33 | { #category : 'accessing' } 34 | XMLElementDeclaration >> element [ 35 | ^ element ifNil: [element := ''] 36 | ] 37 | 38 | { #category : 'accessing' } 39 | XMLElementDeclaration >> element: anElementName [ 40 | element := anElementName 41 | ] 42 | 43 | { #category : 'printing' } 44 | XMLElementDeclaration >> writeXMLOn: aWriter [ 45 | aWriter elementDeclaration 46 | element: self element; 47 | contentModel: self contentModel; 48 | write 49 | ] 50 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLEmptyElementValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates EMPTY elements, which can't contain elements, PCDATA, or even comments or PIs. 3 | " 4 | Class { 5 | #name : 'XMLEmptyElementValidator', 6 | #superclass : 'XMLElementValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLEmptyElementValidator >> atEnd [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLEmptyElementValidator >> isEmpty [ 19 | ^ true 20 | ] 21 | 22 | { #category : 'defaults' } 23 | XMLEmptyElementValidator >> typeName [ 24 | ^ 'EMPTY' 25 | ] 26 | 27 | { #category : 'validating' } 28 | XMLEmptyElementValidator >> validateComment: aString [ 29 | self errorUnexpectedComment 30 | ] 31 | 32 | { #category : 'validating' } 33 | XMLEmptyElementValidator >> validatePCData: aString [ 34 | self errorUnexpectedPCData 35 | ] 36 | 37 | { #category : 'validating' } 38 | XMLEmptyElementValidator >> validatePI: aTargetString data: aDataString [ 39 | self errorUnexpectedPI 40 | ] 41 | 42 | { #category : 'validating' } 43 | XMLEmptyElementValidator >> validateStartTag: anElement [ 44 | self errorUnexpectedElement: anElement 45 | ] 46 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLEncodingException.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Invoked for encoding errors. 3 | " 4 | Class { 5 | #name : 'XMLEncodingException', 6 | #superclass : 'XMLParserException', 7 | #category : 'XML-Parser-Exceptions', 8 | #package : 'XML-Parser', 9 | #tag : 'Exceptions' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLEntitiesAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates attributes with lists of unparsed entity name values (that must be declared) separated by spaces. 3 | " 4 | Class { 5 | #name : 'XMLEntitiesAttributeValidator', 6 | #superclass : 'XMLEntityAttributeValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'defaults' } 13 | XMLEntitiesAttributeValidator class >> standaloneExternalClass [ 14 | ^ XMLStandaloneExternalEntitiesAttributeValidator 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLEntitiesAttributeValidator >> isEntities [ 19 | ^ true 20 | ] 21 | 22 | { #category : 'validating' } 23 | XMLEntitiesAttributeValidator >> validateAttributeDefaultValue: aDefaultValue [ 24 | self 25 | spaceSeparatedListValuesIn: aDefaultValue 26 | do: [:each | 27 | each isXMLName 28 | ifFalse: [self errorInvalidDefaultAttributeValue: aDefaultValue]] 29 | ] 30 | 31 | { #category : 'validating' } 32 | XMLEntitiesAttributeValidator >> validateAttributeValue: aValue [ 33 | self 34 | spaceSeparatedListValuesIn: aValue 35 | do: [:each | 36 | self unparsedEntityValidator 37 | validateEntityReference: each 38 | inAttribute: self attribute] 39 | ] 40 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLExternalSubsetState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A state for external subset tokens. 3 | " 4 | Class { 5 | #name : 'XMLExternalSubsetState', 6 | #superclass : 'XMLTokenizerState', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLExternalSubsetState >> isExternalSubsetState [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'tokenizing' } 18 | XMLExternalSubsetState >> nextTokenFrom: aTokenizer [ 19 | ^ aTokenizer nextExternalSubsetToken 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLExternalSubsetTextDeclarationState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A state for <?xml ...?> text declaration tokens at the start of the external DTD subset. 3 | 4 | This state #canTerminateInput unlike XMLXMLDeclarationState because external subsets and parsed entities can be empty, but documents must have at least one element. 5 | " 6 | Class { 7 | #name : 'XMLExternalSubsetTextDeclarationState', 8 | #superclass : 'XMLExternalSubsetState', 9 | #category : 'XML-Parser-Drivers', 10 | #package : 'XML-Parser', 11 | #tag : 'Drivers' 12 | } 13 | 14 | { #category : 'tokenizing' } 15 | XMLExternalSubsetTextDeclarationState >> nextTokenFrom: aTokenizer [ 16 | ^ aTokenizer nextStartExternalSubset 17 | ] 18 | 19 | { #category : 'testing' } 20 | XMLExternalSubsetTextDeclarationState >> supportsEncodingDetection [ 21 | ^ true 22 | ] 23 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLFileException.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Invoked for file IO errors. 3 | " 4 | Class { 5 | #name : 'XMLFileException', 6 | #superclass : 'XMLParserException', 7 | #category : 'XML-Parser-Exceptions', 8 | #package : 'XML-Parser', 9 | #tag : 'Exceptions' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLFileReadStreamFactory.class.st: -------------------------------------------------------------------------------- 1 | " 2 | An abstract factory for file read streams used by XMLFileHandles. 3 | 4 | Subclasses should create read streams that return raw byte characters and not characters decoded from some encoding (like UTF-8), so that XMLParser can do its own decoding later looking at byte-order marks and the <?xml ...?> encoding attribute. 5 | " 6 | Class { 7 | #name : 'XMLFileReadStreamFactory', 8 | #superclass : 'XMLAbstractFactory', 9 | #category : 'XML-Parser-Files', 10 | #package : 'XML-Parser', 11 | #tag : 'Files' 12 | } 13 | 14 | { #category : 'basic' } 15 | XMLFileReadStreamFactory class >> basicOnPath: aPathString [ 16 | self subclassResponsibility 17 | ] 18 | 19 | { #category : 'testing' } 20 | XMLFileReadStreamFactory class >> canBeImplemented [ 21 | ^ true 22 | ] 23 | 24 | { #category : 'finding' } 25 | XMLFileReadStreamFactory class >> noSupportedImplementationFound [ 26 | XMLFileException signal: 'File reading unsupported' 27 | ] 28 | 29 | { #category : 'instance creation' } 30 | XMLFileReadStreamFactory class >> onPath: aPathString [ 31 | ^ self implementation basicOnPath: aPathString 32 | ] 33 | 34 | { #category : 'defaults' } 35 | XMLFileReadStreamFactory class >> preferredImplementation [ 36 | ^ XMLStandardFileStreamReadStreamFactory 37 | ] 38 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLFileWriteStreamFactory.class.st: -------------------------------------------------------------------------------- 1 | " 2 | An abstract factory for file write streams used by XMLFileHandles. 3 | 4 | Subclasses should create write streams that do no automatic encoding and accept raw byte characters, so XMLParser can do its own encoding. 5 | " 6 | Class { 7 | #name : 'XMLFileWriteStreamFactory', 8 | #superclass : 'XMLAbstractFactory', 9 | #category : 'XML-Parser-Files', 10 | #package : 'XML-Parser', 11 | #tag : 'Files' 12 | } 13 | 14 | { #category : 'basic' } 15 | XMLFileWriteStreamFactory class >> basicOnPath: aPathString [ 16 | self subclassResponsibility 17 | ] 18 | 19 | { #category : 'testing' } 20 | XMLFileWriteStreamFactory class >> canBeImplemented [ 21 | ^ true 22 | ] 23 | 24 | { #category : 'finding' } 25 | XMLFileWriteStreamFactory class >> noSupportedImplementationFound [ 26 | XMLFileException signal: 'File writing unsupported' 27 | ] 28 | 29 | { #category : 'instance creation' } 30 | XMLFileWriteStreamFactory class >> onPath: aPathString [ 31 | ^ self implementation basicOnPath: aPathString 32 | ] 33 | 34 | { #category : 'defaults' } 35 | XMLFileWriteStreamFactory class >> preferredImplementation [ 36 | ^ XMLStandardFileStreamWriteStreamFactory 37 | ] 38 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLGeneralEntityDeclaration.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for general <!ENTITY> declarations. 3 | " 4 | Class { 5 | #name : 'XMLGeneralEntityDeclaration', 6 | #superclass : 'XMLEntityDeclaration', 7 | #instVars : [ 8 | 'ndata' 9 | ], 10 | #category : 'XML-Parser-DOM', 11 | #package : 'XML-Parser', 12 | #tag : 'DOM' 13 | } 14 | 15 | { #category : 'instance creation' } 16 | XMLGeneralEntityDeclaration class >> name: aName publicID: aPublicID systemID: aSystemID ndata: aNotationName [ 17 | ^ self new 18 | name: aName; 19 | publicID: aPublicID; 20 | systemID: aSystemID; 21 | ndata: aNotationName 22 | ] 23 | 24 | { #category : 'testing' } 25 | XMLGeneralEntityDeclaration >> isUnparsed [ 26 | ^ self ndata isNotEmpty 27 | ] 28 | 29 | { #category : 'accessing' } 30 | XMLGeneralEntityDeclaration >> ndata [ 31 | ^ ndata ifNil: [ndata := ''] 32 | ] 33 | 34 | { #category : 'accessing' } 35 | XMLGeneralEntityDeclaration >> ndata: aNotationName [ 36 | ndata := aNotationName 37 | ] 38 | 39 | { #category : 'printing' } 40 | XMLGeneralEntityDeclaration >> writeXMLOn: aWriter [ 41 | aWriter entityDeclaration 42 | name: self name; 43 | isParameter: false; 44 | replacement: self replacement; 45 | publicID: self publicID; 46 | systemID: self systemID; 47 | ndata: self ndata; 48 | write 49 | ] 50 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLHTTPException.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Invoked for HTTP errors. 3 | " 4 | Class { 5 | #name : 'XMLHTTPException', 6 | #superclass : 'XMLParserException', 7 | #category : 'XML-Parser-Exceptions', 8 | #package : 'XML-Parser', 9 | #tag : 'Exceptions' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLHTTPGZipDecompressingReadStreamAdapterFactory.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A read stram adapter factory for the GZip compression scheme. Uses GZipReadStream if available. 3 | " 4 | Class { 5 | #name : 'XMLHTTPGZipDecompressingReadStreamAdapterFactory', 6 | #superclass : 'XMLHTTPDecompressingReadStreamAdapterFactory', 7 | #category : 'XML-Parser-HTTP', 8 | #package : 'XML-Parser', 9 | #tag : 'HTTP' 10 | } 11 | 12 | { #category : 'accessing' } 13 | XMLHTTPGZipDecompressingReadStreamAdapterFactory class >> compressionScheme [ 14 | ^ 'gzip' 15 | ] 16 | 17 | { #category : 'accessing' } 18 | XMLHTTPGZipDecompressingReadStreamAdapterFactory class >> decompressingReadStreamAdapterClass [ 19 | ^ XMLClassFinder classNamed: #GZipReadStream 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLHTTPWebClientResponseContentReader.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A WebClient content reader. 3 | " 4 | Class { 5 | #name : 'XMLHTTPWebClientResponseContentReader', 6 | #superclass : 'XMLHTTPResponseContentReader', 7 | #category : 'XML-Parser-HTTP', 8 | #package : 'XML-Parser', 9 | #tag : 'HTTP' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLHTTPWebClientResponseContentReader >> handlesDecompression [ 14 | "this class needs to handle decompression, since it uses the lower-level 15 | WebClient #streamFrom:to:size:progress: interface" 16 | ^ true 17 | ] 18 | 19 | { #category : 'reading' } 20 | XMLHTTPWebClientResponseContentReader >> rawReadWithLength: aContentLength upToLimit: aMaxSize [ 21 | | socketStream rawContentWriteStream | 22 | 23 | (socketStream := response webClientResponse stream) binary. 24 | rawContentWriteStream := 25 | (ByteArray new: 26 | (aContentLength 27 | ifNil: [aMaxSize 28 | ifNil: [4096]])) writeStream. 29 | response webClientResponse 30 | streamFrom: socketStream 31 | to: rawContentWriteStream 32 | size: aContentLength 33 | progress: 34 | ((aContentLength isNil 35 | and: [aMaxSize isNotNil]) 36 | ifTrue: [ 37 | [:ignored :total | 38 | total > aMaxSize 39 | ifTrue: [self errorContentLimitExceeded]]] 40 | ifFalse: [nil]). 41 | ^ rawContentWriteStream contents. 42 | ] 43 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLHTTPZincResponseContentReader.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A Zinc content reader. Zinc handles decompression automatically, so this class doesn't. 3 | " 4 | Class { 5 | #name : 'XMLHTTPZincResponseContentReader', 6 | #superclass : 'XMLHTTPResponseContentReader', 7 | #category : 'XML-Parser-HTTP', 8 | #package : 'XML-Parser', 9 | #tag : 'HTTP' 10 | } 11 | 12 | { #category : 'reading' } 13 | XMLHTTPZincResponseContentReader >> rawReadWithLength: aContentLength upToLimit: aMaxSize [ 14 | ^ [| entityStream | 15 | entityStream := response zincResponse entity stream. 16 | ZnUtils 17 | readUpToEnd: entityStream 18 | limit: aMaxSize] 19 | on: ZnEntityTooLarge 20 | do: [:error | self errorContentLimitExceeded] 21 | ] 22 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLIDRefsAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates attributes with lists of ID ref values separated by spaces. 3 | " 4 | Class { 5 | #name : 'XMLIDRefsAttributeValidator', 6 | #superclass : 'XMLIDRefAttributeValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'defaults' } 13 | XMLIDRefsAttributeValidator class >> standaloneExternalClass [ 14 | ^ XMLStandaloneExternalIDRefsAttributeValidator 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLIDRefsAttributeValidator >> isIDRefs [ 19 | ^ true 20 | ] 21 | 22 | { #category : 'validating' } 23 | XMLIDRefsAttributeValidator >> validateAttributeDefaultValue: aDefaultValue [ 24 | self 25 | spaceSeparatedListValuesIn: aDefaultValue 26 | do: [:each | 27 | each isXMLName 28 | ifFalse: [self errorInvalidDefaultAttributeValue: aDefaultValue]] 29 | ] 30 | 31 | { #category : 'validating' } 32 | XMLIDRefsAttributeValidator >> validateAttributeValue: aValue [ 33 | self 34 | spaceSeparatedListValuesIn: aValue 35 | do: [:each | 36 | self elementIDValidator 37 | validateIDReference: each 38 | inAttribute: self attribute] 39 | ] 40 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLImplicitEncodingDetector.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for automatic encoding detection of streams that infers explicit encodings from a leading byte order mark (BOM) sequence and implicit encodings from a sequence of one or three null bytes before or after a leading ASCII character (implicit UTF 16/32). 3 | 4 | (It actually implements the YAML implicit encoding detection algorithm, looking for any leading ASCII char, not just '<', before or after a null byte sequence. This algorithm is more general than the XML one, supporting non-XML text, and since the XML one is in a ""(Non-Normative)"" section of the spec, we don't actually have to implement it.) 5 | " 6 | Class { 7 | #name : 'XMLImplicitEncodingDetector', 8 | #superclass : 'XMLEncodingDetector', 9 | #category : 'XML-Parser-Streams', 10 | #package : 'XML-Parser', 11 | #tag : 'Streams' 12 | } 13 | 14 | { #category : 'testing' } 15 | XMLImplicitEncodingDetector >> detectsImplicitEncodings [ 16 | ^ true 17 | ] 18 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLImplicitUTF16BigEndianStreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A stream converter for implicit big endian UTF-16 streams. 3 | " 4 | Class { 5 | #name : 'XMLImplicitUTF16BigEndianStreamConverter', 6 | #superclass : 'XMLUTF16BigEndianStreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLImplicitUTF16BigEndianStreamConverter class >> isImplicit [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLImplicitUTF16LittleEndianStreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A stream converter for implicit little endian UTF-16 streams. 3 | " 4 | Class { 5 | #name : 'XMLImplicitUTF16LittleEndianStreamConverter', 6 | #superclass : 'XMLUTF16LittleEndianStreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLImplicitUTF16LittleEndianStreamConverter class >> isImplicit [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLImplicitUTF32BigEndianStreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A stream converter for implicit big endian UTF-32 streams. 3 | " 4 | Class { 5 | #name : 'XMLImplicitUTF32BigEndianStreamConverter', 6 | #superclass : 'XMLUTF32BigEndianStreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLImplicitUTF32BigEndianStreamConverter class >> isImplicit [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLImplicitUTF32LittleEndianStreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A stream converter for implicit little endian UTF-32 streams. 3 | " 4 | Class { 5 | #name : 'XMLImplicitUTF32LittleEndianStreamConverter', 6 | #superclass : 'XMLUTF32LittleEndianStreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLImplicitUTF32LittleEndianStreamConverter class >> isImplicit [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLImplicitUTF8StreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A stream converter for implicit UTF-8 streams. 3 | " 4 | Class { 5 | #name : 'XMLImplicitUTF8StreamConverter', 6 | #superclass : 'XMLUTF8StreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLImplicitUTF8StreamConverter class >> isImplicit [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLInternalSubsetList.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class represents the list of nodes that comprise a document's internal DTD subset. 3 | " 4 | Class { 5 | #name : 'XMLInternalSubsetList', 6 | #superclass : 'XMLObservableList', 7 | #category : 'XML-Parser-DOM', 8 | #package : 'XML-Parser', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'private' } 13 | XMLInternalSubsetList >> afterAdding: aNode at: anIndex [ 14 | (aNode hasParentWithNodeList: self) 15 | ifTrue: [ 16 | self 17 | removeDuplicateOf: aNode 18 | notAt: anIndex] 19 | ifFalse: [ 20 | observer 21 | ifNotNil: [observer addedNode: aNode]] 22 | ] 23 | 24 | { #category : 'private' } 25 | XMLInternalSubsetList >> afterAddingLast: aNode [ 26 | (aNode hasParentWithNodeList: self) 27 | ifTrue: [ 28 | self 29 | removeDuplicateOf: aNode 30 | notAt: self size] 31 | ifFalse: [ 32 | observer 33 | ifNotNil: [observer addedNode: aNode]] 34 | ] 35 | 36 | { #category : 'private' } 37 | XMLInternalSubsetList >> afterAddingToCopyLast: aNode [ 38 | observer 39 | ifNotNil: [observer addedNode: aNode] 40 | ] 41 | 42 | { #category : 'private' } 43 | XMLInternalSubsetList >> afterRemoving: aNode [ 44 | observer ifNotNil: [observer removedNode: aNode] 45 | ] 46 | 47 | { #category : 'sorting' } 48 | XMLInternalSubsetList >> sort [ 49 | self sort: [:a :b | a sortKey <= b sortKey] 50 | ] 51 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLInternalSubsetState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A state for internal subset tokens. 3 | " 4 | Class { 5 | #name : 'XMLInternalSubsetState', 6 | #superclass : 'XMLDoctypeDeclarationState', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLInternalSubsetState >> isInternalSubsetState [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'tokenizing' } 18 | XMLInternalSubsetState >> nextTokenFrom: aTokenizer [ 19 | ^ aTokenizer nextInternalSubsetToken 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLLatin1StreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A stream converter for ISO Latin-1. 3 | " 4 | Class { 5 | #name : 'XMLLatin1StreamConverter', 6 | #superclass : 'XMLStatelessStreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'basic' } 13 | XMLLatin1StreamConverter class >> basicEncodingNames [ 14 | ^ #('Latin-1' 'Latin1' 15 | 'CP-819' 'CP819' 16 | 'IBM-819' 'IBM819' 17 | 'ISO-8859-1' 'ISO8859-1' 'ISO-88591' 'ISO88591' 18 | 'ISO-IR-100' 'ISOIR-100' 'ISO-IR100' 'ISOIR100' 19 | 'L1' 20 | 'csISOLatin1') 21 | ] 22 | 23 | { #category : 'decoding' } 24 | XMLLatin1StreamConverter >> nextFromStream: aStream [ 25 | | byte | 26 | 27 | aStream atEnd 28 | ifTrue: [^ nil]. 29 | (byte := aStream next asInteger) > 255 30 | ifTrue: [self errorBadCharacterValue: byte]. 31 | 32 | ^ byte asCharacter. 33 | ] 34 | 35 | { #category : 'encoding' } 36 | XMLLatin1StreamConverter >> nextPut: aCharacter toStream: aStream [ 37 | | codePoint | 38 | 39 | (codePoint := aCharacter asInteger) > 255 40 | ifTrue: [self errorBadCharacterValue: codePoint]. 41 | 42 | aStream nextPut: codePoint. 43 | ] 44 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLLazyNamespacedAttributeDictionary.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A lazy version of XMLNamespacedAttributeDictionary that uses less memory until it's modified. 3 | " 4 | Class { 5 | #name : 'XMLLazyNamespacedAttributeDictionary', 6 | #superclass : 'XMLLazyAttributeDictionary', 7 | #instVars : [ 8 | 'namespaceScope' 9 | ], 10 | #category : 'XML-Parser', 11 | #package : 'XML-Parser' 12 | } 13 | 14 | { #category : 'private' } 15 | XMLLazyNamespacedAttributeDictionary class >> emptyAttributeDictionaryClass [ 16 | ^ XMLNamespacedAttributeDictionary 17 | ] 18 | 19 | { #category : 'class initialization' } 20 | XMLLazyNamespacedAttributeDictionary class >> initialize [ 21 | "self initialize" 22 | 23 | self initializeEmptyAttributeDictionary 24 | ] 25 | 26 | { #category : 'private' } 27 | XMLLazyNamespacedAttributeDictionary >> copyEmptyAttributeDictionary [ 28 | ^ super copyEmptyAttributeDictionary setNamespaceScope: self namespaceScope 29 | ] 30 | 31 | { #category : 'private' } 32 | XMLLazyNamespacedAttributeDictionary >> namespaceScope [ 33 | ^ namespaceScope 34 | ifNil: [ 35 | namespaceScope := 36 | attributeDictionary == self emptyAttributeDictionary 37 | ifTrue: [XMLNamespaceScope new] 38 | ifFalse: [attributeDictionary namespaceScope]] 39 | ] 40 | 41 | { #category : 'initialization' } 42 | XMLLazyNamespacedAttributeDictionary >> setNamespaceScope: aNamespaceScope [ 43 | namespaceScope := aNamespaceScope 44 | ] 45 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLLimitException.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Invoked when a security limit on input is exceeded. Use the messages in XMLParserLimits and DTDExternalEntityLimits to configure these limits or the removeLimits message to remove them completely. 3 | " 4 | Class { 5 | #name : 'XMLLimitException', 6 | #superclass : 'XMLParserException', 7 | #category : 'XML-Parser-Exceptions', 8 | #package : 'XML-Parser', 9 | #tag : 'Exceptions' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLMutatingNodeVisitor.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a mutating node visitor that can remove nodes during enumeration by returning nil from a #visit* method, or replace a node by returning a new node other than the argument. 3 | " 4 | Class { 5 | #name : 'XMLMutatingNodeVisitor', 6 | #superclass : 'XMLNodeVisitor', 7 | #category : 'XML-Parser-DOM', 8 | #package : 'XML-Parser', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'visiting' } 13 | XMLMutatingNodeVisitor >> visitNodeWithElements: aNodeWithElements [ 14 | aNodeWithElements hasChildren 15 | ifTrue: [| oldNodes nodeIndexesToRemove | 16 | oldNodes := aNodeWithElements nodes. 17 | 1 to: oldNodes size do: [:i | | oldNode newNode | 18 | oldNode := oldNodes at: i. 19 | (newNode := oldNode acceptNodeVisitor: self) = oldNode 20 | ifFalse: [ 21 | newNode 22 | ifNil: [ 23 | "only initialize if needed" 24 | (nodeIndexesToRemove 25 | ifNil: [nodeIndexesToRemove := OrderedCollection new]) 26 | addLast: i] 27 | ifNotNil: [ 28 | "replace it" 29 | oldNodes 30 | at: i 31 | put: newNode]]]. 32 | nodeIndexesToRemove 33 | ifNotNil: [ 34 | nodeIndexesToRemove reverseDo: [:i | 35 | oldNodes removeAt: i]]]. 36 | ^ aNodeWithElements. 37 | ] 38 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLNFAAcceptingState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | An NFA in this state is considered to accept the input. 3 | " 4 | Class { 5 | #name : 'XMLNFAAcceptingState', 6 | #superclass : 'XMLNFAState', 7 | #category : 'XML-Parser-Validation-DFA', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-DFA' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLNFAAcceptingState >> isAccepting [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'printing' } 18 | XMLNFAAcceptingState >> printOn: aStream [ 19 | super printOn: aStream. 20 | 21 | aStream nextPut: $(. 22 | self printLabelOn: aStream. 23 | aStream nextPut: $). 24 | ] 25 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLNFAState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a base class for NFA states. 3 | " 4 | Class { 5 | #name : 'XMLNFAState', 6 | #superclass : 'Object', 7 | #instVars : [ 8 | 'lastAddedTo' 9 | ], 10 | #category : 'XML-Parser-Validation-DFA', 11 | #package : 'XML-Parser', 12 | #tag : 'Validation-DFA' 13 | } 14 | 15 | { #category : 'adding' } 16 | XMLNFAState >> addTo: aStateSet [ 17 | lastAddedTo == aStateSet 18 | ifFalse: [ 19 | "to detect and handle cycles" 20 | lastAddedTo := aStateSet. 21 | 22 | aStateSet add: self] 23 | ] 24 | 25 | { #category : 'converting' } 26 | XMLNFAState >> asDFAState [ 27 | | nfaStates | 28 | 29 | nfaStates := XMLNFAStateSet new. 30 | self addTo: nfaStates. 31 | ^ nfaStates asDFAState. 32 | ] 33 | 34 | { #category : 'connecting' } 35 | XMLNFAState >> connectToState: aState [ 36 | ] 37 | 38 | { #category : 'testing' } 39 | XMLNFAState >> isAccepting [ 40 | ^ false 41 | ] 42 | 43 | { #category : 'testing' } 44 | XMLNFAState >> matches: anObject [ 45 | ^ false 46 | ] 47 | 48 | { #category : 'enumerating' } 49 | XMLNFAState >> nextStatesDo: aBlock [ 50 | ] 51 | 52 | { #category : 'printing' } 53 | XMLNFAState >> printLabelOn: aStream [ 54 | aStream print: self identityHash 55 | ] 56 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLNamespaceException.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Invoked when namespaces are used improperly and namespace checking is on. 3 | " 4 | Class { 5 | #name : 'XMLNamespaceException', 6 | #superclass : 'XMLParserException', 7 | #category : 'XML-Parser-Exceptions', 8 | #package : 'XML-Parser', 9 | #tag : 'Exceptions' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLNamespacedAttributeDictionary.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This subclass is used when namespaces are enabled. It has an extra inst var for namespace scopes. 3 | " 4 | Class { 5 | #name : 'XMLNamespacedAttributeDictionary', 6 | #superclass : 'XMLAttributeDictionary', 7 | #instVars : [ 8 | 'namespaceScope' 9 | ], 10 | #category : 'XML-Parser', 11 | #package : 'XML-Parser' 12 | } 13 | 14 | { #category : 'private' } 15 | XMLNamespacedAttributeDictionary >> namespaceScope [ 16 | ^ namespaceScope ifNil: [namespaceScope := XMLNamespaceScope new] 17 | ] 18 | 19 | { #category : 'private' } 20 | XMLNamespacedAttributeDictionary >> resolvePrefix: aPrefix ifUnresolvable: aBlock [ 21 | ^ self namespaceScope 22 | resolvePrefix: aPrefix 23 | ifUnresolvable: aBlock 24 | ] 25 | 26 | { #category : 'initialization' } 27 | XMLNamespacedAttributeDictionary >> setNamespaceScope: aNamespaceScope [ 28 | namespaceScope := aNamespaceScope 29 | ] 30 | 31 | { #category : 'testing' } 32 | XMLNamespacedAttributeDictionary >> usesNamespaces [ 33 | ^ true 34 | ] 35 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLNmtokenAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates Nmtoken name attributes. 3 | " 4 | Class { 5 | #name : 'XMLNmtokenAttributeValidator', 6 | #superclass : 'XMLAttributeValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'defaults' } 13 | XMLNmtokenAttributeValidator class >> standaloneExternalClass [ 14 | ^ XMLStandaloneExternalNmtokenAttributeValidator 15 | ] 16 | 17 | { #category : 'private' } 18 | XMLNmtokenAttributeValidator >> errorInvalidNmtoken: aName [ 19 | XMLValidationException 20 | formatSignal: 'Invalid Nmtoken name "{1}" in attribute "{2}" of element <{3}>' 21 | with: aName 22 | with: self attribute 23 | with: self element 24 | ] 25 | 26 | { #category : 'testing' } 27 | XMLNmtokenAttributeValidator >> isNmtoken [ 28 | ^ true 29 | ] 30 | 31 | { #category : 'validating' } 32 | XMLNmtokenAttributeValidator >> validateAttributeDefaultValue: aDefaultValue [ 33 | aDefaultValue isXMLNmtoken 34 | ifFalse: [self errorInvalidDefaultAttributeValue: aDefaultValue] 35 | ] 36 | 37 | { #category : 'validating' } 38 | XMLNmtokenAttributeValidator >> validateAttributeValue: aValue [ 39 | self validateNmtoken: aValue 40 | ] 41 | 42 | { #category : 'validating' } 43 | XMLNmtokenAttributeValidator >> validateNmtoken: aName [ 44 | aName isXMLNmtoken 45 | ifFalse: [self errorInvalidNmtoken: aName] 46 | ] 47 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLNmtokensAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates attributes with lists of Nmtoken name values separated by spaces. 3 | " 4 | Class { 5 | #name : 'XMLNmtokensAttributeValidator', 6 | #superclass : 'XMLNmtokenAttributeValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'defaults' } 13 | XMLNmtokensAttributeValidator class >> standaloneExternalClass [ 14 | ^ XMLStandaloneExternalNmtokensAttributeValidator 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLNmtokensAttributeValidator >> isNmtokens [ 19 | ^ true 20 | ] 21 | 22 | { #category : 'validating' } 23 | XMLNmtokensAttributeValidator >> validateAttributeDefaultValue: aDefaultValue [ 24 | self 25 | spaceSeparatedListValuesIn: aDefaultValue 26 | do: [:each | 27 | each isXMLNmtoken 28 | ifFalse: [self errorInvalidDefaultAttributeValue: aDefaultValue]] 29 | ] 30 | 31 | { #category : 'validating' } 32 | XMLNmtokensAttributeValidator >> validateAttributeValue: aValue [ 33 | self 34 | spaceSeparatedListValuesIn: aValue 35 | do: [:each | self validateNmtoken: each] 36 | ] 37 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLNodeContentWriteStreamAdapter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A write stream adapter for writing node content with whitespace insertion if needed between writes. 3 | " 4 | Class { 5 | #name : 'XMLNodeContentWriteStreamAdapter', 6 | #superclass : 'XMLWriteStreamAdapter', 7 | #instVars : [ 8 | 'lastChar' 9 | ], 10 | #category : 'XML-Parser-Streams', 11 | #package : 'XML-Parser', 12 | #tag : 'Streams' 13 | } 14 | 15 | { #category : 'private' } 16 | XMLNodeContentWriteStreamAdapter >> insertSpaceBefore: aCharacter [ 17 | (lastChar == nil 18 | or: [lastChar isXMLWhitespace 19 | or: [aCharacter isXMLWhitespace]]) 20 | ifFalse: [stream nextPut: SpaceCharacter] 21 | ] 22 | 23 | { #category : 'accessing' } 24 | XMLNodeContentWriteStreamAdapter >> nextPut: aCharacter [ 25 | self insertSpaceBefore: aCharacter. 26 | stream nextPut: aCharacter. 27 | ^ lastChar := aCharacter. 28 | ] 29 | 30 | { #category : 'accessing' } 31 | XMLNodeContentWriteStreamAdapter >> nextPutAll: aString [ 32 | aString size > 0 "optimization" 33 | ifTrue: [ 34 | self insertSpaceBefore: aString first. 35 | stream nextPutAll: aString. 36 | lastChar := aString last]. 37 | ^ aString. 38 | ] 39 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLNullStreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A stream converter that does no encoding or decoding. 3 | " 4 | Class { 5 | #name : 'XMLNullStreamConverter', 6 | #superclass : 'XMLStatelessStreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLNullStreamConverter >> isNull [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'decoding' } 18 | XMLNullStreamConverter >> nextFromStream: aStream [ 19 | aStream atEnd 20 | ifTrue: [^ nil] 21 | ifFalse: [^ aStream next asCharacter] 22 | ] 23 | 24 | { #category : 'encoding' } 25 | XMLNullStreamConverter >> nextPut: aCharacter toStream: aStream [ 26 | aStream nextPut: aCharacter asInteger 27 | ] 28 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPI.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class represents a processing instruction node. 3 | " 4 | Class { 5 | #name : 'XMLPI', 6 | #superclass : 'XMLNode', 7 | #instVars : [ 8 | 'target', 9 | 'data' 10 | ], 11 | #category : 'XML-Parser-DOM', 12 | #package : 'XML-Parser', 13 | #tag : 'DOM' 14 | } 15 | 16 | { #category : 'instance creation' } 17 | XMLPI class >> target: aTargetString data: aDataString [ 18 | ^ self new 19 | target: aTargetString; 20 | data: aDataString 21 | ] 22 | 23 | { #category : 'visiting' } 24 | XMLPI >> acceptNodeVisitor: aNodeVisitor [ 25 | ^ aNodeVisitor visitPI: self 26 | ] 27 | 28 | { #category : 'accessing' } 29 | XMLPI >> data [ 30 | ^ data ifNil: [data := ''] 31 | ] 32 | 33 | { #category : 'accessing' } 34 | XMLPI >> data: aString [ 35 | data := aString 36 | ] 37 | 38 | { #category : 'testing' } 39 | XMLPI >> hasData [ 40 | ^ self data isNotEmpty 41 | ] 42 | 43 | { #category : 'testing' } 44 | XMLPI >> isPI [ 45 | ^ true 46 | ] 47 | 48 | { #category : 'accessing' } 49 | XMLPI >> sortKey [ 50 | ^ self target 51 | ] 52 | 53 | { #category : 'accessing' } 54 | XMLPI >> target [ 55 | ^ target ifNil: [target := ''] 56 | ] 57 | 58 | { #category : 'accessing' } 59 | XMLPI >> target: aString [ 60 | target := aString 61 | ] 62 | 63 | { #category : 'printing' } 64 | XMLPI >> writeXMLOn: aWriter [ 65 | aWriter pi 66 | target: self target; 67 | data: self data; 68 | write 69 | ] 70 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLParameterEntityDeclaration.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a class for parameter <!ENTITY> declarations. 3 | " 4 | Class { 5 | #name : 'XMLParameterEntityDeclaration', 6 | #superclass : 'XMLEntityDeclaration', 7 | #category : 'XML-Parser-DOM', 8 | #package : 'XML-Parser', 9 | #tag : 'DOM' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLParameterEntityDeclaration >> isParameter [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'printing' } 18 | XMLParameterEntityDeclaration >> writeXMLOn: aWriter [ 19 | aWriter entityDeclaration 20 | name: self name; 21 | isParameter: true; 22 | replacement: self replacement; 23 | publicID: self publicID; 24 | systemID: self systemID; 25 | write 26 | ] 27 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLParsingInterruptException.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Used to interrupt parsing from a SAXHandler. Will be silently caught. 3 | " 4 | Class { 5 | #name : 'XMLParsingInterruptException', 6 | #superclass : 'XMLParserException', 7 | #category : 'XML-Parser-Exceptions', 8 | #package : 'XML-Parser', 9 | #tag : 'Exceptions' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLParsingInterruptException >> shouldPassOnWhenCaught [ 14 | ^ false 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPercentDecodingReadStreamAdapter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class percent decodes octets for URIs. 3 | " 4 | Class { 5 | #name : 'XMLPercentDecodingReadStreamAdapter', 6 | #superclass : 'XMLReadStreamAdapter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLPercentDecodingReadStreamAdapter >> atEnd [ 14 | ^ stream atEnd 15 | or: [stream peek ~~ $%] 16 | ] 17 | 18 | { #category : 'testing' } 19 | XMLPercentDecodingReadStreamAdapter >> isBinary [ 20 | "this stream is binary, because it reads percent-encoded octets 21 | character sequences like '%HH' and returns the octet values as 22 | SmallIntegers" 23 | ^ true 24 | ] 25 | 26 | { #category : 'accessing' } 27 | XMLPercentDecodingReadStreamAdapter >> next [ 28 | | byte | 29 | 30 | (stream atEnd not 31 | and: [stream peek == $%]) 32 | ifTrue: [ 33 | stream next. 34 | byte := 35 | (XMLSmallIntegerReader 36 | readFrom: stream 37 | withBase: 16 38 | upToLimit: 2) 39 | ifNil: [37] "$% asciiValue"]. 40 | ^ byte. 41 | ] 42 | 43 | { #category : 'accessing' } 44 | XMLPercentDecodingReadStreamAdapter >> peek [ 45 | | byte | 46 | 47 | stream atEnd 48 | ifFalse: [| oldPosition | 49 | oldPosition := stream position. 50 | byte := self next. 51 | stream position: oldPosition]. 52 | ^ byte. 53 | ] 54 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPercentEncodingWriteStreamAdapter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A write stream adapter for percent encoding octets for URIs. 3 | " 4 | Class { 5 | #name : 'XMLPercentEncodingWriteStreamAdapter', 6 | #superclass : 'XMLWriteStreamAdapter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLPercentEncodingWriteStreamAdapter >> isBinary [ 14 | "this stream is binary, because it accepts binary octet values 15 | and percent-encodes them as '%HH' character sequences" 16 | ^ true 17 | ] 18 | 19 | { #category : 'accessing' } 20 | XMLPercentEncodingWriteStreamAdapter >> nextPut: anObject [ 21 | | byte | 22 | 23 | stream nextPut: $%. 24 | 25 | "pad it if needed" 26 | (byte := anObject asInteger) < 16r10 27 | ifTrue: [stream nextPut: $0]. 28 | 29 | "On GS, #printOn:base: shows the radix, so #printOn:base:showRadix: 30 | is used instead" 31 | byte 32 | printOn: stream 33 | base: 16 34 | showRadix: false. 35 | ^ anObject. 36 | ] 37 | 38 | { #category : 'accessing' } 39 | XMLPercentEncodingWriteStreamAdapter >> nextPutAll: aCollection [ 40 | "can't use #to:do: here because other #nextPutAll: implementations 41 | support non-sequenceable collection arguments wtih #do:" 42 | aCollection do: [:each | 43 | self nextPut: each]. 44 | ^ aCollection. 45 | ] 46 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPharoFileReferenceReadStreamFactory.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A StandardFileStream read stream factory. This stream is preferred for Squeak/Pharo because it does no decoding and returns byte characters so XMLParser can do its own decoding. 3 | " 4 | Class { 5 | #name : 'XMLPharoFileReferenceReadStreamFactory', 6 | #superclass : 'XMLFileReadStreamFactory', 7 | #category : 'XML-Parser-Files', 8 | #package : 'XML-Parser', 9 | #tag : 'Files' 10 | } 11 | 12 | { #category : 'basic' } 13 | XMLPharoFileReferenceReadStreamFactory class >> basicOnPath: aPathString [ 14 | ^ aPathString asFileReference ensureCreateFile binaryReadStream 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLPharoFileReferenceReadStreamFactory class >> isSupportedImplementation [ 19 | ^ XMLClassFinder hasClassNamed: #ZnBufferedReadStream 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPharoFileReferenceWriteStreamFactory.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A StandardFileStream write stream factory. This stream is preferred for Pharo/Squeak because it does no encoding and accepts byte characters so XMLParser can do its own encoding. 3 | " 4 | Class { 5 | #name : 'XMLPharoFileReferenceWriteStreamFactory', 6 | #superclass : 'XMLFileWriteStreamFactory', 7 | #category : 'XML-Parser-Files', 8 | #package : 'XML-Parser', 9 | #tag : 'Files' 10 | } 11 | 12 | { #category : 'basic' } 13 | XMLPharoFileReferenceWriteStreamFactory class >> basicOnPath: aPathString [ 14 | ^ aPathString asFileReference ensureCreateFile binaryWriteStream 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLPharoFileReferenceWriteStreamFactory class >> isSupportedImplementation [ 19 | ^ XMLClassFinder hasClassNamed: #ZnBufferedWriteStream 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPluggableAttributeSpec.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A block-based pluggable attribute spec that evaluates blocks with the attribute dictionary to test matching. 3 | " 4 | Class { 5 | #name : 'XMLPluggableAttributeSpec', 6 | #superclass : 'XMLAttributeSpec', 7 | #instVars : [ 8 | 'block' 9 | ], 10 | #category : 'XML-Parser-Utils', 11 | #package : 'XML-Parser', 12 | #tag : 'Utils' 13 | } 14 | 15 | { #category : 'generated' } 16 | XMLPluggableAttributeSpec class >> block: aOneArgumentBlock [ 17 | ^ self new block: aOneArgumentBlock 18 | ] 19 | 20 | { #category : 'accessing' } 21 | XMLPluggableAttributeSpec >> block [ 22 | ^ block 23 | ] 24 | 25 | { #category : 'accessing' } 26 | XMLPluggableAttributeSpec >> block: aOneArgumentBlock [ 27 | block := aOneArgumentBlock 28 | ] 29 | 30 | { #category : 'matching' } 31 | XMLPluggableAttributeSpec >> matchesAttributes: anAttributeDictionary [ 32 | "if there's no block, then it automatically matches, similar to an 33 | XMLBasicAttributeSpec with no attributes" 34 | block 35 | ifNil: [^ true] 36 | ifNotNil: [^ block value: anAttributeDictionary] 37 | ] 38 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPostDoctypeDeclarationState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A state for parsing prolog tokens after <!DOCTYPE ...> declarations. 3 | " 4 | Class { 5 | #name : 'XMLPostDoctypeDeclarationState', 6 | #superclass : 'XMLPrologState', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLPostDoctypeDeclarationState >> isPostDoctypeDeclarationState [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPrologState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A state for prolog tokens. 3 | " 4 | Class { 5 | #name : 'XMLPrologState', 6 | #superclass : 'XMLTokenizerState', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLPrologState >> canTerminateInput [ 14 | ^ false 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLPrologState >> isPrologState [ 19 | ^ true 20 | ] 21 | 22 | { #category : 'tokenizing' } 23 | XMLPrologState >> nextTokenFrom: aTokenizer [ 24 | ^ aTokenizer nextPrologToken 25 | ] 26 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPushedBackExternalStream.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A class to store a nested external stream for XMLNestedStreamReader. 3 | " 4 | Class { 5 | #name : 'XMLPushedBackExternalStream', 6 | #superclass : 'XMLPushedBackStream', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLPushedBackExternalStream >> isExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPushedBackInternalStream.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A class to store a nested internal stream for XMLNestedStreamReader. It reports the current position, line number, and line start position of its enclosing external stream. 3 | " 4 | Class { 5 | #name : 'XMLPushedBackInternalStream', 6 | #superclass : 'XMLPushedBackStream', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLPushedBackParameterEntity.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A class to decorate pushed-back parameter entities to keep track of the nesting of include sections within entity replacements. 3 | " 4 | Class { 5 | #name : 'XMLPushedBackParameterEntity', 6 | #superclass : 'XMLPushedBackEntity', 7 | #instVars : [ 8 | 'totalOpenIncludeSections' 9 | ], 10 | #category : 'XML-Parser-Drivers', 11 | #package : 'XML-Parser', 12 | #tag : 'Drivers' 13 | } 14 | 15 | { #category : 'nesting' } 16 | XMLPushedBackParameterEntity >> endIncludeSection [ 17 | totalOpenIncludeSections := self totalOpenIncludeSections - 1 18 | ] 19 | 20 | { #category : 'nesting' } 21 | XMLPushedBackParameterEntity >> poppedByTokenizer: aTokenizer [ 22 | totalOpenIncludeSections 23 | ifNotNil: [ 24 | totalOpenIncludeSections = 0 25 | ifFalse: [aTokenizer driver handleImproperParameterEntityNesting]] 26 | ] 27 | 28 | { #category : 'nesting' } 29 | XMLPushedBackParameterEntity >> startIncludeSection [ 30 | totalOpenIncludeSections := self totalOpenIncludeSections + 1 31 | ] 32 | 33 | { #category : 'accessing' } 34 | XMLPushedBackParameterEntity >> totalOpenIncludeSections [ 35 | ^ totalOpenIncludeSections ifNil: [totalOpenIncludeSections := 0] 36 | ] 37 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLReentrantMutex.class.st: -------------------------------------------------------------------------------- 1 | " 2 | An abstract class for reentrant mutexes that support nested sends of #critical: by the same process without deadlocking. 3 | " 4 | Class { 5 | #name : 'XMLReentrantMutex', 6 | #superclass : 'XMLAbstractFactory', 7 | #category : 'XML-Parser-Utils', 8 | #package : 'XML-Parser', 9 | #tag : 'Utils' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLReentrantMutex class >> canBeImplemented [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'finding' } 18 | XMLReentrantMutex class >> noSupportedImplementationFound [ 19 | Error signal: 'No supported reentrant mutex class available' 20 | ] 21 | 22 | { #category : 'defaults' } 23 | XMLReentrantMutex class >> preferredImplementation [ 24 | "Prefer the Pharo/Squeak Mutex-based implementation" 25 | ^ XMLStandardReentrantMutex 26 | ] 27 | 28 | { #category : 'mutual exclusion' } 29 | XMLReentrantMutex >> critical: aBlock [ 30 | self subclassResponsibility 31 | ] 32 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLSmallIntegerReader.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class reads positive hex or decimal integers up to the maximum a SmallInteger can hold from minimal streams supporting #next, #peek, and #atEnd, handling overflow with saturation. It returns nil instead of raising errors for invalid integers. 3 | " 4 | Class { 5 | #name : 'XMLSmallIntegerReader', 6 | #superclass : 'XMLIntegerReader', 7 | #classVars : [ 8 | 'SmallIntegerMaxValue' 9 | ], 10 | #category : 'XML-Parser-Utils', 11 | #package : 'XML-Parser', 12 | #tag : 'Utils' 13 | } 14 | 15 | { #category : 'class initialization' } 16 | XMLSmallIntegerReader class >> initialize [ 17 | "self initialize" 18 | 19 | SmallIntegerMaxValue := SmallInteger maxVal 20 | ] 21 | 22 | { #category : 'defaults' } 23 | XMLSmallIntegerReader class >> maxIntegerValue [ 24 | ^ SmallIntegerMaxValue 25 | ] 26 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalAttributeFixedValueDefaultValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class will make sure the value of a standalone externally defined attribute is present and that it matches a fixed default value (the #FIXED constraint). 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalAttributeFixedValueDefaultValidator', 6 | #superclass : 'XMLAttributeFixedValueDefaultValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'private' } 13 | XMLStandaloneExternalAttributeFixedValueDefaultValidator >> errorStandaloneExternalAttributeDefaultFixedValueUsed [ 14 | XMLValidationException 15 | formatSignal: 16 | 'Externally defined attribute "{1}" fixed default value ', 17 | 'cannot be used by elements when standalone="yes"' 18 | with: self attribute 19 | ] 20 | 21 | { #category : 'validating' } 22 | XMLStandaloneExternalAttributeFixedValueDefaultValidator >> validatedDefaultForAbsentAttributeValue [ 23 | self errorStandaloneExternalAttributeDefaultFixedValueUsed 24 | ] 25 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalAttributeValueDefaultValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class will make sure the value of a standalone externally defined attribute is present (the default value is never used). 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalAttributeValueDefaultValidator', 6 | #superclass : 'XMLAttributeValueDefaultValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'private' } 13 | XMLStandaloneExternalAttributeValueDefaultValidator >> errorStandaloneExternalAttributeDefaultValueUsed [ 14 | XMLValidationException 15 | formatSignal: 16 | 'Externally defined attribute "{1}" default value ', 17 | 'cannot be used by elements when standalone="yes"' 18 | with: self attribute 19 | ] 20 | 21 | { #category : 'validating' } 22 | XMLStandaloneExternalAttributeValueDefaultValidator >> validatedDefaultForAbsentAttributeValue [ 23 | self errorStandaloneExternalAttributeDefaultValueUsed 24 | ] 25 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalCDataAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates standalone externally defined CDATA attributes. It disallows attributes that need substitution with default or fixed default values. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalCDataAttributeValidator', 6 | #superclass : 'XMLCDataAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalCDataAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalDFAElementContentElementValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates standalone externally defined elements with element content that cannot have whitespace between elements unlike the superclass. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalDFAElementContentElementValidator', 6 | #superclass : 'XMLDFAElementContentElementValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalDFAElementContentElementValidator >> ignoresWhitespace [ 14 | ^ false 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalEntitiesAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates standalone externally defined attributes with lists of unparsed entity name values (that must be declared) separated by spaces. It disallows attributes that require further value normalization or substitution with default or fixed default values. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalEntitiesAttributeValidator', 6 | #superclass : 'XMLEntitiesAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalEntitiesAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalEntityAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates standalone externally defined attributes that contain unparsed entity names (that must be declared). It disallows attributes that require further value normalization or substitution with default or fixed default values. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalEntityAttributeValidator', 6 | #superclass : 'XMLEntityAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalEntityAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalEnumerationAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates attributes that can have any value taken from a list like ""(one|two|thee)"". It disallows attributes that require further value normalization or substitution with default or fixed default values. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalEnumerationAttributeValidator', 6 | #superclass : 'XMLEnumerationAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalEnumerationAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalIDAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates standalone externally defined ID attributes that must have unique (not repeated in the same document) values. It disallows attributes that require further value normalization. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalIDAttributeValidator', 6 | #superclass : 'XMLIDAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalIDAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalIDRefAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates standalone externally defined attributes that refer to an ID of another element with an ID attribute. It disallows attributes that require further value normalization or substitution with default or fixed default values. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalIDRefAttributeValidator', 6 | #superclass : 'XMLIDRefAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalIDRefAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalIDRefsAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates standalone externally defined attributes with lists of ID ref values separated by spaces. It disallows attributes that require further value normalization or substitution with default or fixed default values. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalIDRefsAttributeValidator', 6 | #superclass : 'XMLIDRefsAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalIDRefsAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalNmtokenAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates standalone externally defined Nmtoken name attributes. It disallows attributes that require further value normalization or substitution with default or fixed default values. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalNmtokenAttributeValidator', 6 | #superclass : 'XMLNmtokenAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalNmtokenAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalNmtokensAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates standalone externally defined attributes with lists of Nmtoken name values separated by spaces. It disallows attributes that require further value normalization or substitution with default or fixed default values. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalNmtokensAttributeValidator', 6 | #superclass : 'XMLNmtokensAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalNmtokensAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalNotationEnumerationAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates attributes that can have NOTATION names from a list as values. It disallows attributes that require further value normalization or substitution with default or fixed default values. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalNotationEnumerationAttributeValidator', 6 | #superclass : 'XMLNotationEnumerationAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalNotationEnumerationAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandaloneExternalXMLIDAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates standalone externally defined xml:id ID attributes. It disallows attributes that require further value normalization. 3 | " 4 | Class { 5 | #name : 'XMLStandaloneExternalXMLIDAttributeValidator', 6 | #superclass : 'XMLXMLIDAttributeValidator', 7 | #category : 'XML-Parser-Validation-Standalone', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation-Standalone' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandaloneExternalXMLIDAttributeValidator >> isStandaloneExternal [ 14 | ^ true 15 | ] 16 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandardFileStreamReadStreamFactory.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A StandardFileStream read stream factory. This stream is preferred for Squeak/Pharo because it does no decoding and returns byte characters so XMLParser can do its own decoding. 3 | " 4 | Class { 5 | #name : 'XMLStandardFileStreamReadStreamFactory', 6 | #superclass : 'XMLFileReadStreamFactory', 7 | #category : 'XML-Parser-Files', 8 | #package : 'XML-Parser', 9 | #tag : 'Files' 10 | } 11 | 12 | { #category : 'basic' } 13 | XMLStandardFileStreamReadStreamFactory class >> basicOnPath: aPathString [ 14 | ^ ((XMLClassFinder classNamed: #StandardFileStream) 15 | readOnlyFileNamed: aPathString) 16 | binary; 17 | yourself 18 | ] 19 | 20 | { #category : 'testing' } 21 | XMLStandardFileStreamReadStreamFactory class >> isSupportedImplementation [ 22 | ^ XMLClassFinder hasClassNamed: #StandardFileStream 23 | ] 24 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandardFileStreamWriteStreamFactory.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A StandardFileStream write stream factory. This stream is preferred for Pharo/Squeak because it does no encoding and accepts byte characters so XMLParser can do its own encoding. 3 | " 4 | Class { 5 | #name : 'XMLStandardFileStreamWriteStreamFactory', 6 | #superclass : 'XMLFileWriteStreamFactory', 7 | #category : 'XML-Parser-Files', 8 | #package : 'XML-Parser', 9 | #tag : 'Files' 10 | } 11 | 12 | { #category : 'basic' } 13 | XMLStandardFileStreamWriteStreamFactory class >> basicOnPath: aPathString [ 14 | "use forceNewFileNamed: to ensure truncation of existing files before writing" 15 | ^ ((XMLClassFinder classNamed: #StandardFileStream) 16 | forceNewFileNamed: aPathString) 17 | binary; 18 | yourself 19 | ] 20 | 21 | { #category : 'testing' } 22 | XMLStandardFileStreamWriteStreamFactory class >> isSupportedImplementation [ 23 | ^ XMLClassFinder hasClassNamed: #StandardFileStream 24 | ] 25 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandardKeyValueCache.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class is the standard key-value cache implementation used on Pharo/Squeak. 3 | " 4 | Class { 5 | #name : 'XMLStandardKeyValueCache', 6 | #superclass : 'XMLKeyValueCache', 7 | #category : 'XML-Parser-Utils', 8 | #package : 'XML-Parser', 9 | #tag : 'Utils' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStandardKeyValueCache class >> isSupportedImplementation [ 14 | "need some type of reentrant mutex" 15 | XMLReentrantMutex hasSupportedImplementation 16 | ifFalse: [^ false]. 17 | 18 | "MUST use the transient class on GS to avoid persisting and causing 19 | write conflicts" 20 | XMLClassFinder 21 | classNamed: #XMLTransientKeyValueCache 22 | ifPresent: [:transientKeyValueCacheClass | 23 | transientKeyValueCacheClass isSupportedImplementation 24 | ifTrue: [^ false]]. 25 | 26 | ^ true. 27 | ] 28 | 29 | { #category : 'accessing' } 30 | XMLStandardKeyValueCache >> collection [ 31 | ^ collection 32 | ] 33 | 34 | { #category : 'initialization' } 35 | XMLStandardKeyValueCache >> setCollection: aKeyValueCollection [ 36 | collection := aKeyValueCollection 37 | ] 38 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStandardReentrantMutex.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class is the standard implementation that uses Pharo and Squeak's Mutex class to implement a reentrant mutex. 3 | " 4 | Class { 5 | #name : 'XMLStandardReentrantMutex', 6 | #superclass : 'XMLReentrantMutex', 7 | #instVars : [ 8 | 'mutex' 9 | ], 10 | #category : 'XML-Parser-Utils', 11 | #package : 'XML-Parser', 12 | #tag : 'Utils' 13 | } 14 | 15 | { #category : 'testing' } 16 | XMLStandardReentrantMutex class >> isSupportedImplementation [ 17 | (XMLClassFinder hasClassNamed: #Mutex) 18 | ifFalse: [^ false]. 19 | 20 | "MUST use the transient class on GS to avoid persisting and causing 21 | write conflicts" 22 | XMLClassFinder 23 | classNamed: #XMLTransientReentrantMutex 24 | ifPresent: [:transientReentrantMutexClass | 25 | transientReentrantMutexClass isSupportedImplementation 26 | ifTrue: [^ false]]. 27 | 28 | ^ true. 29 | ] 30 | 31 | { #category : 'mutual exclusion' } 32 | XMLStandardReentrantMutex >> critical: aBlock [ 33 | ^ mutex critical: aBlock 34 | ] 35 | 36 | { #category : 'initialization' } 37 | XMLStandardReentrantMutex >> initialize [ 38 | super initialize. 39 | 40 | mutex := (XMLClassFinder classNamed: #Mutex) new. 41 | ] 42 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStatelessStreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This is a base class for stateless, immutable stream converter classes. Each subclass has a single instance that is shared. 3 | " 4 | Class { 5 | #name : 'XMLStatelessStreamConverter', 6 | #superclass : 'XMLStreamConverter', 7 | #classInstVars : [ 8 | 'instance' 9 | ], 10 | #category : 'XML-Parser-Streams', 11 | #package : 'XML-Parser', 12 | #tag : 'Streams' 13 | } 14 | 15 | { #category : 'defaults' } 16 | XMLStatelessStreamConverter class >> abstractClass [ 17 | ^ XMLStatelessStreamConverter 18 | ] 19 | 20 | { #category : 'accessing' } 21 | XMLStatelessStreamConverter class >> instance [ 22 | ^ instance ifNil: [instance := self basicNew initialize] 23 | ] 24 | 25 | { #category : 'instance creation' } 26 | XMLStatelessStreamConverter class >> new [ 27 | "all subclasses are stateless and have a single, immutable, shared instance" 28 | ^ self instance 29 | ] 30 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStringReadStreamAdapter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A read stream adapter for string read streams that accepts character input and converts it to binary output. 3 | " 4 | Class { 5 | #name : 'XMLStringReadStreamAdapter', 6 | #superclass : 'XMLReadStreamAdapter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLStringReadStreamAdapter >> isBinary [ 14 | "this stream is binary, because it converts characters to integers" 15 | ^ true 16 | ] 17 | 18 | { #category : 'accessing' } 19 | XMLStringReadStreamAdapter >> next [ 20 | stream atEnd 21 | ifTrue: [^ nil] 22 | ifFalse: [^ stream next asInteger] 23 | ] 24 | 25 | { #category : 'accessing' } 26 | XMLStringReadStreamAdapter >> peek [ 27 | stream atEnd 28 | ifTrue: [^ nil] 29 | ifFalse: [^ stream peek asInteger] 30 | ] 31 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLStringWriteStreamAdapter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A write stream adapter that accepts binary input and converts it to character output for string write streams. 3 | " 4 | Class { 5 | #name : 'XMLStringWriteStreamAdapter', 6 | #superclass : 'XMLWriteStreamAdapter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'accessing' } 13 | XMLStringWriteStreamAdapter >> nextPut: anObject [ 14 | stream nextPut: anObject asCharacter 15 | ] 16 | 17 | { #category : 'accessing' } 18 | XMLStringWriteStreamAdapter >> nextPutAll: aCollection [ 19 | "can't use #to:do: here because other #nextPutAll: implementations 20 | support non-sequenceable collection arguments wtih #do:" 21 | aCollection do: [:each | 22 | stream nextPut: each asCharacter]. 23 | ^ aCollection. 24 | ] 25 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLTerminatedState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A state for when tokenizing has stopped. 3 | " 4 | Class { 5 | #name : 'XMLTerminatedState', 6 | #superclass : 'XMLTokenizerState', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLTerminatedState >> isTerminatedState [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'tokenizing' } 18 | XMLTerminatedState >> nextTokenFrom: aTokenizer [ 19 | ^ aTokenizer nextEndDocument 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLUTF16BigEndianStreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A stream converter for big endian UTF-16 streams, and the default converter class used when a UTF-16 stream converter is created with newForEncoding: or asXMLStreamConverter and no endian is specified by the encoding name. 3 | " 4 | Class { 5 | #name : 'XMLUTF16BigEndianStreamConverter', 6 | #superclass : 'XMLUTF16StreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'basic' } 13 | XMLUTF16BigEndianStreamConverter class >> basicByteOrderMarkBytes [ 14 | ^ #[16rFE 16rFF] 15 | ] 16 | 17 | { #category : 'basic' } 18 | XMLUTF16BigEndianStreamConverter class >> basicEncodingNames [ 19 | ^ #('UTF-16' 'UTF16' 20 | 'UTF-16-BE' 'UTF16-BE' 'UTF-16BE' 'UTF16BE') 21 | ] 22 | 23 | { #category : 'testing' } 24 | XMLUTF16BigEndianStreamConverter >> isBigEndian [ 25 | ^ true 26 | ] 27 | 28 | { #category : 'basic' } 29 | XMLUTF16BigEndianStreamConverter >> nextPutTwoBytes: anInteger toStream: aStream [ 30 | aStream 31 | nextPut: ((anInteger bitShift: -8) bitAnd: 16rFF); 32 | nextPut: (anInteger bitAnd: 16rFF) 33 | ] 34 | 35 | { #category : 'basic' } 36 | XMLUTF16BigEndianStreamConverter >> nextTwoBytesFromStream: aStream [ 37 | | firstByte | 38 | 39 | firstByte := aStream next asInteger bitShift: 8. 40 | 41 | aStream atEnd 42 | ifTrue: [self errorBadCharacterEncoding]. 43 | ^ firstByte + aStream next asInteger. 44 | ] 45 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLUTF16LittleEndianStreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A stream converter for little endian UTF-16 streams. 3 | " 4 | Class { 5 | #name : 'XMLUTF16LittleEndianStreamConverter', 6 | #superclass : 'XMLUTF16StreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'basic' } 13 | XMLUTF16LittleEndianStreamConverter class >> basicByteOrderMarkBytes [ 14 | ^ #[16rFF 16rFE] 15 | ] 16 | 17 | { #category : 'basic' } 18 | XMLUTF16LittleEndianStreamConverter class >> basicEncodingNames [ 19 | ^ #('UTF-16-LE' 'UTF16-LE' 'UTF-16LE' 'UTF16LE') 20 | ] 21 | 22 | { #category : 'testing' } 23 | XMLUTF16LittleEndianStreamConverter >> isBigEndian [ 24 | ^ false 25 | ] 26 | 27 | { #category : 'basic' } 28 | XMLUTF16LittleEndianStreamConverter >> nextPutTwoBytes: anInteger toStream: aStream [ 29 | aStream 30 | nextPut: (anInteger bitAnd: 16rFF); 31 | nextPut: ((anInteger bitShift: -8) bitAnd: 16rFF) 32 | ] 33 | 34 | { #category : 'basic' } 35 | XMLUTF16LittleEndianStreamConverter >> nextTwoBytesFromStream: aStream [ 36 | | firstByte | 37 | 38 | firstByte := aStream next asInteger. 39 | 40 | aStream atEnd 41 | ifTrue: [self errorBadCharacterEncoding]. 42 | ^ firstByte + (aStream next asInteger bitShift: 8). 43 | ] 44 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLUTFStreamConverter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | An abstract class for Unicode stream converters. 3 | " 4 | Class { 5 | #name : 'XMLUTFStreamConverter', 6 | #superclass : 'XMLStatelessStreamConverter', 7 | #category : 'XML-Parser-Streams', 8 | #package : 'XML-Parser', 9 | #tag : 'Streams' 10 | } 11 | 12 | { #category : 'defaults' } 13 | XMLUTFStreamConverter class >> abstractClass [ 14 | ^ XMLUTFStreamConverter 15 | ] 16 | 17 | { #category : 'private' } 18 | XMLUTFStreamConverter >> errorBadCharacterValue: aValue [ 19 | XMLEncodingException 20 | formatSignal: 'Invalid {1} code point U+{1}' 21 | with: self encoding 22 | with: aValue printStringHex 23 | ] 24 | 25 | { #category : 'basic' } 26 | XMLUTFStreamConverter >> nextCodePointFromStream: aStream [ 27 | self subclassResponsibility 28 | ] 29 | 30 | { #category : 'decoding' } 31 | XMLUTFStreamConverter >> nextFromStream: aStream [ 32 | | codePoint | 33 | 34 | codePoint := self nextCodePointFromStream: aStream. 35 | [codePoint == 16rFEFF] "the BOM code point" 36 | whileTrue: [ 37 | aStream atEnd 38 | ifTrue: [^ nil]. 39 | codePoint := self nextCodePointFromStream: aStream]. 40 | ^ codePoint 41 | ifNotNil: [codePoint asCharacter]. 42 | ] 43 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLUninitializedState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A state for before tokenizing has started. 3 | " 4 | Class { 5 | #name : 'XMLUninitializedState', 6 | #superclass : 'XMLTokenizerState', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLUninitializedState >> isInitializedState [ 14 | ^ false 15 | ] 16 | 17 | { #category : 'tokenizing' } 18 | XMLUninitializedState >> nextTokenFrom: aTokenizer [ 19 | ^ aTokenizer nextStartDocument 20 | ] 21 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLValidationException.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Invoked when invalid XML is detected and validation is on. 3 | " 4 | Class { 5 | #name : 'XMLValidationException', 6 | #superclass : 'XMLParserException', 7 | #category : 'XML-Parser-Exceptions', 8 | #package : 'XML-Parser', 9 | #tag : 'Exceptions' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLWellFormednessException.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Invoked when XML markup is not well-formed. 3 | " 4 | Class { 5 | #name : 'XMLWellFormednessException', 6 | #superclass : 'XMLParserException', 7 | #category : 'XML-Parser-Exceptions', 8 | #package : 'XML-Parser', 9 | #tag : 'Exceptions' 10 | } 11 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLXMLDeclarationState.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A state for parsing the <?xml ...?> token. 3 | " 4 | Class { 5 | #name : 'XMLXMLDeclarationState', 6 | #superclass : 'XMLPrologState', 7 | #category : 'XML-Parser-Drivers', 8 | #package : 'XML-Parser', 9 | #tag : 'Drivers' 10 | } 11 | 12 | { #category : 'testing' } 13 | XMLXMLDeclarationState >> isXMLDeclarationState [ 14 | ^ true 15 | ] 16 | 17 | { #category : 'tokenizing' } 18 | XMLXMLDeclarationState >> nextTokenFrom: aTokenizer [ 19 | ^ aTokenizer nextXMLDeclarationOrPrologToken 20 | ] 21 | 22 | { #category : 'testing' } 23 | XMLXMLDeclarationState >> supportsEncodingDetection [ 24 | ^ true 25 | ] 26 | -------------------------------------------------------------------------------- /src/XML-Parser/XMLXMLIDAttributeValidator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This class validates ID attributes for the xml:id spec. 3 | " 4 | Class { 5 | #name : 'XMLXMLIDAttributeValidator', 6 | #superclass : 'XMLIDAttributeValidator', 7 | #category : 'XML-Parser-Validation', 8 | #package : 'XML-Parser', 9 | #tag : 'Validation' 10 | } 11 | 12 | { #category : 'defaults' } 13 | XMLXMLIDAttributeValidator class >> standaloneExternalClass [ 14 | ^ XMLStandaloneExternalXMLIDAttributeValidator 15 | ] 16 | 17 | { #category : 'testing' } 18 | XMLXMLIDAttributeValidator >> isXMLID [ 19 | ^ true 20 | ] 21 | 22 | { #category : 'validating' } 23 | XMLXMLIDAttributeValidator >> validateAttributeValue: aValue [ 24 | self elementIDValidator validateXMLID: aValue 25 | ] 26 | 27 | { #category : 'validating' } 28 | XMLXMLIDAttributeValidator >> validateXMLIDAttributeDeclaration [ 29 | 30 | ] 31 | -------------------------------------------------------------------------------- /src/XML-Parser/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'XML-Parser' } 2 | --------------------------------------------------------------------------------