@@ -38,6 +38,7 @@ private static void WriteToFile(Catalog c, List<Organization> orgs, List<Contact
38
38
_nsm . AddNamespace ( "rdfs" , "http://www.w3.org/2000/01/rdf-schema#" ) ;
39
39
_nsm . AddNamespace ( "dcat" , "http://www.w3.org/ns/dcat#" ) ;
40
40
_nsm . AddNamespace ( "foaf" , "http://xmlns.com/foaf/0.1/" ) ;
41
+ _nsm . AddNamespace ( "vcard" , "http://www.w3.org/2006/vcard/ns#" ) ;
41
42
42
43
XmlDeclaration declaration = _doc . CreateXmlDeclaration ( "1.0" , "utf-8" , null ) ;
43
44
_doc . AppendChild ( declaration ) ;
@@ -143,7 +144,7 @@ private static XmlAttribute createAttr(string ns, string tagName, string value)
143
144
/// <returns>XmlElement</returns>
144
145
public static XmlElement generateCatalog ( Catalog c )
145
146
{
146
- XmlElement catElem = createElem ( "dcat" , "catalog" ) ;
147
+ XmlElement catElem = createElem ( "dcat" , "Catalog" , "rdf" , "about" , c . Refrence ) ;
147
148
148
149
// languages
149
150
foreach ( string lang in c . Languages )
@@ -184,7 +185,7 @@ public static XmlElement generateCatalog(Catalog c)
184
185
// Dataset references
185
186
foreach ( Dataset d in c . Datasets )
186
187
{
187
- XmlElement dElem = createElem ( "dcat" , "Dataset " , "rdf" , "resource" , d . Resource ) ;
188
+ XmlElement dElem = createElem ( "dcat" , "dataset " , "rdf" , "resource" , d . Resource ) ;
188
189
catElem . AppendChild ( dElem ) ;
189
190
}
190
191
return catElem ;
@@ -341,19 +342,19 @@ public static XmlElement generateContact(ContactPerson cp)
341
342
342
343
// Email
343
344
string trimmedEmail = cp . Email . Replace ( " " , "" ) ;
344
- XmlElement emailElem = createElem ( "vcard" , "hasEmail" , "rdf" , "Resource " , "mailto:" + trimmedEmail ) ;
345
+ XmlElement emailElem = createElem ( "vcard" , "hasEmail" , "rdf" , "resource " , "mailto:" + trimmedEmail ) ;
345
346
individual . AppendChild ( emailElem ) ;
346
347
347
348
// Phone
348
- XmlElement phoneElem = createElem ( "vcard" , "hasTelephone" ) ;
349
- XmlElement descElem = createElem ( "dcterms" , "description" ) ;
349
+ // XmlElement phoneElem = createElem("vcard", "hasTelephone");
350
+ // XmlElement descElem = createElem("dcterms", "description");
350
351
351
- string phone = "tel:" + cp . Phone . Replace ( " " , "" ) ;
352
- XmlElement phoneVal = createElem ( "vcard" , "hasValue" , "rdf" , "Resource" , phone ) ;
352
+ // string phone = "tel:" + cp.Phone.Replace(" ", "");
353
+ // XmlElement phoneVal = createElem("vcard", "hasValue", "rdf", "Resource", phone);
353
354
354
- phoneElem . AppendChild ( descElem ) ;
355
- descElem . AppendChild ( phoneVal ) ;
356
- individual . AppendChild ( phoneElem ) ;
355
+ // phoneElem.AppendChild(descElem);
356
+ // descElem.AppendChild(phoneVal);
357
+ // individual.AppendChild(phoneElem);
357
358
358
359
return individual ;
359
360
}
0 commit comments