G
Guest
Greetings!
I've been reading the following article on extending the ResourceProvider in
ASP.NET 2.0 and I have some questions:
http://msdn2.microsoft.com/en-us/library/aa905797.aspx
Is it possible to extend the ResourceProvider such that:
1. We can use XML files that are more complex than the key-value pairs in
RESX files. For example:
<Rebate id="123456" amount="29.95" start_date="9/1/2007"
end_date="12/22/2007">
<Currency code="USD">$</Currency>
<Language code="en-us">
<Name><![CDATA[Get your $30 Rebate]]></Name>
<Address><![CDATA[
123 Fake Street
Suite 300
Chicago, IL 60622
]]>
</Address>
<Phone><![CDATA[(800) 555-5555]]></Phone>
<HeaderImageURL>http://images.example.com/common/spacer.gif</HeaderImageURL>
</Language>
</Rebate>
2. Get resources in XML files via XPath instead of a server control's id.
We'd like to look up the value via XPath, which would likely be stored in
the server control's TEXT property at design time.
3. Get node and get data.
In the case of <myNode>Some Value</myNode>, sometimes we'd like "Some Value"
and other times we may need "<myNode>Some Value</myNode>".
4. Use multiple XML files
Localization data for a given page or user control may exist in more than
one XML file per language.
Thanks in advance for any suggestions or comments.
I've been reading the following article on extending the ResourceProvider in
ASP.NET 2.0 and I have some questions:
http://msdn2.microsoft.com/en-us/library/aa905797.aspx
Is it possible to extend the ResourceProvider such that:
1. We can use XML files that are more complex than the key-value pairs in
RESX files. For example:
<Rebate id="123456" amount="29.95" start_date="9/1/2007"
end_date="12/22/2007">
<Currency code="USD">$</Currency>
<Language code="en-us">
<Name><![CDATA[Get your $30 Rebate]]></Name>
<Address><![CDATA[
123 Fake Street
Suite 300
Chicago, IL 60622
]]>
</Address>
<Phone><![CDATA[(800) 555-5555]]></Phone>
<HeaderImageURL>http://images.example.com/common/spacer.gif</HeaderImageURL>
</Language>
</Rebate>
2. Get resources in XML files via XPath instead of a server control's id.
We'd like to look up the value via XPath, which would likely be stored in
the server control's TEXT property at design time.
3. Get node and get data.
In the case of <myNode>Some Value</myNode>, sometimes we'd like "Some Value"
and other times we may need "<myNode>Some Value</myNode>".
4. Use multiple XML files
Localization data for a given page or user control may exist in more than
one XML file per language.
Thanks in advance for any suggestions or comments.