xml-mixup 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4939bcfe6e304b5b71251451f59982f747f43b6e31cdd5337d95ed30dfa37d3
4
- data.tar.gz: e97756ea84870da09ac8fbc82d35b74d0a856eb74ed0fe826d4153d520f16398
3
+ metadata.gz: d499773a47584dea6c852e05b936bc6d3016a40d15f38ea232639be5c780263f
4
+ data.tar.gz: 59c83f7be03939874805ccb568f43319890fe6d487e35667c0bad9299b44cb3d
5
5
  SHA512:
6
- metadata.gz: bed9c8b8a0f064d533192bee3f883f9b19c00e45dfb4e569c0b34fbfa7622124087a8fb39c5a36aefdbafab2e5c3d412af0d8911262111f89893c110354cd737
7
- data.tar.gz: 870ebed923f4b9a6fb5c83924115ad598a4b1293ed03a481ef9cd5a3409e53bca68609e61baa23f4549f92f5f7d4a7551dc375b27d769007d2f59df9c48e64e9
6
+ metadata.gz: 0704ed43c0c1baa04006355fe16b8a5a0143218864a1c5eddb3dd7504465fd94347acf9fe8cb211032f9da74641670474e7d78b46a8f639fd2303a77400b0c86
7
+ data.tar.gz: 1bc1e91ccffb613993101c93e63fa888c3bb30e93b5b967a6f985f52ef492dca13567e4fea898e35303a5ca1da2c5acc79972e53c3f1c20992eaaabe0110a516
data/README.md CHANGED
@@ -30,6 +30,19 @@ node = something.markup spec: [
30
30
 
31
31
  doc = node.document
32
32
  puts doc.to_xml
33
+ # => <?xml version="1.0"?>
34
+ # => <?xml-stylesheet href="/transform" type="text/xsl"?>
35
+ # => <!DOCTYPE html>
36
+ # => <html xmlns="http://www.w3.org/1999/xhtml">
37
+ # => <head>
38
+ # => <title>look ma, title</title>
39
+ # => <base href="http://the.base/url"/>
40
+ # => </head>
41
+ # => <body>
42
+ # => <h1>Illustrious Heading</h1>
43
+ # => <p>lolwut</p>
44
+ # => </body>
45
+ # => </html>
33
46
  ```
34
47
 
35
48
  ## Yet another XML markup generator?
@@ -185,6 +198,14 @@ Come on, you know how to do this:
185
198
  Bug reports and pull requests are welcome at
186
199
  https://github.com/doriantaylor/rb-xml-mixup.
187
200
 
201
+ ## The Future
202
+
203
+ As mentioned, this is pretty much a straight-across port
204
+ of [Role::Markup::XML](https://metacpan.org/pod/Role::Markup::XML),
205
+ where it makes sense to bolt a bunch of `_FOO`-looking instance
206
+ methods onto an object so you can use them to make more streamlined
207
+ methods.
208
+
188
209
  ## License
189
210
 
190
211
  This software is provided under
@@ -1,5 +1,5 @@
1
1
  module XML
2
2
  module Mixup
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
data/lib/xml/mixup.rb CHANGED
@@ -255,7 +255,11 @@ module XML::Mixup
255
255
  sys ||= attr[:system] if attr[:system]
256
256
 
257
257
  # XXX for some reason this is an *internal* subset?
258
- node = doc.create_internal_subset(root, pub.to_s, sys.to_s)
258
+ # anyway these may not be strings and upstream is not forgiving
259
+ node = doc.create_internal_subset(root.to_s,
260
+ pub.nil? ? pub : pub.to_s,
261
+ sys.nil? ? sys : sys.to_s)
262
+
259
263
 
260
264
  # at any rate it doesn't have to be explicitly attached
261
265
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xml-mixup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Taylor