[MarkLogic Dev General] Creating text files

Williams, Paul Paul.Williams at flatironssolutions.com
Fri Mar 7 12:59:51 PST 2008


Meant to get a thanks out sooner to those who replied.  Of course, the
text constructor was just the ticket.  I get so focused in the Xquery
specific stuff sometimes, I neglect the obvious.  Thanks again!

-- Paul
[land] 402.592.8218
[cell]  402.203.2232

-----Original Message-----
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Michael
Blakeley
Sent: Friday, February 29, 2008 5:48 PM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] Creating text files

Paul,

text { $css-content } will build a text node from your string (or from 
any sequence - very useful).

-- Mike

Paul.Williams at flatironssolutions.com wrote:
> I'm planning on creating a page on our site where users can alter
> certain styles defined in a personal CSS file.  I'm hoping I can
create
> such a CSS file dynamically and store it in the DB for future
reference.
> 
> 
> All of my xquery experience has been to produce XML or XHTML content,
so
> I'm unsure about the best way to create a text file (i.e., the CSS)
and
> store it in the DB.  As a quick test, I tried the following...
> 
> 	let $css-content := "h1{background:orange}"
> 	let $css-path := fn:concat("/css/",$user,".css")
> 	xdmp:document-insert($css-path, $css-content)
> 
> As expected, I get: "arg2 is not of type node()".  So, how do you
create
> a stand-alone text node for something like this?  I'm sure there's a
> simple answer, isn't there?  Anyone got any suggestions?
> 
> Thanks
> -- Paul
> 
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general



More information about the General mailing list