---
title: "CSL URL Checking and Citation Example"
author: "ChatGPT"
output: html_document
bibliography: '`r system.file("REFERENCES.bib", package="gaawr2")`'
csl: !r csl_content
vignette: >
  %\VignetteIndexEntry{gaawr2}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
  %\VignetteDepends{httr, XML}
---

```{r setup, warning=FALSE}
source(system.file("csl","url.R",package="gaawr2"))
csl_file_path <- "nature-genetics.csl"
csl_file_path <- system.file("csl",csl_file_path,package="gaawr2")

cat("CSL File Content (Raw):\n")
cat(paste(readLines(csl_file_path), collapse = "\n"))

cat("\nExtracted Links from CSL File:\n")
csl_doc <- check_csl_urls(csl_file_path)
hrefs <- xpathSApply(csl_doc, "//csl:link", xmlGetAttr, "href", namespaces = namespace)
print(hrefs)
```

Would this work @malone10?

## References
