Condense string literals into global variables.

Overview

Gettysburg

This is an implementation of the SAX interface.

API Documentation

Documentation of the API can be found here: Gettysburg API

A note on Character Encodings

The XML specification states:

Entities encoded in UTF-16 must and entities encoded in UTF-8 may begin with the Byte Order Mark described by Annex H of [ISO/IEC 10646:2000], section 16.8 of Unicode (the ZERO WIDTH NO-BREAK SPACE character, #xFEFF). This is an encoding signature, not part of either the markup or the character data of the XML document. XML processors must be able to use this character to differentiate between UTF-8 and UTF-16 encoded documents.

If the replacement text of an external entity is to begin with the character U+FEFF, and no text declaration is present, then a Byte Order Mark MUST be present, whether the entity is encoded in UTF-8 or UTF-16.

Although an XML processor is required to read only entities in the UTF-8 and UTF-16 encodings, it is recognized that other encodings are used around the world, and it may be desired for XML processors to read entities that use them. In the absence of external character encoding information (such as MIME headers), parsed entities which are stored in an encoding other than UTF-8 or UTF-16 must begin with a text declaration (see 4.3.1 The Text Declaration) containing an encoding declaration

In short, we're supposed to start out assuming the possibility of UTF-8 or UTF-16 and then if there is an XML Declaration we should see the encoding field in that, if it has one, to determine the actual character encoding used in the document.

Gettysburg will actually attempt to detect and handle UTF-8, UTF-16, and UTF-32 character encodings (with or without a byte-order-mark). Gettysburg will also handle other character encodings as long as there is an XML Declaration in the document specifying what the proper character encoding should be. That XML Declaration should be in either UTF-8, UTF-16, or UTF-32 encoding. Also, the encoding specified in the XML Declaration should match the byte-width of the XML Declaration itself. In other words, don't start off with UTF-16 and then specify UTF-8 in the XML Declaration. Even if everything AFTER the XML Declaration is in UTF-8 this is considered a malformed and invalid XML document. Gettysburg will also honor a MIME header which indicates character encoding if one is present.

The same applies to external entities and DTDs (which are considered a special case of external entities). Character encodings other than UTF-8, UTF-16, and UTF-32 will be supported as long as there is a Text Declaration (XML specification sections 4.3.1 - 4.3.3) at the beginning of the external entity or DTD.

You might also like...
The awesome Fastlane tools brought into your Xcode
The awesome Fastlane tools brought into your Xcode

Fastlane-Plugin for Xcode Features Run fastlane command with one click. Add your Fastfile in xcode. Setup Fastlane. Install Install via Alcatraz OR Cl

Save development time! Respresso automatically transforms and delivers your digital assets into your projects
Save development time! Respresso automatically transforms and delivers your digital assets into your projects

Respresso iOS client Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import the

An Xcode Plugin to upload code snippets directly into Slack and Gist
An Xcode Plugin to upload code snippets directly into Slack and Gist

XCSnippetr Share code snippets to Slack and Gist without leaving Xcode ever again! 😱 Features Upload code snippets using Slack's and Github's APIs. T

This is a Swift Package bundling different Train APIs into one simple Swift interface.

This is a Swift Package bundling different Train APIs into one simple Swift interface.

KIEM - Open Source Library, converting mistyped Korean string into English string

KIEM Open Source Library, converting misspelled Korean string into English strin

🌳 Environment – a nicer, type-safe way of working with environment variables in Swift.

🌳 Environment Welcome to Environment – a nicer, type-safe way of working with environment variables in Swift. Usage Access Environment Variables The

Swift Programming Basics - Collections, Variables & Constants

Dicee What I learned in this module How to clone an existing Xcode project from GitHub. Create an app with behaviour and functionality. Create links b

Fridax enables you to read variables and intercept/hook functions in Xamarin/Mono JIT and AOT compiled iOS/Android applications.

Fridax is a Node package for dealing with Xamarin applications while using the Frida API. Goal β€’ Installation β€’ Usage β€’ Examples β€’ Issues β€’ License Bu

JSONHelper - ✌ Convert anything into anything in one operation; JSON data into class instances, hex strings into UIColor/NSColor, y/n strings to booleans, arrays and dictionaries of these; anything you can make sense of!

JSONHelper Convert anything into anything in one operation; hex strings into UIColor/NSColor, JSON strings into class instances, y/n strings to boolea

StyledTextKit is a declarative attributed string library for fast rendering and easy string building.
StyledTextKit is a declarative attributed string library for fast rendering and easy string building.

StyledTextKit is a declarative attributed string library for fast rendering and easy string building. It serves as a simple replacement to NSAttribute

Swift String Validator. Simple lib for ios to validate string and UITextFields text for some criterias

Swift String validator About Library for easy and fastest string validation based on сciterias. Instalation KKStringValidator is available through Coc

⌨️ Add user-customizable global keyboard shortcuts to your macOS app in minutes
⌨️ Add user-customizable global keyboard shortcuts to your macOS app in minutes

This package lets you add support for user-customizable global keyboard shortcuts to your macOS app in minutes. It's fully sandbox and Mac App Store c

iOS utility class to manage global dispatch queue.
iOS utility class to manage global dispatch queue.

YYDispatchQueuePool iOS utility class to manage global dispatch queue. (It's a component of YYKit) When use a concurrent queue to execute lots of bloc

This is an Instagram clone with a custom Parse backend that allows a user to post photos, view a global photos feed, and add comments!
This is an Instagram clone with a custom Parse backend that allows a user to post photos, view a global photos feed, and add comments!

Parstagram - Part II This is an Instagram clone with a custom Parse backend that allows a user to post photos, view a global photos feed, and add comm

This plugin defines a global navigator.camera object, which provides an API for taking pictures and for choosing images from the system's image library.

title description Camera Take pictures with the device camera. AppVeyor Travis CI cordova-plugin-camera This plugin defines a global navigator.camera

Global formula editor with swift

Koshiki (With auto-completion of Typinator. )

Commonly available global error type packages

ErrorKit 일반적으둜 μ‚¬μš© ν•  수 μžˆλŠ” μ „μ—­ 였λ₯˜ νƒ€μž… νŒ¨ν‚€μ§€. Requirements Xcode 13.2.1+ Swift 5.5+ Ins

AREarthObservatory - A minimal iOS AR app that visualizes time-series changes in the global environment based on data from NASA satellites
AREarthObservatory - A minimal iOS AR app that visualizes time-series changes in the global environment based on data from NASA satellites

A minimal iOS AR app that visualizes time-series changes in the global environment based on data from NASA satellites

A Swifty API for global macOS hotkeys.

A Swifty API for global macOS hotkeys. Install Add the following dependency to your Package.swift file: .package(url: "https://github.com/jordanbaird/

Owner
Galen Rhodes
Software Developer, Electrical Engineer, Husband, Dad, Pop-Pop, Technophile, Patient Introvert, Pluviophile, Life-long ADD Sufferer, and genuinely good guy.
Galen Rhodes
Swift Programming Basics - Collections, Variables & Constants

Dicee What I learned in this module How to clone an existing Xcode project from GitHub. Create an app with behaviour and functionality. Create links b

null 0 Jan 9, 2022
Fridax enables you to read variables and intercept/hook functions in Xamarin/Mono JIT and AOT compiled iOS/Android applications.

Fridax is a Node package for dealing with Xamarin applications while using the Frida API. Goal β€’ Installation β€’ Usage β€’ Examples β€’ Issues β€’ License Bu

Northwave 125 Jan 3, 2023
The Swift code generator for your assets, storyboards, Localizable.strings, … β€” Get rid of all String-based APIs!

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

null 8.3k Dec 31, 2022
Beak 🐦 Peck into your Swift files from the command line

Beak ?? Peck into your Swift files from the command line Beak can take a standard Swift file and then list and run any public global functions in it v

Yonas Kolb 566 Dec 6, 2022
Turn your Swift data model into a working CRUD app.

Model2App is a simple library that lets you quickly generate a CRUD iOS app based on just a data model defined in Swift. (CRUD - Create Read Update De

Q Mobile 132 Dec 22, 2022
Codeless Appodeal integration into Unity project.

Codeless out of the box Appodeal integration into Unity project. Contains global config file which provide you ability to setup Appodeal without any line of code.

Ivan Murzak 1 Dec 30, 2021
This is BouncyBall, from Develop in Swift Explorations Unit 3, completed into Part 3, where the onTapped function gets a little squirrelly

This is BouncyBall, from Develop in Swift Explorations Unit 3, completed into Part 3, where the onTapped function gets a little squirrelly. Use this version when you add a function to be called when the funnel is tapped and taps aren't registered in the simulator.

Teaching Develop in Swift 0 Nov 20, 2021
FlutterNativeDragAndDrop - A package that allows you to add native drag and drop support into your flutter app

native_drag_n_drop A package that allows you to add native drag and drop support

Alex Rabin 21 Dec 21, 2022
Save development time! Respresso automatically transforms and delivers your digital assets into your projects

Introduction Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import the latest

Respresso 10 Nov 8, 2022
Save development time! Respresso automatically transforms and delivers your digital assets into your projects

Respresso Android client Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import

Respresso 11 May 27, 2021