-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathZtConfigBasicPatterns.cls
65 lines (46 loc) · 2.68 KB
/
ZtConfigBasicPatterns.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "ZtConfigBasicPatterns"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' Class ZtConfigBasicPatterns.
' It preserves a part of the basic configuration informations and methods to read them from ZtConfig.xml.
'
' Zotero Tools.
' This software is under Revised ('New') BSD license.
' Copyright © 2019, Olaf Ahrens. All rights reserved.
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' Private variables.
Private pvtPunctuation As String
Private pvtSpaceWOZero As String
Private pvtSpaceWOZeroPunctuation As String
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
' Friend/Public procedures and properties.
' All members that should be callable by CallByName procedure must be public.
Friend Sub Initialize(ByVal valConfig As ZtConfig, ByVal valXml As MSXML2.DOMDocument60)
Dim locNode As MSXML2.IXMLDOMNode
Set locNode = valXml.SelectSingleNode("/zoteroTools/basic/patterns")
With locNode
pvtPunctuation = valConfig.ResolveTextElement(.SelectSingleNode("punctuation"))
pvtSpaceWOZero = valConfig.ResolveTextElement(.SelectSingleNode("spaceWOZero"))
pvtSpaceWOZeroPunctuation = valConfig.ResolveTextElement(.SelectSingleNode("spaceWOZeroPunctuation"))
End With
End Sub
Public Property Get Punctuation() As String
Punctuation = pvtPunctuation
End Property
Public Property Get SpaceWOZero() As String
SpaceWOZero = pvtSpaceWOZero
End Property
Public Property Get SpaceWOZeroPunctuation() As String
SpaceWOZeroPunctuation = pvtSpaceWOZeroPunctuation
End Property
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *