[xml] [Fwd: Re: [xmlsec] Signing a document with key and cert..]
- From: Marius Kjeldahl <marius kjeldahl net>
- To: xml gnome org
- Cc: marius kjeldahl net
- Subject: [xml] [Fwd: Re: [xmlsec] Signing a document with key and cert..]
- Date: Sun, 24 Nov 2002 13:08:21 +0100
I'm forwarding a question that I posted on the xmlsec list related to how to
build a DTD dynamically (without reading it from a file) using libxml, and would
appreciate any pointers.
Thanks,
Marius Kjeldahl
Marius Kjeldahl wrote:
> Aleksey Sanin wrote:
>
>>>
>>> My next challenge is to do this dynamically (so if anybody have
>>> experience on how to do that using libxml, feel free to spill the
>>> beans).
>>
>>
>>
>> Check xmlCreateIntSubset() from th libxml/tree.h file.
>
>
> By using xmlCreateIntSubset, the following gets put into my document:
>
> <?xml version="1.0"?>
> <!DOCTYPE ThreeDSecure PUBLIC "" "">
> <ThreeDSecure>
> ...
>
> which seems ok. Now I need to add the the definitions, like:
>
> <!ATTLIST CRReq id ID #IMPLIED>
>
> so that the complete result becomes something like:
>
> <?xml version="1.0"?>
> <!DOCTYPE ThreeDSecure [
> <!ATTLIST CRReq id ID #IMPLIED>
> ]>
> <ThreeDSecure>
> ...
>
> which validates ok.
>
> I've googled around both the web and newsgroups, but have not found
> the correct way to add the "attlist" nodes to the dtd. I've tried
> xmlAddDocEntity with XML_INTERNAL_PARAMETER_ENTITY, but I can not seem
> to get it work. In addition, I found something in valid.h which looks
> promising - xmlAddAttributeDecl - but this one requires a
> xmlValidCtxtPtr which I guess is necessary at the validation phase
> (which I can not do, since I do not have a complete document yet).
>
> Any experts who want to give me a hint of what functions I need to
> call to add ATTLIST (and similar) entries in libxml?
>
_______________________________________________
xmlsec mailing list
xmlsec aleksey com
http://www.aleksey.com/mailman/listinfo/xmlsec
--
Mvh, Marius Kjeldahl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]