Parse stylesheet from a string (in memory) instead of from a file?

"Bloomquist, Leif via xslt" <[email protected]> Wed, 17 Nov 2021 17:44:49 +0000
Newsgroups gmane.comp.gnome.lib.xslt
Message-ID <[email protected]>
--===============7897042567902351666==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_61ebf4ee09064494aaf534a0ee932144mdaspace_"

--_000_61ebf4ee09064494aaf534a0ee932144mdaspace_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi all,

I'm porting an application that uses libxml/libxslt to an embedded platform=
 that has no filesystem.

Accordingly, I'm trying to find (and hopefully not have to write) an equiva=
lent to xsltParseStylesheetFile() that accepts a string representation of t=
he stylesheet, instead of a filename/URI pointing to it.  Coming up blank.

For the schema file, I was able to simply replace xmlSchemaNewParserCtxt() =
with xmlSchemaNewMemParserCtxt() - is there an equivalent in libxslt that I=
'm overlooking?

I'm also willing to accept that there is a better approach that I haven't c=
onsidered : - )

Any help appreciated.

Thanks
-Leif

The information transmitted by and/or attached to this email is intended on=
ly for the person or entity to which it is addressed. This email and any at=
tachments may contain proprietary, confidential and/or privileged material.=
 If you are not the intended recipient of this message, be aware that any u=
se, review, retransmission, distribution, reproduction or any action taken =
in reliance upon this message is strictly prohibited. If you received this =
in error, please contact the sender and delete the material from all comput=
ers.

Les renseignements transmis par ou joints au pr?sent courrier ?lectronique =
sont destin?s uniquement ? la personne ou ? l'entit? ? laquelle ils sont ad=
ress?s. Le pr?sent courrier ?lectronique et toute pi?ce jointe peuvent cont=
enir des renseignements exclusifs, confidentiels ou privil?gi?s. Si vous n'=
?tes pas le destinataire de ce message, veuillez noter que toute utilisatio=
n, r?vision, retransmission, distribution, reproduction ou toute action ent=
reprise sur la base de ce message est strictement interdite. Si vous avez r=
e?u ce message par erreur, veuillez communiquer avec l'exp?diteur et suppri=
mer le contenu de tous les ordinateurs.

--_000_61ebf4ee09064494aaf534a0ee932144mdaspace_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-CA" link=3D"#0563C1" vlink=3D"#954F72">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Hi all,<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">I&#8217;m porting an application that uses libxml/li=
bxslt to an embedded platform that has no filesystem.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Accordingly, I&#8217;m trying to find (and hopefully=
 not have to write) an equivalent to xsltParseStylesheetFile() that accepts=
 a string representation of the stylesheet, instead of a filename/URI point=
ing to it. &nbsp;Coming up blank.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">For the schema file, I was able to simply replace xm=
lSchemaNewParserCtxt() with xmlSchemaNewMemParserCtxt() &#8211; is there an=
 equivalent in libxslt that I&#8217;m overlooking?<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">I&#8217;m also willing to accept that there is a bet=
ter approach that I haven&#8217;t considered : - )<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Any help appreciated.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Thanks<o:p></o:p></p>
<p class=3D"MsoNormal">-Leif<o:p></o:p></p>
</div>
<div></div>
<p style=3D"font-size:11pt;line-height:10pt;font-family:'Calibri Light'">Th=
e information transmitted by and/or attached to this email is intended only=
 for the person or entity to which it is addressed. This email and any atta=
chments may contain proprietary, confidential
 and/or privileged material. If you are not the intended recipient of this =
message, be aware that any use, review, retransmission, distribution, repro=
duction or any action taken in reliance upon this message is strictly prohi=
bited. If you received this in error,
 please contact the sender and delete the material from all computers.<br>
<br>
Les renseignements transmis par ou joints au pr&eacute;sent courrier &eacut=
e;lectronique sont destin&eacute;s uniquement &agrave; la personne ou &agra=
ve; l'entit&eacute; &agrave; laquelle ils sont adress&eacute;s. Le pr&eacut=
e;sent courrier &eacute;lectronique et toute pi&egrave;ce jointe peuvent co=
ntenir des renseignements exclusifs,
 confidentiels ou privil&eacute;gi&eacute;s. Si vous n'&ecirc;tes pas le de=
stinataire de ce message, veuillez noter que toute utilisation, r&eacute;vi=
sion, retransmission, distribution, reproduction ou toute action entreprise=
 sur la base de ce message est strictement interdite. Si vous
 avez re&ccedil;u ce message par erreur, veuillez communiquer avec l'exp&ea=
cute;diteur et supprimer le contenu de tous les ordinateurs.
</p>
<div></div>
</body>
</html>

--_000_61ebf4ee09064494aaf534a0ee932144mdaspace_--

--===============7897042567902351666==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
https://mail.gnome.org/mailman/listinfo/xslt

--===============7897042567902351666==--